//
// cocos2d::CCNode::removeAllChildrenWithCleanup from 0x1800045d0 to 0x1800046ae (222 bytes)
//
// 83 xrefs:
// > cocos2d::CCParticleBatchNode::removeAllChildrenWithCleanup @ 0x180061993
// > cocos2d::CCSprite::removeAllChildrenWithCleanup @ 0x18008c09c
// > cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup @ 0x18008edd3
// > cocos2d::CCParallaxNode::removeAllChildrenWithCleanup @ 0x1800aacdc
// > ??> @ 0x1800e5610
// > ??> @ 0x1800e5c70
// > ??> @ 0x1800e5fe0
// > ??> @ 0x1800e6940
// > ??> @ 0x1800e6e48
// > ??> @ 0x1800eb610
// > ??> @ 0x1800ed120
// > ??> @ 0x1800ed5e0
// > ??> @ 0x1800edb18
// > ??> @ 0x1800ee080
// > ??> @ 0x1800ee658
// > ??> @ 0x1800eeb18
// > ??> @ 0x1800eeea0
// > ??> @ 0x1800ef220
// > ??> @ 0x1800ef5a8
// > ??> @ 0x1800ef928
// > ??> @ 0x1800efca8
// > ??> @ 0x1800f0048
// > ??> @ 0x1800f03e8
// > ??> @ 0x1800f0788
// > ??> @ 0x1800f0b28
// > ??> @ 0x1800f0ec8
// > ??> @ 0x1800f1268
// > ??> @ 0x1800f1608
// > ??> @ 0x1800f19a8
// > ??> @ 0x1800f1d38
// > ??> @ 0x1800f20c0
// > ??> @ 0x1800f2448
// > ??> @ 0x1800f27d0
// > ??> @ 0x1800f2b58
// > ??> @ 0x1800f2ee0
// > ??> @ 0x1800f3268
// > ??> @ 0x1800f35f0
// > ??> @ 0x1800f3970
// > ??> @ 0x1800f3d00
// > ??> @ 0x1800f4098
// > ??> @ 0x1800f4430
// > ??> @ 0x1800f47c8
// > ??> @ 0x1800f4b60
// > ??> @ 0x1800f4ef8
// > ??> @ 0x1800f52a8
// > ??> @ 0x1800f5630
// > ??> @ 0x1800f59c0
// > ??> @ 0x1800f5d50
// > ??> @ 0x1800f60e0
// > ??> @ 0x1800f6470
// > ??> @ 0x1800f6800
// > ??> @ 0x1800f6b90
// > ??> @ 0x1800f6f28
// > ??> @ 0x1800f7490
// > ??> @ 0x1800f78b8
// > ??> @ 0x1800f7d00
// > ??> @ 0x1800f8148
// > ??> @ 0x1800f8590
// > ??> @ 0x1800f89f0
// > ??> @ 0x1800f8e50
// > ??> @ 0x1800f92a0
// > ??> @ 0x1800f9668
// > ??> @ 0x1800f9a80
// > ??> @ 0x1800f9e90
// > ??> @ 0x1800fa930
// > ??> @ 0x1800fafa0
// > ??> @ 0x1800fb610
// > ??> @ 0x1800fbc80
// > ??> @ 0x1800fc2f0
// > ??> @ 0x1800fc960
// > ??> @ 0x1800fcfd0
// > ??> @ 0x1800fd640
// > ??> @ 0x1800fdcb0
// > ??> @ 0x1800fe320
// > ??> @ 0x1800fe990
// > ??> @ 0x1800ff1d8
// > ??> @ 0x1800ffc78
// > ??> @ 0x1801057c0
// > ??> @ 0x180106080
// > ??> @ 0x180130d2c
// > ??> @ 0x180130d84
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ad4bc
//
// 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 cocos2d::CCNode::removeAllChildrenWithCleanup(cocos2d::CCNode *this, char a2)
{
cocos2d::CCArray *m_pChildren; // rcx
cocos2d::CCArray *v5; // rax
cocos2d::ccArray *data; // rdi
__int64 num; // rax
cocos2d::CCObject **arr; // rdi
cocos2d::CCObject **i; // r14
cocos2d::CCObject *v10; // rbx
m_pChildren = this->m_pChildren;
if ( m_pChildren && cocos2d::CCArray::count(m_pChildren) )
{
v5 = this->m_pChildren;
if ( v5 )
{
data = v5->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v10 = *arr;
if ( !*arr )
break;
if ( this->m_bRunning )
{
((void (__fastcall *)(cocos2d::CCObject *))v10->__vftable[9].getTag)(*arr);
((void (__fastcall *)(cocos2d::CCObject *))v10->__vftable[9].canEncode)(v10);
}
if ( a2 )
((void (__fastcall *)(cocos2d::CCObject *))v10->__vftable[9].setTag)(v10);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v10->__vftable[6].canEncode)(v10, 0);
}
}
}
cocos2d::CCArray::removeAllObjects(this->m_pChildren);
}
}