{"type": "func", "start": 6442780384, "end": 6442780661, "name": "cocos2d::CCLayer::onExit", "pseudocode": "// \n// cocos2d::CCLayer::onExit from 0x1800506e0 to 0x1800507f5 (277 bytes)\n// \n// 8 xrefs:\n// > cocos2d::CCMenu::onExit @ 0x180059884\n// > <???> @ 0x1800ed1a8\n// > <???> @ 0x1800ed668\n// > <???> @ 0x1800edba0\n// > <???> @ 0x1800ee108\n// > <???> @ 0x1800ee6e0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b2004\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall cocos2d::CCLayer::onExit(cocos2d::CCLayer *this)\n{\n  struct cocos2d::CCDirector *v2; // rax\n  struct cocos2d::CCDirector *v3; // rsi\n  struct cocos2d::CCTouchDelegate *v4; // rbx\n  cocos2d::CCTouchDispatcher *v5; // rax\n  cocos2d::CCAccelerometer *v6; // rax\n  struct cocos2d::CCObject *v7; // rbx\n  cocos2d::CCMouseDispatcher *v8; // rax\n  struct cocos2d::CCObject *v9; // rbx\n  cocos2d::CCMouseDispatcher *v10; // rax\n  struct cocos2d::CCObject *v11; // rbx\n  cocos2d::CCMouseDispatcher *v12; // rax\n\n  v2 = cocos2d::CCDirector::sharedDirector();\n  v3 = v2;\n  if ( this->m_bTouchEnabled )\n  {\n    v4 = &this->cocos2d::CCTouchDelegate;\n    if ( !this )\n      v4 = nullptr;\n    v5 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v2->getTouchDispatcher)(v2);\n    cocos2d::CCTouchDispatcher::removeDelegate(v5, v4);\n  }\n  if ( this->m_bAccelerometerEnabled )\n  {\n    v6 = (cocos2d::CCAccelerometer *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getAccelerometer)(v3);\n    cocos2d::CCAccelerometer::setDelegate(v6, nullptr);\n  }\n  if ( this->m_bKeypadEnabled )\n  {\n    v7 = (struct cocos2d::CCObject *)&this->cocos2d::CCKeypadDelegate;\n    if ( !this )\n      v7 = nullptr;\n    v8 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getKeypadDispatcher)(v3);\n    cocos2d::CCMouseDispatcher::removeDelegate(v8, v7);\n  }\n  if ( this->m_bKeyboardEnabled )\n  {\n    v9 = (struct cocos2d::CCObject *)&this->cocos2d::CCKeyboardDelegate;\n    if ( !this )\n      v9 = nullptr;\n    v10 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getKeyboardDispatcher)(v3);\n    cocos2d::CCMouseDispatcher::removeDelegate(v10, v9);\n  }\n  if ( this->m_bMouseEnabled )\n  {\n    v11 = (struct cocos2d::CCObject *)&this->cocos2d::CCMouseDelegate;\n    if ( !this )\n      v11 = nullptr;\n    v12 = (cocos2d::CCMouseDispatcher *)((__int64 (__fastcall *)(struct cocos2d::CCDirector *))v3->getMouseDispatcher)(v3);\n    cocos2d::CCMouseDispatcher::removeDelegate(v12, v11);\n  }\n  cocos2d::CCNode::onExit(this);\n}", "assembly": "; \n; cocos2d::CCLayer::onExit from 0x1800506e0 to 0x1800507f5 (277 bytes)\n; \n; 8 xrefs:\n; > cocos2d::CCMenu::onExit @ 0x180059884\n; > <???> @ 0x1800ed1a8\n; > <???> @ 0x1800ed668\n; > <???> @ 0x1800edba0\n; > <???> @ 0x1800ee108\n; > <???> @ 0x1800ee6e0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b2004\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800506e0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800506e5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800506ea\npush    rdi                                                            ; +0xf, 0x1800506ef\nsub     rsp, 20h                                                       ; +0x10, 0x1800506f0\nmov     rdi, rcx                                                       ; +0x14, 0x1800506f4\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x17, 0x1800506f7\nxor     ebp, ebp                                                       ; +0x1c, 0x1800506fc\nmov     rsi, rax                                                       ; +0x1e, 0x1800506fe\ncmp     [rdi+168h], bpl                                                ; +0x21, 0x180050701\njz      short loc_180050730                                            ; +0x28, 0x180050708\nmov     r8, [rax]                                                      ; +0x2a, 0x18005070a\nlea     rbx, [rdi+140h]                                                ; +0x2d, 0x18005070d\ntest    rdi, rdi                                                       ; +0x34, 0x180050714\nmov     rcx, rax                                                       ; +0x37, 0x180050717\ncmovz   rbx, rbp                                                       ; +0x3a, 0x18005071a\ncall    qword ptr [r8+90h]                                             ; +0x3e, 0x18005071e\nmov     rcx, rax; this                                                 ; +0x45, 0x180050725\nmov     rdx, rbx; struct cocos2d::CCTouchDelegate *                    ; +0x48, 0x180050728\ncall    ?removeDelegate@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCTouchDelegate@2@@Z; cocos2d::CCTouchDispatcher::removeDelegate(cocos2d::CCTouchDelegate *) ; +0x4b, 0x18005072b\ncmp     [rdi+169h], bpl                                                ; +0x50, 0x180050730\njz      short loc_18005074F                                            ; +0x57, 0x180050737\nmov     rax, [rsi]                                                     ; +0x59, 0x180050739\nmov     rcx, rsi                                                       ; +0x5c, 0x18005073c\ncall    qword ptr [rax+0D0h]                                           ; +0x5f, 0x18005073f\nmov     rcx, rax; this                                                 ; +0x65, 0x180050745\nxor     edx, edx; struct cocos2d::CCAccelerometerDelegate *            ; +0x68, 0x180050748\ncall    ?setDelegate@CCAccelerometer@cocos2d@@QEAAXPEAVCCAccelerometerDelegate@2@@Z; cocos2d::CCAccelerometer::setDelegate(cocos2d::CCAccelerometerDelegate *) ; +0x6a, 0x18005074a\ncmp     [rdi+16Ah], bpl                                                ; +0x6f, 0x18005074f\njz      short loc_18005077D                                            ; +0x76, 0x180050756\nmov     rax, [rsi]                                                     ; +0x78, 0x180050758\nlea     rbx, [rdi+150h]                                                ; +0x7b, 0x18005075b\ntest    rdi, rdi                                                       ; +0x82, 0x180050762\nmov     rcx, rsi                                                       ; +0x85, 0x180050765\ncmovz   rbx, rbp                                                       ; +0x88, 0x180050768\ncall    qword ptr [rax+0A0h]                                           ; +0x8c, 0x18005076c\nmov     rcx, rax; this                                                 ; +0x92, 0x180050772\nmov     rdx, rbx; struct cocos2d::CCMouseDelegate *                    ; +0x95, 0x180050775\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0x98, 0x180050778\ncmp     [rdi+16Bh], bpl                                                ; +0x9d, 0x18005077d\njz      short loc_1800507AB                                            ; +0xa4, 0x180050784\nmov     rax, [rsi]                                                     ; +0xa6, 0x180050786\nlea     rbx, [rdi+158h]                                                ; +0xa9, 0x180050789\ntest    rdi, rdi                                                       ; +0xb0, 0x180050790\nmov     rcx, rsi                                                       ; +0xb3, 0x180050793\ncmovz   rbx, rbp                                                       ; +0xb6, 0x180050796\ncall    qword ptr [rax+0B0h]                                           ; +0xba, 0x18005079a\nmov     rcx, rax; this                                                 ; +0xc0, 0x1800507a0\nmov     rdx, rbx; struct cocos2d::CCMouseDelegate *                    ; +0xc3, 0x1800507a3\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0xc6, 0x1800507a6\ncmp     [rdi+16Ch], bpl                                                ; +0xcb, 0x1800507ab\njz      short loc_1800507D9                                            ; +0xd2, 0x1800507b2\nmov     rax, [rsi]                                                     ; +0xd4, 0x1800507b4\nlea     rbx, [rdi+160h]                                                ; +0xd7, 0x1800507b7\ntest    rdi, rdi                                                       ; +0xde, 0x1800507be\nmov     rcx, rsi                                                       ; +0xe1, 0x1800507c1\ncmovz   rbx, rbp                                                       ; +0xe4, 0x1800507c4\ncall    qword ptr [rax+0C0h]                                           ; +0xe8, 0x1800507c8\nmov     rcx, rax; this                                                 ; +0xee, 0x1800507ce\nmov     rdx, rbx; struct cocos2d::CCMouseDelegate *                    ; +0xf1, 0x1800507d1\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0xf4, 0x1800507d4\nmov     rcx, rdi; this                                                 ; +0xf9, 0x1800507d9\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xfc, 0x1800507dc\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x101, 0x1800507e1\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x106, 0x1800507e6\nadd     rsp, 20h                                                       ; +0x10b, 0x1800507eb\npop     rdi                                                            ; +0x10f, 0x1800507ef\njmp     ?onExit@CCNode@cocos2d@@UEAAXXZ; cocos2d::CCNode::onExit(void) ; +0x110, 0x1800507f0", "xrefs": ["cocos2d::CCMenu::onExit @ 0x180059884", "<???> @ 0x1800ed1a8", "<???> @ 0x1800ed668", "<???> @ 0x1800edba0", "<???> @ 0x1800ee108", "<???> @ 0x1800ee6e0", "<???> @ 0x1801438a8", "<???> @ 0x1801b2004"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}