//
// cocos2d::CCComponentContainer::remove from 0x18009a400 to 0x18009a746 (838 bytes)
//
// 6 xrefs:
// > ??> @ 0x18010ac30
// > ??> @ 0x1801479ac
// > ??> @ 0x1801479c4
// > ??> @ 0x1801479d4
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c0bb8
//
// 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 11:22:11 +0000
//
bool __fastcall cocos2d::CCComponentContainer::remove(cocos2d::CCComponentContainer *this, const char *a2)
{
float v2; // xmm1_4
cocos2d::CCComponent *v3; // rax
__int64 v6; // r11
__int64 v7; // r10
__int64 v8; // rbx
int v9; // r8d
int v10; // edx
unsigned int v11; // r8d
unsigned int v12; // ecx
int v13; // edx
unsigned int v14; // r8d
unsigned int v15; // ecx
int v16; // edx
unsigned __int64 v17; // rax
__int64 v18; // r8
__int64 v19; // rbx
__int64 v20; // rcx
__int64 v21; // rax
cocos2d::CCComponent *v22; // rsi
__int64 v23; // r10
__int64 v24; // rdx
__int64 v25; // rcx
__int64 v26; // r10
__int64 v27; // rcx
__int64 v28; // rdx
__int64 v29; // rdx
__int64 v30; // r10
_QWORD *v31; // rax
__int64 v32; // rcx
__int64 v33; // rcx
__int64 v34; // rax
v3 = *((cocos2d::CCComponent **)this + 1);
if ( v3 )
{
v6 = *((_QWORD *)v3 + 7);
v7 = 0;
v8 = 0;
if ( v6 )
{
v9 = ((*((unsigned __int8 *)a2 + 5) + ((*((unsigned __int8 *)a2 + 6) + (*((unsigned __int8 *)a2 + 7) << 8)) << 8)) << 8)
+ *((unsigned __int8 *)a2 + 4)
- 1640531527;
v10 = (((*((unsigned __int8 *)a2 + 1) + ((*((unsigned __int8 *)a2 + 2) + (*((unsigned __int8 *)a2 + 3) << 8)) << 8)) << 8)
- v9
+ *(unsigned __int8 *)a2
- 1622558014)
^ 0x7F76D;
v11 = (v10 << 8) ^ (v9 - v10 + 17973513);
v12 = (v11 >> 13) ^ (-17973513 - v11 - v10);
v13 = (v12 >> 12) ^ (v10 - v12 - v11);
v14 = (v13 << 16) ^ (v11 - v12 - v13);
v15 = (v14 >> 5) ^ (v12 - v14 - v13);
v16 = (v15 >> 3) ^ (v13 - v15 - v14);
v17 = (v14 - v16 - v15) ^ (v16 << 10);
v18 = *(_QWORD *)(v6 + 272);
v19 = *(_QWORD *)(*(_QWORD *)v18
+ 16
* ((unsigned int)(*(_DWORD *)(v18 + 8) - 1) & ((v17 >> 15) ^ (v15 - (unsigned int)v17 - v16))));
if ( v19 )
{
v20 = *(_QWORD *)(v18 + 32);
v8 = v19 - v20;
if ( v8 )
{
while ( *(_DWORD *)(v8 + 320) != 8 || **(_QWORD **)(v8 + 312) != *(_QWORD *)a2 )
{
v21 = *(_QWORD *)(v8 + 304);
if ( !v21 )
goto LABEL_11;
v8 = v21 - v20;
if ( v21 == v20 )
goto LABEL_12;
}
v7 = *(_QWORD *)(v8 + 264);
}
}
else
{
LABEL_11:
v8 = 0;
}
}
LABEL_12:
v3 = (cocos2d::CCComponent *)_RTDynamicCast(
v7,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCComponent `RTTI Type Descriptor',
0);
v22 = v3;
if ( v3 )
{
(*(void (__fastcall **)(cocos2d::CCComponent *))(*(_QWORD *)v3 + 88LL))(v3);
cocos2d::CCComponent::setOwner(v22, nullptr);
v23 = *(_QWORD *)(v8 + 280);
if ( v23 || *(_QWORD *)(v8 + 288) )
{
v24 = *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 1) + 56LL) + 272LL);
v25 = *(_QWORD *)(v24 + 32);
if ( v8 == *(_QWORD *)(v24 + 24) - v25 )
*(_QWORD *)(v24 + 24) = v23 + v25;
v26 = *(_QWORD *)(v8 + 280);
v27 = *((_QWORD *)this + 1);
if ( v26 )
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v27 + 56) + 272LL) + 32LL) + v26 + 16) = *(_QWORD *)(v8 + 288);
else
*(_QWORD *)(v27 + 56) = *(_QWORD *)(v8 + 288);
v28 = *(_QWORD *)(v8 + 288);
if ( v28 )
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 1) + 56LL) + 272LL) + 32LL) + v28 + 8) = *(_QWORD *)(v8 + 280);
v29 = *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 1) + 56LL) + 272LL);
v30 = *(_DWORD *)(v8 + 324) & (unsigned int)(*(_DWORD *)(v29 + 8) - 1);
--*(_DWORD *)(16 * v30 + *(_QWORD *)v29 + 8);
v31 = *(_QWORD **)(*(_QWORD *)(*((_QWORD *)this + 1) + 56LL) + 272LL);
if ( *(_QWORD *)(16 * v30 + *v31) == v8 + 272 )
*(_QWORD *)(*v31 + 16 * v30) = *(_QWORD *)(v8 + 304);
v32 = *(_QWORD *)(v8 + 296);
if ( v32 )
*(_QWORD *)(v32 + 32) = *(_QWORD *)(v8 + 304);
v33 = *(_QWORD *)(v8 + 304);
if ( v33 )
*(_QWORD *)(v33 + 24) = *(_QWORD *)(v8 + 296);
v34 = *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 1) + 56LL) + 272LL);
--*(_DWORD *)(v34 + 16);
}
else
{
free(**(void ***)(*(_QWORD *)(*((_QWORD *)this + 1) + 56LL) + 272LL));
free(*(void **)(*(_QWORD *)(*((_QWORD *)this + 1) + 56LL) + 272LL));
*(_QWORD *)(*((_QWORD *)this + 1) + 56LL) = 0;
}
cocos2d::CCObject::release(*(cocos2d::CCObject **)(v8 + 264));
cocos2d::CCNode::updateTweenActionInt((cocos2d::CCNode *)v8, v2);
j_j_free_0((void *)v8);
LOBYTE(v3) = 1;
}
}
return (char)v3;
}