//
// tinyxml2::XMLNode::InsertFirstChild from 0x18009d5f0 to 0x18009d63d (77 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c10ec
//
// 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:12 +0000
//
struct tinyxml2::XMLNode *__fastcall tinyxml2::XMLNode::InsertFirstChild(
tinyxml2::XMLNode *this,
struct tinyxml2::XMLNode *a2)
{
__int64 v2; // rax
v2 = *((_QWORD *)this + 6);
if ( v2 )
{
*(_QWORD *)(v2 + 64) = a2;
*((_QWORD *)a2 + 9) = *((_QWORD *)this + 6);
*((_QWORD *)this + 6) = a2;
}
else
{
*((_QWORD *)this + 7) = a2;
*((_QWORD *)this + 6) = a2;
*((_QWORD *)a2 + 9) = 0;
}
*((_QWORD *)a2 + 8) = 0;
*((_QWORD *)a2 + 2) = this;
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)a2 + 10) + 32LL))(*((_QWORD *)a2 + 10));
return a2;
}