//
// sub_10059A810 from 0x10059a810 to 0x10059a8a4 (148 bytes)
//
// 2 xrefs:
// > sub_10059A8B0 @ 0x10059a8b5
// > sub_10059A8C0 @ 0x10059a8c9
//
// 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 12:32:30 +0000
//
void __fastcall sub_10059A810(__int64 a1)
{
_DWORD *v2; // rdi
*(_QWORD *)a1 = &off_100B716C0;
v2 = *(_DWORD **)(a1 + 136);
if ( v2 )
cocos2d::CCObject::release(v2);
if ( (*(_BYTE *)(a1 + 104) & 1) != 0 )
{
operator delete(*(void **)(a1 + 120));
if ( (*(_BYTE *)(a1 + 80) & 1) == 0 )
{
LABEL_5:
if ( (*(_BYTE *)(a1 + 56) & 1) == 0 )
goto LABEL_6;
goto LABEL_11;
}
}
else if ( (*(_BYTE *)(a1 + 80) & 1) == 0 )
{
goto LABEL_5;
}
operator delete(*(void **)(a1 + 96));
if ( (*(_BYTE *)(a1 + 56) & 1) == 0 )
{
LABEL_6:
if ( (*(_BYTE *)(a1 + 32) & 1) == 0 )
goto LABEL_7;
goto LABEL_12;
}
LABEL_11:
operator delete(*(void **)(a1 + 72));
if ( (*(_BYTE *)(a1 + 32) & 1) == 0 )
{
LABEL_7:
if ( (*(_BYTE *)(a1 + 8) & 1) == 0 )
return;
LABEL_13:
operator delete(*(void **)(a1 + 24));
return;
}
LABEL_12:
operator delete(*(void **)(a1 + 48));
if ( (*(_BYTE *)(a1 + 8) & 1) != 0 )
goto LABEL_13;
}