//
// cocos2d::CCLayer::onExit from 0x180052500 to 0x180052615 (277 bytes)
//
// 8 xrefs:
// > cocos2d::CCMenu::onExit @ 0x18005b8a4
// > ??> @ 0x1800f3308
// > ??> @ 0x1800f37e8
// > ??> @ 0x1800f3d40
// > ??> @ 0x1800f42c8
// > ??> @ 0x1800f48c0
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bc298
//
// 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:21:45 +0000
//
void __fastcall cocos2d::CCLayer::onExit(cocos2d::CCLayer *this)
{
struct cocos2d::CCDirector *v2; // rax
struct cocos2d::CCDirector *v3; // rsi
struct cocos2d::CCTouchDelegate *v4; // rbx
cocos2d::CCTouchDispatcher *v5; // rax
cocos2d::CCAccelerometer *v6; // rax
struct cocos2d::CCMouseDelegate *v7; // rbx
cocos2d::CCMouseDispatcher *v8; // rax
struct cocos2d::CCMouseDelegate *v9; // rbx
cocos2d::CCMouseDispatcher *v10; // rax
struct cocos2d::CCMouseDelegate *v11; // rbx
cocos2d::CCMouseDispatcher *v12; // rax
v2 = cocos2d::CCDirector::sharedDirector();
v3 = v2;
if ( *((_BYTE *)this + 360) )
{
v4 = (cocos2d::CCLayer *)((char *)this + 320);
if ( !this )
v4 = nullptr;
v5 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v2 + 144LL))(v2);
cocos2d::CCTouchDispatcher::removeDelegate(v5, v4);
}
if ( *((_BYTE *)this + 361) )
{
v6 = (cocos2d::CCAccelerometer *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v3 + 208LL))(v3);
cocos2d::CCAccelerometer::setDelegate(v6, nullptr);
}
if ( *((_BYTE *)this + 362) )
{
v7 = (cocos2d::CCLayer *)((char *)this + 336);
if ( !this )
v7 = nullptr;
v8 = (cocos2d::CCMouseDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v3 + 160LL))(v3);
cocos2d::CCMouseDispatcher::removeDelegate(v8, v7);
}
if ( *((_BYTE *)this + 363) )
{
v9 = (cocos2d::CCLayer *)((char *)this + 344);
if ( !this )
v9 = nullptr;
v10 = (cocos2d::CCMouseDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v3 + 176LL))(v3);
cocos2d::CCMouseDispatcher::removeDelegate(v10, v9);
}
if ( *((_BYTE *)this + 364) )
{
v11 = (cocos2d::CCLayer *)((char *)this + 352);
if ( !this )
v11 = nullptr;
v12 = (cocos2d::CCMouseDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v3 + 192LL))(v3);
cocos2d::CCMouseDispatcher::removeDelegate(v12, v11);
}
cocos2d::CCNode::onExit((cocos2d::CCScheduler **)this);
}