{"type": "func", "start": 7924256, "end": 7924612, "name": "EditorPauseLayer::onExitNoSave", "pseudocode": "// \n// EditorPauseLayer::onExitNoSave from 0x78ea20 to 0x78eb84 (356 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0xbede8\n// > EditorPauseLayer::customSetup @ 0x78c560\n// > <???> @ 0x122e9e8\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 EditorPauseLayer::onExitNoSave(EditorPauseLayer *a1, cocos2d::CCObject *a2)\n{\n  int v2; // w20\n  FLAlertLayer *v3; // x20\n  void *v4; // x0\n  unsigned int *v5; // x2\n  int v6; // w1\n  __int64 v7; // [xsp+40h] [xbp+40h] BYREF\n\n  v2 = (int)a1;\n  if ( !a1->m_saved )\n  {\n    if ( a1->m_editorLayer->m_level->m_levelType == Editor )\n    {\n      sub_D153B8((int)&v7, \"<cy>Exit</c> without saving? All unsaved changes will be <cr>lost</c>!\");\n      v3 = FLAlertLayer::create(v2 + 552, (__int64)\"Exit\", (__int64)&v7);\n      v4 = (void *)(v7 - 24);\n      if ( (__int64 *)(v7 - 24) != &qword_124B6B0 )\n      {\n        if ( &pthread_create )\n        {\n          v5 = (unsigned int *)(v7 - 8);\n          do\n            v6 = __ldaxr(v5);\n          while ( __stlxr(v6 - 1, v5) );\n        }\n        else\n        {\n          v6 = *(_DWORD *)(v7 - 8);\n          *(_DWORD *)(v7 - 8) = v6 - 1;\n        }\n        if ( v6 <= 0 )\n          operator delete(v4);\n      }\n      v3->setTag(v3, 1);\n      v3->show(v3);\n    }\n    else\n    {\n      EditorPauseLayer::onExitEditor(a1, nullptr);\n    }\n  }\n}", "assembly": "; \n; EditorPauseLayer::onExitNoSave from 0x78ea20 to 0x78eb84 (356 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0xbede8\n; > EditorPauseLayer::customSetup @ 0x78c560\n; > <???> @ 0x122e9e8\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x78ea20\nMOV             X29, SP                                                ; +0x4, 0x78ea24\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x78ea28\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x78ea2c\nLDRB            W1, [X0,#0x230]                                        ; +0x10, 0x78ea30\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x14, 0x78ea34\nMOV             X20, X0                                                ; +0x18, 0x78ea38\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x78ea3c\nLDR             X2, [X2]                                               ; +0x20, 0x78ea40\nSTR             X2, [X29,#0x50+var_8]                                  ; +0x24, 0x78ea44\nCBNZ            W1, loc_78EA68                                         ; +0x28, 0x78ea48\nLDR             X1, [X0,#0x248]                                        ; +0x2c, 0x78ea4c\nLDR             X1, [X1,#0x8A0]                                        ; +0x30, 0x78ea50\nLDR             W1, [X1,#0x364]                                        ; +0x34, 0x78ea54\nCMP             W1, #2                                                 ; +0x38, 0x78ea58\nB.EQ            loc_78EA8C                                             ; +0x3c, 0x78ea5c\nMOV             X1, #0; cocos2d::CCObject *                            ; +0x40, 0x78ea60\nBL              _ZN16EditorPauseLayer12onExitEditorEPN7cocos2d8CCObjectE; EditorPauseLayer::onExitEditor(cocos2d::CCObject *) ; +0x44, 0x78ea64\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x48, 0x78ea68\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x4c, 0x78ea6c\nLDR             X0, [X19]                                              ; +0x50, 0x78ea70\nCMP             X1, X0                                                 ; +0x54, 0x78ea74\nB.NE            loc_78EB54                                             ; +0x58, 0x78ea78\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x5c, 0x78ea7c\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x60, 0x78ea80\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x64, 0x78ea84\nRET                                                                    ; +0x68, 0x78ea88\nADD             X21, X29, #0x50+var_10                                 ; +0x6c, 0x78ea8c\nADRP            X1, #aCyExitCWithout@PAGE; \"<cy>Exit</c> without saving? All unsave\"... ; +0x70, 0x78ea90\nMOV             X0, X21; int                                           ; +0x74, 0x78ea94\nADD             X1, X1, #aCyExitCWithout@PAGEOFF; \"<cy>Exit</c> without saving? All unsave\"... ; +0x78, 0x78ea98\nADD             X2, X29, #0x50+var_20                                  ; +0x7c, 0x78ea9c\nBL              sub_D153B8                                             ; +0x80, 0x78eaa0\nLDR             S0, =0x43960000                                        ; +0x84, 0x78eaa4\nADRP            X1, #(aConfirmExit+8)@PAGE; \"Exit\"                     ; +0x88, 0x78eaa8\nADRP            X3, #aNo_0@PAGE; \"NO\"                                  ; +0x8c, 0x78eaac\nADRP            X4, #aYes_0@PAGE; \"YES\"                                ; +0x90, 0x78eab0\nADD             X0, X20, #0x228                                        ; +0x94, 0x78eab4\nADD             X1, X1, #(aConfirmExit+8)@PAGEOFF; \"Exit\"              ; +0x98, 0x78eab8\nMOV             X2, X21                                                ; +0x9c, 0x78eabc\nADD             X3, X3, #aNo_0@PAGEOFF; \"NO\"                           ; +0xa0, 0x78eac0\nADD             X4, X4, #aYes_0@PAGEOFF; \"YES\"                         ; +0xa4, 0x78eac4\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0xa8, 0x78eac8\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xac, 0x78eacc\nLDR             X2, [X29,#0x50+var_10]                                 ; +0xb0, 0x78ead0\nMOV             X20, X0                                                ; +0xb4, 0x78ead4\nSUB             X0, X2, #0x18; p                                       ; +0xb8, 0x78ead8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xbc, 0x78eadc\nCMP             X0, X1                                                 ; +0xc0, 0x78eae0\nB.NE            loc_78EB10                                             ; +0xc4, 0x78eae4\nLDR             X2, [X20]                                              ; +0xc8, 0x78eae8\nMOV             X0, X20                                                ; +0xcc, 0x78eaec\nMOV             W1, #1                                                 ; +0xd0, 0x78eaf0\nLDR             X2, [X2,#0x48]                                         ; +0xd4, 0x78eaf4\nBLR             X2                                                     ; +0xd8, 0x78eaf8\nLDR             X1, [X20]                                              ; +0xdc, 0x78eafc\nMOV             X0, X20                                                ; +0xe0, 0x78eb00\nLDR             X1, [X1,#0x508]                                        ; +0xe4, 0x78eb04\nBLR             X1                                                     ; +0xe8, 0x78eb08\nB               loc_78EA68                                             ; +0xec, 0x78eb0c\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xf0, 0x78eb10\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xf4, 0x78eb14\nCBZ             X1, loc_78EB44                                         ; +0xf8, 0x78eb18\nSUB             X2, X2, #8                                             ; +0xfc, 0x78eb1c\nLDAXR           W1, [X2]                                               ; +0x100, 0x78eb20\nSUB             W3, W1, #1                                             ; +0x104, 0x78eb24\nSTLXR           W4, W3, [X2]                                           ; +0x108, 0x78eb28\nCBNZ            W4, loc_78EB20                                         ; +0x10c, 0x78eb2c\nCMP             W1, WZR                                                ; +0x110, 0x78eb30\nB.GT            loc_78EAE8                                             ; +0x114, 0x78eb34\nADD             X1, X29, #0x50+var_18                                  ; +0x118, 0x78eb38\nBL              j__ZdlPv; operator delete(void *)                      ; +0x11c, 0x78eb3c\nB               loc_78EAE8                                             ; +0x120, 0x78eb40\nLDUR            W1, [X2,#-8]                                           ; +0x124, 0x78eb44\nSUB             W3, W1, #1                                             ; +0x128, 0x78eb48\nSTUR            W3, [X2,#-8]                                           ; +0x12c, 0x78eb4c\nB               loc_78EB30                                             ; +0x130, 0x78eb50\nBL              .__stack_chk_fail                                      ; +0x134, 0x78eb54\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x138, 0x78eb58\nMOV             X19, X0                                                ; +0x13c, 0x78eb5c\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x140, 0x78eb60\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x144, 0x78eb64\nSUB             X0, X0, #0x18                                          ; +0x148, 0x78eb68\nCMP             X0, X1                                                 ; +0x14c, 0x78eb6c\nB.EQ            loc_78EB7C                                             ; +0x150, 0x78eb70\nADD             X1, X29, #0x50+var_18                                  ; +0x154, 0x78eb74\nBL              sub_4DBC08                                             ; +0x158, 0x78eb78\nMOV             X0, X19                                                ; +0x15c, 0x78eb7c\nBL              _Unwind_Resume                                         ; +0x160, 0x78eb80", "xrefs": ["<???> @ 0xbede8", "EditorPauseLayer::customSetup @ 0x78c560", "<???> @ 0x122e9e8"], "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"}