//
// sub_100667290 from 0x100667290 to 0x100667359 (201 bytes)
//
// 28 xrefs:
// > cocos2d::CCActionManager::deleteHashElement @ 0x100233890
// > cocos2d::CCScheduler::removeHashElement @ 0x100442087
// > cocos2d::CCParallaxNode::dCCParallaxNode @ 0x1004ae818
// > sub_1004AE840 @ 0x1004ae868
// > sub_1004AE890 @ 0x1004ae8b8
// > sub_10071F800 @ 0x10071f828
// > sub_10071F860 @ 0x10071f86d
// > sub_10071F890 @ 0x10071f8b8
// > sub_10071F8F0 @ 0x10071f91e
// > sub_10071F950 @ 0x10071f960
// > sub_10071F980 @ 0x10071f9ae
// > sub_10071F9E0 @ 0x10071fa18
// > sub_10071F9E0 @ 0x10071fa2e
// > sub_10071FA80 @ 0x10071fabe
// > sub_10071FA80 @ 0x10071fad4
// > sub_10071FA80 @ 0x10071fadc
// > sub_10071FB40 @ 0x10071fb57
// > sub_10071FB40 @ 0x10071fb5f
// > sub_10071FD00 @ 0x10071fd3e
// > sub_10071FD00 @ 0x10071fd54
// > sub_10071FED0 @ 0x10071ff42
// > sub_100720000 @ 0x100720018
// > sub_100720000 @ 0x100720027
// > sub_1007203F0 @ 0x100720407
// > sub_100720430 @ 0x100720447
// > sub_100720470 @ 0x100720487
// > sub_1007204B0 @ 0x1007204f2
// > sub_1007204B0 @ 0x100720516
//
// 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
//
void __fastcall sub_100667290(void **a1)
{
unsigned int *v1; // r14
__int64 v3; // rax
__int64 v4; // rcx
__int64 v5; // rdx
int v6; // esi
__int64 v7; // rdi
int v8; // eax
__int64 v9; // rcx
unsigned int v10; // eax
v1 = (unsigned int *)*a1;
if ( *a1 )
{
v3 = v1[2];
if ( v3 != 0xFFFFFFFFLL )
{
if ( (int)v3 > 0 )
{
v4 = *((_QWORD *)v1 + 2);
v5 = 0;
v6 = 0;
do
{
v7 = *(_QWORD *)(v4 + 8 * v5);
if ( v7 )
{
if ( v6 > 0 )
{
*(_QWORD *)(v4 - 8LL * v6 + 8 * v5) = v7;
*(_DWORD *)(v7 + 36) = v5 - v6;
}
}
else
{
++v6;
}
++v5;
}
while ( v3 != v5 );
}
v1[2] = -1;
}
v8 = *v1;
if ( *v1 )
{
do
{
v9 = *((_QWORD *)v1 + 2);
v10 = v8 - 1;
*v1 = v10;
cocos2d::CCObject::release(*(cocos2d::CCObject **)(v9 + 8LL * v10));
v8 = *v1;
}
while ( *v1 );
v1 = (unsigned int *)*a1;
}
free(*((void **)v1 + 2));
free(*a1);
*a1 = nullptr;
}
}