//
// sub_18009DD90 from 0x18009dd90 to 0x18009de45 (181 bytes)
//
// 4 xrefs:
// > cocos2d::CCArray::removeObjectsInArray @ 0x180007248
// > ??> @ 0x18013efec
// > ??> @ 0x18013effc
// > ??> @ 0x1801b74ac
//
// 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_18009DD90(__int64 a1, __int64 a2)
{
__int64 i; // rdi
__int64 v5; // rbx
_QWORD *v6; // rax
cocos2d::CCObject *v7; // rcx
for ( i = 0; (unsigned int)i < *(_DWORD *)a2; i = (unsigned int)(i + 1) )
{
v5 = 0;
v6 = *(_QWORD **)(a1 + 16);
if ( *(_DWORD *)a1 )
{
while ( *v6 != *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * i) )
{
v5 = (unsigned int)(v5 + 1);
++v6;
if ( (unsigned int)v5 >= *(_DWORD *)a1 )
goto LABEL_11;
}
if ( (_DWORD)v5 != -1 )
{
v7 = *(cocos2d::CCObject **)(8 * v5 + *(_QWORD *)(a1 + 16));
if ( v7 )
cocos2d::CCObject::release(v7);
if ( --*(_DWORD *)a1 != (_DWORD)v5 )
memmove(
(void *)(8 * v5 + *(_QWORD *)(a1 + 16)),
(const void *)(*(_QWORD *)(a1 + 16) + 8LL * (unsigned int)(v5 + 1)),
8LL * (unsigned int)(*(_DWORD *)a1 - v5));
}
}
LABEL_11:
;
}
}