//
// sub_100666AD0 from 0x100666ad0 to 0x100666b4d (125 bytes)
//
// 2 xrefs:
// > sub_100666B60 @ 0x100666b65
// > sub_100666B70 @ 0x100666b79
//
// 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_100666AD0(__int64 a1)
{
_DWORD *v2; // rdi
*(_QWORD *)a1 = off_100B831A8;
v2 = *(_DWORD **)(a1 + 152);
if ( v2 )
cocos2d::CCObject::release(v2);
*(_QWORD *)a1 = off_100B83148;
if ( (*(_BYTE *)(a1 + 128) & 1) == 0 )
{
if ( (*(_BYTE *)(a1 + 104) & 1) == 0 )
goto LABEL_5;
LABEL_9:
operator delete(*(void **)(a1 + 120));
if ( (*(_BYTE *)(a1 + 80) & 1) == 0 )
return sub_10047FF60(a1);
goto LABEL_6;
}
operator delete(*(void **)(a1 + 144));
if ( (*(_BYTE *)(a1 + 104) & 1) != 0 )
goto LABEL_9;
LABEL_5:
if ( (*(_BYTE *)(a1 + 80) & 1) != 0 )
LABEL_6:
operator delete(*(void **)(a1 + 96));
return sub_10047FF60(a1);
}