//
// tinyxml2::XMLAttribute::SetAttribute from 0x18009c6f0 to 0x18009c7bc (204 bytes)
//
// 3 xrefs:
// > tinyxml2::XMLElement::SetAttribute @ 0x1800d133a
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b7254
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall tinyxml2::XMLAttribute::SetAttribute(void **this)
{
__int64 v2; // rbx
void *v3; // rax
__int64 v4; // rcx
char Src[208]; // [rsp+20h] [rbp-F8h] BYREF
sub_18009CFD0(Src, 0xC8u, "%d");
if ( (*(_DWORD *)(this + 4) & 0x200) != 0 )
j_j_free_0(*(this + 5));
v2 = -1;
*((_DWORD *)this + 8) = 0;
*(this + 5) = nullptr;
*(this + 6) = nullptr;
do
++v2;
while ( Src[v2] );
v3 = operator new(v2 + 1);
*(this + 5) = v3;
memcpy(v3, Src, v2 + 1);
v4 = (__int64)*(this + 5);
*((_DWORD *)this + 8) = 512;
*(this + 6) = (void *)(v2 + v4);
}