{"type": "func", "start": 5372373952, "end": 5372374274, "name": "PauseLayer::onQuit", "pseudocode": "// \n// PauseLayer::onQuit from 0x14037ebc0 to 0x14037ed02 (322 bytes)\n// \n// 3 xrefs:\n// > PauseLayer::tryQuit @ 0x14037eb4b\n// > PauseLayer::FLAlert_Clicked @ 0x14037eba4\n// > <???> @ 0x1406d5dec\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=3\nvoid PauseLayer::onQuit(PauseLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v3; // rax\n  cocos2d::CCTouchDispatcher *v4; // rax\n  __int64 v5; // rcx\n  __int64 v6; // r8\n  __int64 v7; // r9\n  int v8; // ecx\n  __int128 v9; // [rsp+30h] [rbp-28h] BYREF\n  __int64 v10; // [rsp+40h] [rbp-18h]\n  __int64 v11; // [rsp+48h] [rbp-10h]\n  FMODAudioEngine *v12; // [rsp+60h] [rbp+8h]\n  void *v13; // [rsp+68h] [rbp+10h]\n\n  if ( a1->m_forcePrioRegistered )\n  {\n    a1->m_forcePrioRegistered = 0;\n    v3 = cocos2d::CCDirector::sharedDirector(a1);\n    v4 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 144LL))(v3);\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, a1);\n  }\n  cocos2d::CCNode::unscheduleAllSelectors(a1);\n  v5 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v13 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = qword_1406C2ED8;\n  }\n  PlayLayer::onQuit(*(PlayLayer **)(v5 + 520));\n  v9 = 0;\n  *(_QWORD *)&v9 = sub_14003AA10(0x20u);\n  v10 = 16;\n  v11 = 31;\n  strcpy((char *)v9, \"quitSound_01.ogg\");\n  v8 = qword_1406C2E88;\n  if ( !qword_1406C2E88 )\n  {\n    v12 = (FMODAudioEngine *)operator new(0x888u);\n    qword_1406C2E88 = (__int64)FMODAudioEngine::FMODAudioEngine(v12);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2E88 + 72LL))(qword_1406C2E88);\n    v8 = qword_1406C2E88;\n  }\n  FMODAudioEngine::playEffect(v8, (__int64)&v9, v6, v7, 1060320051);\n}", "assembly": "; \n; PauseLayer::onQuit from 0x14037ebc0 to 0x14037ed02 (322 bytes)\n; \n; 3 xrefs:\n; > PauseLayer::tryQuit @ 0x14037eb4b\n; > PauseLayer::FLAlert_Clicked @ 0x14037eba4\n; > <???> @ 0x1406d5dec\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_8], rdx                                               ; +0x0, 0x14037ebc0\npush    rbx                                                            ; +0x5, 0x14037ebc5\nsub     rsp, 50h                                                       ; +0x6, 0x14037ebc6\nmov     rbx, rcx                                                       ; +0xa, 0x14037ebca\ncmp     byte ptr [rcx+221h], 0                                         ; +0xd, 0x14037ebcd\njz      short loc_14037EBFB                                            ; +0x14, 0x14037ebd4\nmov     byte ptr [rcx+221h], 0                                         ; +0x16, 0x14037ebd6\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1d, 0x14037ebdd\nmov     rdx, [rax]                                                     ; +0x23, 0x14037ebe3\nmov     rcx, rax                                                       ; +0x26, 0x14037ebe6\ncall    qword ptr [rdx+90h]                                            ; +0x29, 0x14037ebe9\nmov     rcx, rax                                                       ; +0x2f, 0x14037ebef\nmov     rdx, rbx                                                       ; +0x32, 0x14037ebf2\ncall    cs:?unregisterForcePrio@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCTouchDispatcher::unregisterForcePrio(cocos2d::CCObject *) ; +0x35, 0x14037ebf5\nmov     rcx, rbx                                                       ; +0x3b, 0x14037ebfb\ncall    cs:?unscheduleAllSelectors@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::unscheduleAllSelectors(void) ; +0x3e, 0x14037ebfe\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x44, 0x14037ec04\ntest    rcx, rcx                                                       ; +0x4b, 0x14037ec0b\njnz     short loc_14037EC3F                                            ; +0x4e, 0x14037ec0e\nmov     ecx, 668h; Size                                                ; +0x50, 0x14037ec10\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x55, 0x14037ec15\nmov     [rsp+58h+arg_8], rax                                           ; +0x5a, 0x14037ec1a\nmov     rcx, rax                                                       ; +0x5f, 0x14037ec1f\ncall    sub_14017AB00                                                  ; +0x62, 0x14037ec22\nnop                                                                    ; +0x67, 0x14037ec27\nmov     cs:qword_1406C2ED8, rax                                        ; +0x68, 0x14037ec28\nmov     rdx, [rax]                                                     ; +0x6f, 0x14037ec2f\nmov     rcx, rax                                                       ; +0x72, 0x14037ec32\ncall    qword ptr [rdx+48h]                                            ; +0x75, 0x14037ec35\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x78, 0x14037ec38\nmov     rcx, [rcx+208h]                                                ; +0x7f, 0x14037ec3f\ncall    PlayLayer__onQuit                                              ; +0x86, 0x14037ec46\nlea     rax, [rsp+58h+var_28]                                          ; +0x8b, 0x14037ec4b\nmov     [rsp+58h+arg_8], rax                                           ; +0x90, 0x14037ec50\nxorps   xmm0, xmm0                                                     ; +0x95, 0x14037ec55\nmovups  [rsp+58h+var_28], xmm0                                         ; +0x98, 0x14037ec58\nmov     [rsp+58h+var_18], 0                                            ; +0x9d, 0x14037ec5d\nmov     [rsp+58h+var_10], 0Fh                                          ; +0xa6, 0x14037ec66\nmov     ecx, 20h ; ' '                                                 ; +0xaf, 0x14037ec6f\ncall    sub_14003AA10                                                  ; +0xb4, 0x14037ec74\nmov     qword ptr [rsp+58h+var_28], rax                                ; +0xb9, 0x14037ec79\nmov     [rsp+58h+var_18], 10h                                          ; +0xbe, 0x14037ec7e\nmov     [rsp+58h+var_10], 1Fh                                          ; +0xc7, 0x14037ec87\nmovups  xmm0, cs:xmmword_140532E10                                     ; +0xd0, 0x14037ec90\nmovups  xmmword ptr [rax], xmm0                                        ; +0xd7, 0x14037ec97\nmov     byte ptr [rax+10h], 0                                          ; +0xda, 0x14037ec9a\nmov     rcx, cs:qword_1406C2E88                                        ; +0xde, 0x14037ec9e\ntest    rcx, rcx                                                       ; +0xe5, 0x14037eca5\njnz     short loc_14037ECD9                                            ; +0xe8, 0x14037eca8\nmov     ecx, 888h; Size                                                ; +0xea, 0x14037ecaa\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xef, 0x14037ecaf\nmov     [rsp+58h+arg_0], rax                                           ; +0xf4, 0x14037ecb4\nmov     rcx, rax                                                       ; +0xf9, 0x14037ecb9\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0xfc, 0x14037ecbc\nnop                                                                    ; +0x101, 0x14037ecc1\nmov     cs:qword_1406C2E88, rax                                        ; +0x102, 0x14037ecc2\nmov     rdx, [rax]                                                     ; +0x109, 0x14037ecc9\nmov     rcx, rax                                                       ; +0x10c, 0x14037eccc\ncall    qword ptr [rdx+48h]                                            ; +0x10f, 0x14037eccf\nmov     rcx, cs:qword_1406C2E88                                        ; +0x112, 0x14037ecd2\nmovss   xmm0, cs:dword_140622B74                                       ; +0x119, 0x14037ecd9\nmovss   [rsp+58h+var_38], xmm0                                         ; +0x121, 0x14037ece1\nxorps   xmm3, xmm3                                                     ; +0x127, 0x14037ece7\nmovss   xmm2, cs:flt_140622C24                                         ; +0x12a, 0x14037ecea\nlea     rdx, [rsp+58h+var_28]                                          ; +0x132, 0x14037ecf2\ncall    FMODAudioEngine__playEffect                                    ; +0x137, 0x14037ecf7\nadd     rsp, 50h                                                       ; +0x13c, 0x14037ecfc\npop     rbx                                                            ; +0x140, 0x14037ed00\nretn                                                                   ; +0x141, 0x14037ed01", "xrefs": ["PauseLayer::tryQuit @ 0x14037eb4b", "PauseLayer::FLAlert_Clicked @ 0x14037eba4", "<???> @ 0x1406d5dec"], "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"}