//
// tinyxml2::StrPair::SetStr from 0x1800a04e0 to 0x1800a0571 (145 bytes)
//
// 6 xrefs:
// > tinyxml2::XMLElement::FindOrCreateAttribute @ 0x18009ce22
// > tinyxml2::XMLAttribute::SetAttribute @ 0x1800a0387
// > tinyxml2::XMLAttribute::SetName @ 0x1800a04c7
// > tinyxml2::XMLElement::ShallowClone @ 0x1800a072a
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c150c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:22:13 +0000
//
void __fastcall tinyxml2::StrPair::SetStr(void **this, const char *a2, int a3)
{
size_t v6; // rdi
void *v7; // rax
char *v8; // rax
if ( (*(_DWORD *)this & 0x200) != 0 )
j_j_free_0(*(this + 1));
*(_DWORD *)this = 0;
*(this + 1) = nullptr;
*(this + 2) = nullptr;
v6 = strlen(a2);
v7 = (void *)sub_1800E4C6C(v6 + 1);
*(this + 1) = v7;
memcpy(v7, a2, v6 + 1);
v8 = (char *)*(this + 1) + v6;
*(_DWORD *)this = a3 | 0x200;
*(this + 2) = v8;
}