//
// tinyxml2::XMLNode::InsertEndChild from 0x5ede4a to 0x5ede72 (40 bytes)
//
// 11 xrefs:
// > sub_5DEB00 @ 0x5deb40
// > sub_5DEB00 @ 0x5debb2
// > sub_5DEBD0 @ 0x5dec08
// > sub_5DEBD0 @ 0x5dec18
// > sub_5DEBD0 @ 0x5dec2c
// > cocos2d::CCFileUtils::writeToFile @ 0x5dec7e
// > cocos2d::CCFileUtils::writeToFile @ 0x5dec90
// > cocos2d::CCFileUtils::writeToFile @ 0x5decc4
// > cocos2d::CCFileUtils::writeToFile @ 0x5decd8
// > tinyxml2::XMLNode::InsertAfterChild @ 0x5edeb0
// > tinyxml2::XMLNode::ParseDeep @ 0x5eec66
//
// 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
//
tinyxml2::XMLNode *__fastcall tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode *this, tinyxml2::XMLNode *a2)
{
int v2; // r3
int v4; // r0
v2 = *((_DWORD *)this + 7);
if ( v2 )
{
*(_DWORD *)(v2 + 36) = a2;
*((_DWORD *)a2 + 8) = v2;
*((_DWORD *)this + 7) = a2;
}
else
{
*((_DWORD *)this + 7) = a2;
*((_DWORD *)this + 6) = a2;
*((_DWORD *)a2 + 8) = 0;
}
*((_DWORD *)a2 + 2) = this;
v4 = *((_DWORD *)a2 + 10);
*((_DWORD *)a2 + 9) = 0;
(*(void (__fastcall **)(int))(*(_DWORD *)v4 + 20))(v4);
return a2;
}