//
// sub_1000A2FD0 from 0x1000a2fd0 to 0x1000a3093 (195 bytes)
//
// 2 xrefs:
// > sub_1000A2FA0 @ 0x1000a2fa5
// > sub_1000A2FB0 @ 0x1000a2fb9
//
// 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:20:14 +0000
//
__int64 __fastcall sub_1000A2FD0(__int64 a1)
{
__int64 v2; // rdi
__int64 v3; // r14
__int64 v4; // r15
void *v5; // rdi
void *v6; // rdi
*(_QWORD *)a1 = off_100B6FB70;
v2 = *(_QWORD *)(a1 + 136);
if ( v2 )
cocos2d::CCObject::release(v2);
v3 = *(_QWORD *)(a1 + 168);
if ( v3 )
{
v4 = *(_QWORD *)(a1 + 176);
v5 = *(void **)(a1 + 168);
if ( v4 != v3 )
{
do
{
if ( (*(_BYTE *)(v4 - 24) & 1) != 0 )
operator delete(*(void **)(v4 - 8));
v4 -= 24;
}
while ( v4 != v3 );
v5 = *(void **)(a1 + 168);
}
*(_QWORD *)(a1 + 176) = v3;
operator delete(v5);
}
if ( (*(_BYTE *)(a1 + 112) & 1) != 0 )
operator delete(*(void **)(a1 + 128));
v6 = *(void **)(a1 + 88);
if ( v6 )
{
*(_QWORD *)(a1 + 96) = v6;
operator delete(v6);
}
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
operator delete(*(void **)(a1 + 80));
return sub_10047FF60(a1);
}