//
// pugi::xml_document::destroy from 0x605a60 to 0x605aaa (74 bytes)
//
// 2 xrefs:
// > pugi::xml_document::~xml_document @ 0x605abc
// > pugi::xml_document::reset @ 0x605ac8
//
// 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 pugi::xml_document::destroy(pugi::xml_document *this)
{
pugi::char_t *buffer; // r0
_DWORD *i; // r5
int j; // r3
int v5; // r6
buffer = this->_buffer;
if ( buffer )
{
off_ABAE70(buffer);
this->_buffer = nullptr;
}
for ( i = *((_DWORD **)this->_root + 11); i; i = (_DWORD *)i[1] )
{
if ( *i )
off_ABAE70(*i);
}
for ( j = *(_DWORD *)&byte_9[(*(_DWORD *)this->_root & 0xFFFFFFE0) + 3]; j; j = v5 )
{
v5 = *(_DWORD *)(j + 12);
off_ABAE70(*(_DWORD *)(j + 4));
}
this->_root = nullptr;
}