//
// cocos2d::CCComponentContainer::removeAll from 0x1002b25f0 to 0x1002b27bb (459 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b0e6f0
//
// 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:28:02 +0000
//
__int64 __fastcall cocos2d::CCComponentContainer::removeAll(__int64 a1)
{
__int64 result; // rax
__int64 v3; // r14
__int64 v4; // rax
__int64 v5; // r15
__int64 v6; // rcx
__int64 v7; // rdx
__int64 v8; // rdi
__int64 v9; // rsi
_QWORD *v10; // rcx
__int64 v11; // rdi
_QWORD *v12; // rsi
__int64 *v13; // rcx
__int64 v14; // rdx
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rdx
result = *(_QWORD *)(a1 + 8);
if ( result )
{
v3 = *(_QWORD *)(result + 56);
if ( !v3 )
return cocos2d::CCNode::unscheduleUpdate(*(_QWORD *)(a1 + 16));
while ( 1 )
{
v4 = *(_QWORD *)(v3 + 280);
v5 = *(_QWORD *)(v3 + 288);
if ( v4 )
break;
v6 = *(_QWORD *)(a1 + 8);
if ( v5 )
goto LABEL_9;
free(**(void ***)(*(_QWORD *)(v6 + 56) + 272LL));
free(*(void **)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 56LL) + 272LL));
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 56LL) = 0;
LABEL_5:
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 264) + 96LL))(*(_QWORD *)(v3 + 264));
cocos2d::CCComponent::setOwner(*(_QWORD *)(v3 + 264), 0);
cocos2d::CCObject::release(*(_QWORD *)(v3 + 264));
sub_1002F83F0(v3);
operator delete((void *)v3);
v3 = v5;
if ( !v5 )
return cocos2d::CCNode::unscheduleUpdate(*(_QWORD *)(a1 + 16));
}
v6 = *(_QWORD *)(a1 + 8);
LABEL_9:
v7 = *(_QWORD *)(v6 + 56);
v8 = *(_QWORD *)(v7 + 272);
v9 = *(_QWORD *)(v8 + 32);
if ( v3 == *(_QWORD *)(v8 + 24) - v9 )
*(_QWORD *)(v8 + 24) = v9 + v4;
v10 = (_QWORD *)(v6 + 56);
v11 = *(_QWORD *)(v3 + 288);
v12 = (_QWORD *)(v9 + v4 + 16);
if ( !v4 )
{
v12 = v10;
v7 = *(_QWORD *)(v3 + 288);
}
*v12 = v11;
v13 = *(__int64 **)(v7 + 272);
if ( v11 )
*(_QWORD *)(v13[4] + v11 + 8) = v4;
v14 = *v13;
v15 = 16LL * (*(_DWORD *)(v3 + 324) & (unsigned int)(*((_DWORD *)v13 + 2) - 1));
--*(_DWORD *)(v14 + v15 + 8);
if ( *(_QWORD *)(v14 + v15) == v3 + 272 )
{
*(_QWORD *)(v15 + v14) = *(_QWORD *)(v3 + 304);
v16 = *(_QWORD *)(v3 + 296);
v17 = *(_QWORD *)(v3 + 304);
if ( !v16 )
goto LABEL_18;
}
else
{
v16 = *(_QWORD *)(v3 + 296);
v17 = *(_QWORD *)(v3 + 304);
if ( !v16 )
{
LABEL_18:
if ( v17 )
*(_QWORD *)(v17 + 24) = v16;
--*((_DWORD *)v13 + 4);
goto LABEL_5;
}
}
*(_QWORD *)(v16 + 32) = v17;
goto LABEL_18;
}
return result;
}