//
// tinyxml2::XMLNode::~XMLNode from 0x18009b2b0 to 0x18009b363 (179 bytes)
//
// 14 xrefs:
// > tinyxml2::XMLComment::~XMLComment @ 0x18009b1ca
// > tinyxml2::XMLDeclaration::~XMLDeclaration @ 0x18009b1da
// > tinyxml2::XMLDocument::~XMLDocument @ 0x18009b239
// > tinyxml2::XMLElement::~XMLElement @ 0x18009b2aa
// > tinyxml2::XMLText::~XMLText @ 0x18009b3ea
// > tinyxml2::XMLUnknown::~XMLUnknown @ 0x18009b3fa
// > sub_18009B770 @ 0x18009b7d5
// > sub_18009B800 @ 0x18009b865
// > sub_18009B9B0 @ 0x18009ba0b
// > sub_18009BAD0 @ 0x18009bb3c
// > sub_18009BB70 @ 0x18009bbd5
// > sub_18009B9B0 @ 0x18009b9cc
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c0d5c
//
// 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:11 +0000
//
void __fastcall tinyxml2::XMLNode::~XMLNode(void **this)
{
char *v2; // rcx
__int64 v3; // rdx
void **v4; // rax
void **v5; // rax
__int64 v6; // rdx
char *v7; // rdx
__int64 v8; // r8
*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;
}