{"type": "func", "start": 6442788096, "end": 6442788373, "name": "cocos2d::CCLayer::onExit", "pseudocode": "// \n// cocos2d::CCLayer::onExit from 0x180052500 to 0x180052615 (277 bytes)\n// \n// 8 xrefs:\n// > cocos2d::CCMenu::onExit @ 0x18005b8a4\n// > <???> @ 0x1800f3308\n// > <???> @ 0x1800f37e8\n// > <???> @ 0x1800f3d40\n// > <???> @ 0x1800f42c8\n// > <???> @ 0x1800f48c0\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bc298\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:21:45 +0000\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::CCMouseDelegate *v7; // rbx\n  cocos2d::CCMouseDispatcher *v8; // rax\n  struct cocos2d::CCMouseDelegate *v9; // rbx\n  cocos2d::CCMouseDispatcher *v10; // rax\n  struct cocos2d::CCMouseDelegate *v11; // rbx\n  cocos2d::CCMouseDispatcher *v12; // rax\n\n  v2 = cocos2d::CCDirector::sharedDirector();\n  v3 = v2;\n  if ( *((_BYTE *)this + 360) )\n  {\n    v4 = (cocos2d::CCLayer *)((char *)this + 320);\n    if ( !this )\n      v4 = nullptr;\n    v5 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v2 + 144LL))(v2);\n    cocos2d::CCTouchDispatcher::removeDelegate(v5, v4);\n  }\n  if ( *((_BYTE *)this + 361) )\n  {\n    v6 = (cocos2d::CCAccelerometer *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v3 + 208LL))(v3);\n    cocos2d::CCAccelerometer::setDelegate(v6, nullptr);\n  }\n  if ( *((_BYTE *)this + 362) )\n  {\n    v7 = (cocos2d::CCLayer *)((char *)this + 336);\n    if ( !this )\n      v7 = nullptr;\n    v8 = (cocos2d::CCMouseDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v3 + 160LL))(v3);\n    cocos2d::CCMouseDispatcher::removeDelegate(v8, v7);\n  }\n  if ( *((_BYTE *)this + 363) )\n  {\n    v9 = (cocos2d::CCLayer *)((char *)this + 344);\n    if ( !this )\n      v9 = nullptr;\n    v10 = (cocos2d::CCMouseDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v3 + 176LL))(v3);\n    cocos2d::CCMouseDispatcher::removeDelegate(v10, v9);\n  }\n  if ( *((_BYTE *)this + 364) )\n  {\n    v11 = (cocos2d::CCLayer *)((char *)this + 352);\n    if ( !this )\n      v11 = nullptr;\n    v12 = (cocos2d::CCMouseDispatcher *)(*(__int64 (__fastcall **)(struct cocos2d::CCDirector *))(*(_QWORD *)v3 + 192LL))(v3);\n    cocos2d::CCMouseDispatcher::removeDelegate(v12, v11);\n  }\n  cocos2d::CCNode::onExit((cocos2d::CCScheduler **)this);\n}", "assembly": "; \n; cocos2d::CCLayer::onExit from 0x180052500 to 0x180052615 (277 bytes)\n; \n; 8 xrefs:\n; > cocos2d::CCMenu::onExit @ 0x18005b8a4\n; > <???> @ 0x1800f3308\n; > <???> @ 0x1800f37e8\n; > <???> @ 0x1800f3d40\n; > <???> @ 0x1800f42c8\n; > <???> @ 0x1800f48c0\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bc298\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:21:45 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180052500\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180052505\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18005250a\npush    rdi                                                            ; +0xf, 0x18005250f\nsub     rsp, 20h                                                       ; +0x10, 0x180052510\nmov     rdi, rcx                                                       ; +0x14, 0x180052514\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x17, 0x180052517\nxor     ebp, ebp                                                       ; +0x1c, 0x18005251c\nmov     rsi, rax                                                       ; +0x1e, 0x18005251e\ncmp     [rdi+168h], bpl                                                ; +0x21, 0x180052521\njz      short loc_180052550                                            ; +0x28, 0x180052528\nmov     r8, [rax]                                                      ; +0x2a, 0x18005252a\nlea     rbx, [rdi+140h]                                                ; +0x2d, 0x18005252d\ntest    rdi, rdi                                                       ; +0x34, 0x180052534\nmov     rcx, rax                                                       ; +0x37, 0x180052537\ncmovz   rbx, rbp                                                       ; +0x3a, 0x18005253a\ncall    qword ptr [r8+90h]                                             ; +0x3e, 0x18005253e\nmov     rcx, rax; this                                                 ; +0x45, 0x180052545\nmov     rdx, rbx; struct cocos2d::CCTouchDelegate *                    ; +0x48, 0x180052548\ncall    ?removeDelegate@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCTouchDelegate@2@@Z; cocos2d::CCTouchDispatcher::removeDelegate(cocos2d::CCTouchDelegate *) ; +0x4b, 0x18005254b\ncmp     [rdi+169h], bpl                                                ; +0x50, 0x180052550\njz      short loc_18005256F                                            ; +0x57, 0x180052557\nmov     rax, [rsi]                                                     ; +0x59, 0x180052559\nmov     rcx, rsi                                                       ; +0x5c, 0x18005255c\ncall    qword ptr [rax+0D0h]                                           ; +0x5f, 0x18005255f\nmov     rcx, rax; this                                                 ; +0x65, 0x180052565\nxor     edx, edx; struct cocos2d::CCAccelerometerDelegate *            ; +0x68, 0x180052568\ncall    ?setDelegate@CCAccelerometer@cocos2d@@QEAAXPEAVCCAccelerometerDelegate@2@@Z; cocos2d::CCAccelerometer::setDelegate(cocos2d::CCAccelerometerDelegate *) ; +0x6a, 0x18005256a\ncmp     [rdi+16Ah], bpl                                                ; +0x6f, 0x18005256f\njz      short loc_18005259D                                            ; +0x76, 0x180052576\nmov     rax, [rsi]                                                     ; +0x78, 0x180052578\nlea     rbx, [rdi+150h]                                                ; +0x7b, 0x18005257b\ntest    rdi, rdi                                                       ; +0x82, 0x180052582\nmov     rcx, rsi                                                       ; +0x85, 0x180052585\ncmovz   rbx, rbp                                                       ; +0x88, 0x180052588\ncall    qword ptr [rax+0A0h]                                           ; +0x8c, 0x18005258c\nmov     rcx, rax; this                                                 ; +0x92, 0x180052592\nmov     rdx, rbx; struct cocos2d::CCMouseDelegate *                    ; +0x95, 0x180052595\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0x98, 0x180052598\ncmp     [rdi+16Bh], bpl                                                ; +0x9d, 0x18005259d\njz      short loc_1800525CB                                            ; +0xa4, 0x1800525a4\nmov     rax, [rsi]                                                     ; +0xa6, 0x1800525a6\nlea     rbx, [rdi+158h]                                                ; +0xa9, 0x1800525a9\ntest    rdi, rdi                                                       ; +0xb0, 0x1800525b0\nmov     rcx, rsi                                                       ; +0xb3, 0x1800525b3\ncmovz   rbx, rbp                                                       ; +0xb6, 0x1800525b6\ncall    qword ptr [rax+0B0h]                                           ; +0xba, 0x1800525ba\nmov     rcx, rax; this                                                 ; +0xc0, 0x1800525c0\nmov     rdx, rbx; struct cocos2d::CCMouseDelegate *                    ; +0xc3, 0x1800525c3\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0xc6, 0x1800525c6\ncmp     [rdi+16Ch], bpl                                                ; +0xcb, 0x1800525cb\njz      short loc_1800525F9                                            ; +0xd2, 0x1800525d2\nmov     rax, [rsi]                                                     ; +0xd4, 0x1800525d4\nlea     rbx, [rdi+160h]                                                ; +0xd7, 0x1800525d7\ntest    rdi, rdi                                                       ; +0xde, 0x1800525de\nmov     rcx, rsi                                                       ; +0xe1, 0x1800525e1\ncmovz   rbx, rbp                                                       ; +0xe4, 0x1800525e4\ncall    qword ptr [rax+0C0h]                                           ; +0xe8, 0x1800525e8\nmov     rcx, rax; this                                                 ; +0xee, 0x1800525ee\nmov     rdx, rbx; struct cocos2d::CCMouseDelegate *                    ; +0xf1, 0x1800525f1\ncall    ?removeDelegate@CCMouseDispatcher@cocos2d@@QEAAXPEAVCCMouseDelegate@2@@Z; cocos2d::CCMouseDispatcher::removeDelegate(cocos2d::CCMouseDelegate *) ; +0xf4, 0x1800525f4\nmov     rcx, rdi; this                                                 ; +0xf9, 0x1800525f9\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xfc, 0x1800525fc\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x101, 0x180052601\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x106, 0x180052606\nadd     rsp, 20h                                                       ; +0x10b, 0x18005260b\npop     rdi                                                            ; +0x10f, 0x18005260f\njmp     ?onExit@CCNode@cocos2d@@UEAAXXZ; cocos2d::CCNode::onExit(void) ; +0x110, 0x180052610", "xrefs": ["cocos2d::CCMenu::onExit @ 0x18005b8a4", "<???> @ 0x1800f3308", "<???> @ 0x1800f37e8", "<???> @ 0x1800f3d40", "<???> @ 0x1800f42c8", "<???> @ 0x1800f48c0", "<???> @ 0x18014cf68", "<???> @ 0x1801bc298"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}