//
// sub_1005F68C0 from 0x1005f68c0 to 0x1005f6975 (181 bytes)
//
// 2 xrefs:
// > sub_1005F6980 @ 0x1005f6985
// > sub_1005F6990 @ 0x1005f6999
//
// 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
//
__int64 __fastcall sub_1005F68C0(__int64 a1)
{
cocos2d::CCObject *v2; // rdi
void **v3; // r14
void *v4; // rdi
void **v6; // r15
*(_QWORD *)a1 = off_10097BEC0;
qword_1009A3258 = 0;
v2 = *(cocos2d::CCObject **)(a1 + 352);
if ( v2 )
cocos2d::CCObject::release(v2);
v3 = *(void ***)(a1 + 384);
if ( v3 )
{
do
{
v6 = (void **)*v3;
if ( ((_BYTE)v3[3] & 1) != 0 )
operator delete(v3[5]);
operator delete(v3);
v3 = v6;
}
while ( v6 );
}
v4 = *(void **)(a1 + 368);
*(_QWORD *)(a1 + 368) = 0;
if ( v4 )
operator delete(v4);
*(_QWORD *)a1 = off_100947CD0;
if ( (*(_BYTE *)(a1 + 320) & 1) != 0 )
operator delete(*(void **)(a1 + 336));
return cocos2d::CCNode::dCCNode(a1);
}