//
// tinyxml2::XMLNode::~XMLNode from 0x180097960 to 0x180097a13 (179 bytes)
//
// 14 xrefs:
// > tinyxml2::XMLComment::~XMLComment @ 0x18009787a
// > tinyxml2::XMLDeclaration::~XMLDeclaration @ 0x18009788a
// > tinyxml2::XMLDocument::~XMLDocument @ 0x1800978e9
// > tinyxml2::XMLElement::~XMLElement @ 0x18009795a
// > tinyxml2::XMLText::~XMLText @ 0x180097a9a
// > tinyxml2::XMLUnknown::~XMLUnknown @ 0x180097aaa
// > sub_180097E20 @ 0x180097e85
// > sub_180097EB0 @ 0x180097f15
// > sub_180098060 @ 0x1800980bb
// > sub_180098180 @ 0x1800981ec
// > sub_180098220 @ 0x180098285
// > sub_180098060 @ 0x18009807c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6abc
//
// 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::~XMLNode(void **this)
{
char *v2; // rcx
__int64 v3; // rdx
void **v4; // rax
void **v5; // rax
__int64 v6; // rdx
char *v7; // r8
__int64 v8; // rdx
*this = &tinyxml2::XMLNode::`vftable';
tinyxml2::XMLNode::DeleteChildren((tinyxml2::XMLNode *)this);
v2 = (char *)(this + 2);
v3 = (__int64)*(this + 2);
if ( v3 )
{
v4 = *(void ***)(v3 + 48);
if ( this == v4 )
{
*(_QWORD *)(v3 + 48) = v4[9];
v2 = (char *)(this + 2);
}
v5 = *(void ***)(v3 + 56);
if ( this == v5 )
*(_QWORD *)(v3 + 56) = v5[8];
v6 = (__int64)*(this + 8);
if ( v6 )
{
*(_QWORD *)(v6 + 72) = *(this + 9);
v7 = (char *)(this + 2);
}
else
{
v7 = v2;
}
v8 = (__int64)*(this + 9);
if ( v8 )
{
*(_QWORD *)(v8 + 64) = *(this + 8);
v2 = v7;
}
*(_QWORD *)v2 = 0;
}
if ( (*(_DWORD *)(this + 3) & 0x200) != 0 )
j_j_free_0(*(this + 4));
*((_DWORD *)this + 6) = 0;
*(this + 4) = nullptr;
*(this + 5) = nullptr;
}