//
// cocos2d::CCNode::cleanup from 0x180002d80 to 0x180002e18 (152 bytes)
//
// 54 xrefs:
// > cocos2d::CCTransitionScene::cleanup @ 0x180052cb9
// > ??> @ 0x1800e56a8
// > ??> @ 0x1800e5d08
// > ??> @ 0x1800e6078
// > ??> @ 0x1800e69d8
// > ??> @ 0x1800e6ee0
// > ??> @ 0x1800eb6a8
// > ??> @ 0x1800ebb48
// > ??> @ 0x1800ec020
// > ??> @ 0x1800ec548
// > ??> @ 0x1800ecba0
// > ??> @ 0x1800ed1b8
// > ??> @ 0x1800ed678
// > ??> @ 0x1800edbb0
// > ??> @ 0x1800ee118
// > ??> @ 0x1800ee6f0
// > ??> @ 0x1800eebb0
// > ??> @ 0x1800f6fc0
// > ??> @ 0x1800f7528
// > ??> @ 0x1800f7950
// > ??> @ 0x1800f7d98
// > ??> @ 0x1800f81e0
// > ??> @ 0x1800f8628
// > ??> @ 0x1800f8a88
// > ??> @ 0x1800f8ee8
// > ??> @ 0x1800f9338
// > ??> @ 0x1800f9700
// > ??> @ 0x1800f9b18
// > ??> @ 0x1800f9f28
// > ??> @ 0x1800fa358
// > ??> @ 0x1800fa9c8
// > ??> @ 0x1800fb038
// > ??> @ 0x1800fb6a8
// > ??> @ 0x1800fbd18
// > ??> @ 0x1800fc388
// > ??> @ 0x1800fc9f8
// > ??> @ 0x1800fd068
// > ??> @ 0x1800fd6d8
// > ??> @ 0x1800fdd48
// > ??> @ 0x1800fe3b8
// > ??> @ 0x1800fea28
// > ??> @ 0x1800ff270
// > ??> @ 0x1800ffd10
// > ??> @ 0x180103a58
// > ??> @ 0x180103f48
// > ??> @ 0x180105480
// > ??> @ 0x180105858
// > ??> @ 0x180105cb0
// > ??> @ 0x180106118
// > ??> @ 0x180106a50
// > ??> @ 0x180130f64
// > ??> @ 0x180130f74
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ad204
//
// 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::cleanup(cocos2d::CCNode *this)
{
struct cocos2d::CCScriptEngineManager *v2; // rax
cocos2d::CCArray *m_pChildren; // rax
cocos2d::ccArray *data; // rbx
__int64 num; // rax
cocos2d::CCObject **arr; // rbx
cocos2d::CCObject **i; // rdi
cocos2d::CCActionManager::removeAllActionsFromTarget(this->m_pActionManager, this);
cocos2d::CCScheduler::unscheduleAllForTarget(this->m_pScheduler, this);
if ( this->m_eScriptType )
{
v2 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_QWORD, cocos2d::CCNode *, __int64))(**(_QWORD **)v2 + 64LL))(*(_QWORD *)v2, this, 4);
}
m_pChildren = this->m_pChildren;
if ( m_pChildren )
{
data = m_pChildren->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
if ( !*arr )
break;
((void (__fastcall *)(cocos2d::CCObject *))(*arr)->__vftable[9].setTag)(*arr);
}
}
}
}