{"type": "func", "start": 5372371616, "end": 5372371833, "name": "PauseLayer::onNormalMode", "pseudocode": "// \n// PauseLayer::onNormalMode from 0x14037e2a0 to 0x14037e379 (217 bytes)\n// \n// 4 xrefs:\n// > PauseLayer::keyDown @ 0x14037edb6\n// > PauseLayer::customSetup @ 0x14037cd25\n// > <???> @ 0x1406d5d74\n// > <???> @ 0x1406d5d80\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\n// Hidden C++ exception states: #wind=4\nvoid PauseLayer::onNormalMode(PauseLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v3; // rcx\n  __int64 v4; // rcx\n  __int64 v5; // rax\n  cocos2d::CCTouchDispatcher *v6; // rax\n  __int64 v7; // rcx\n  void *v8; // [rsp+30h] [rbp+8h]\n  void *v9; // [rsp+30h] [rbp+8h]\n\n  v3 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v8 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v8);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = qword_1406C2ED8;\n  }\n  PlayLayer::togglePracticeMode(*(PlayLayer **)(v3 + 520), 0);\n  if ( a1->m_forcePrioRegistered )\n  {\n    a1->m_forcePrioRegistered = 0;\n    v5 = cocos2d::CCDirector::sharedDirector(v4);\n    v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1);\n  }\n  v7 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v9 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v9);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v7 = qword_1406C2ED8;\n  }\n  PlayLayer::resume(*(PlayLayer **)(v7 + 520));\n  a1->removeMeAndCleanup(a1);\n}", "assembly": "; \n; PauseLayer::onNormalMode from 0x14037e2a0 to 0x14037e379 (217 bytes)\n; \n; 4 xrefs:\n; > PauseLayer::keyDown @ 0x14037edb6\n; > PauseLayer::customSetup @ 0x14037cd25\n; > <???> @ 0x1406d5d74\n; > <???> @ 0x1406d5d80\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\npush    rbx                                                            ; +0x0, 0x14037e2a0\nsub     rsp, 20h                                                       ; +0x2, 0x14037e2a2\nmov     rbx, rcx                                                       ; +0x6, 0x14037e2a6\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x9, 0x14037e2a9\ntest    rcx, rcx                                                       ; +0x10, 0x14037e2b0\njnz     short loc_14037E2E4                                            ; +0x13, 0x14037e2b3\nmov     ecx, 668h; Size                                                ; +0x15, 0x14037e2b5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1a, 0x14037e2ba\nmov     [rsp+28h+arg_0], rax                                           ; +0x1f, 0x14037e2bf\nmov     rcx, rax                                                       ; +0x24, 0x14037e2c4\ncall    sub_14017AB00                                                  ; +0x27, 0x14037e2c7\nnop                                                                    ; +0x2c, 0x14037e2cc\nmov     cs:qword_1406C2ED8, rax                                        ; +0x2d, 0x14037e2cd\nmov     rdx, [rax]                                                     ; +0x34, 0x14037e2d4\nmov     rcx, rax                                                       ; +0x37, 0x14037e2d7\ncall    qword ptr [rdx+48h]                                            ; +0x3a, 0x14037e2da\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x3d, 0x14037e2dd\nxor     edx, edx                                                       ; +0x44, 0x14037e2e4\nmov     rcx, [rcx+208h]                                                ; +0x46, 0x14037e2e6\ncall    PlayLayer__togglePracticeMode                                  ; +0x4d, 0x14037e2ed\ncmp     byte ptr [rbx+221h], 0                                         ; +0x52, 0x14037e2f2\njz      short loc_14037E320                                            ; +0x59, 0x14037e2f9\nmov     byte ptr [rbx+221h], 0                                         ; +0x5b, 0x14037e2fb\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x62, 0x14037e302\nmov     rdx, [rax]                                                     ; +0x68, 0x14037e308\nmov     rcx, rax                                                       ; +0x6b, 0x14037e30b\ncall    qword ptr [rdx+90h]                                            ; +0x6e, 0x14037e30e\nmov     rcx, rax                                                       ; +0x74, 0x14037e314\nmov     rdx, rbx                                                       ; +0x77, 0x14037e317\ncall    cs:?unregisterForcePrio@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCTouchDispatcher::unregisterForcePrio(cocos2d::CCObject *) ; +0x7a, 0x14037e31a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x80, 0x14037e320\ntest    rcx, rcx                                                       ; +0x87, 0x14037e327\njnz     short loc_14037E35B                                            ; +0x8a, 0x14037e32a\nmov     ecx, 668h; Size                                                ; +0x8c, 0x14037e32c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x91, 0x14037e331\nmov     [rsp+28h+arg_0], rax                                           ; +0x96, 0x14037e336\nmov     rcx, rax                                                       ; +0x9b, 0x14037e33b\ncall    sub_14017AB00                                                  ; +0x9e, 0x14037e33e\nnop                                                                    ; +0xa3, 0x14037e343\nmov     cs:qword_1406C2ED8, rax                                        ; +0xa4, 0x14037e344\nmov     rdx, [rax]                                                     ; +0xab, 0x14037e34b\nmov     rcx, rax                                                       ; +0xae, 0x14037e34e\ncall    qword ptr [rdx+48h]                                            ; +0xb1, 0x14037e351\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xb4, 0x14037e354\nmov     rcx, [rcx+208h]                                                ; +0xbb, 0x14037e35b\ncall    PlayLayer__resume                                              ; +0xc2, 0x14037e362\nmov     rax, [rbx]                                                     ; +0xc7, 0x14037e367\nmov     rcx, rbx                                                       ; +0xca, 0x14037e36a\nadd     rsp, 20h                                                       ; +0xcd, 0x14037e36d\npop     rbx                                                            ; +0xd1, 0x14037e371\njmp     qword ptr [rax+200h]                                           ; +0xd2, 0x14037e372", "xrefs": ["PauseLayer::keyDown @ 0x14037edb6", "PauseLayer::customSetup @ 0x14037cd25", "<???> @ 0x1406d5d74", "<???> @ 0x1406d5d80"], "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"}