//
// tinyxml2::XMLNode::InsertFirstChild from 0xb249fc to 0xb24a5c (96 bytes)
//
// 1 xrefs:
// > ??> @ 0x572b8
//
// 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::InsertFirstChild(tinyxml2::XMLNode *this, tinyxml2::XMLNode *a2)
{
__int64 v2; // x2
__int64 v3; // x2
v2 = *((_QWORD *)this + 6);
if ( v2 )
{
*(_QWORD *)(v2 + 64) = a2;
*((_QWORD *)a2 + 9) = v2;
*((_QWORD *)this + 6) = a2;
*((_QWORD *)a2 + 8) = 0;
}
else
{
*((_QWORD *)this + 7) = a2;
*((_QWORD *)this + 6) = a2;
*((_QWORD *)a2 + 8) = 0;
*((_QWORD *)a2 + 9) = 0;
}
v3 = *((_QWORD *)a2 + 10);
*((_QWORD *)a2 + 2) = this;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 40LL))(v3);
return a2;
}