//
// tinyxml2::XMLNode::SetValue from 0x18009c900 to 0x18009c9d0 (208 bytes)
//
// 7 xrefs:
// > tinyxml2::XMLElement::SetName @ 0x18009c840
// > cocos2d::CCUserDefault::setBoolForKey @ 0x18009f312
// > cocos2d::CCUserDefault::setDoubleForKey @ 0x18009f489
// > cocos2d::CCUserDefault::setIntegerForKey @ 0x18009f5c4
// > cocos2d::CCUserDefault::setStringForKey @ 0x18009f6d0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b7278
//
// 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::XMLNode::SetValue(void **this, const char *a2, char a3)
{
__int64 v5; // rdi
void *v6; // rax
__int64 v7; // rcx
if ( a3 )
{
if ( (*(_DWORD *)(this + 3) & 0x200) != 0 )
j_j_free_0(*(this + 4));
*(this + 4) = (void *)a2;
*((_DWORD *)this + 6) = 0;
*(this + 5) = nullptr;
}
else
{
if ( (*(_DWORD *)(this + 3) & 0x200) != 0 )
j_j_free_0(*(this + 4));
v5 = -1;
*((_DWORD *)this + 6) = 0;
*(this + 4) = nullptr;
*(this + 5) = nullptr;
do
++v5;
while ( a2[v5] );
v6 = operator new(v5 + 1);
*(this + 4) = v6;
memcpy(v6, a2, v5 + 1);
v7 = (__int64)*(this + 4);
*((_DWORD *)this + 6) = 512;
*(this + 5) = (void *)(v5 + v7);
}
}