//
// sub_100666ED0 from 0x100666ed0 to 0x100666f5b (139 bytes)
//
// 5 xrefs:
// > sub_100666F70 @ 0x100666f75
// > sub_100666F80 @ 0x100666f89
// > sub_100669490 @ 0x1006694c8
// > sub_1006694E0 @ 0x100669518
// > sub_100669530 @ 0x100669562
//
// 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:34:58 +0000
//
__int64 *__fastcall sub_100666ED0(__int64 a1)
{
_DWORD *v2; // rdi
_DWORD *v3; // rdi
_DWORD *v4; // rdi
_DWORD *v5; // rdi
void *v6; // rdi
*(_QWORD *)a1 = off_100B832C8;
*(_QWORD *)(a1 + 56) = &off_100B83338;
v2 = *(_DWORD **)(a1 + 64);
if ( v2 )
cocos2d::CCObject::release(v2);
v3 = *(_DWORD **)(a1 + 72);
if ( v3 )
cocos2d::CCObject::release(v3);
v4 = *(_DWORD **)(a1 + 80);
if ( v4 )
cocos2d::CCObject::release(v4);
v5 = *(_DWORD **)(a1 + 88);
if ( v5 )
cocos2d::CCObject::release(v5);
v6 = *(void **)(a1 + 144);
if ( v6 )
{
*(_QWORD *)(a1 + 152) = v6;
operator delete(v6);
}
if ( (*(_BYTE *)(a1 + 104) & 1) != 0 )
operator delete(*(void **)(a1 + 120));
return sub_10047FF60(a1);
}