{"type": "func", "start": 4200136, "end": 4200282, "name": "EditorPauseLayer::onExitNoSave", "pseudocode": "// \n// EditorPauseLayer::onExitNoSave from 0x4016c8 to 0x40175a (146 bytes)\n// \n// 0 xrefs:\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  FLAlertLayer *v3; // r5\n  _BYTE v4[4]; // [sp+10h] [bp-8h] BYREF\n\n  if ( !a1->m_saved )\n  {\n    if ( a1->m_editorLayer->m_level->m_levelType == Editor )\n    {\n      sub_776584((int)v4, \"<cy>Exit</c> without saving? All unsaved changes will be <cr>lost</c>!\");\n      v3 = FLAlertLayer::create((int)&a1->FLAlertLayerProtocol, (int)\"Exit\", (int)v4, (int)\"NO\", (int)\"YES\", 300.0);\n      sub_774008(v4);\n      v3->setTag(v3, 1);\n      v3->show(v3);\n    }\n    else\n    {\n      EditorPauseLayer::onExitEditor(a1, (cocos2d::CCObject *)a1->m_saved);\n    }\n  }\n}", "assembly": "; \n; EditorPauseLayer::onExitNoSave from 0x4016c8 to 0x40175a (146 bytes)\n; \n; 0 xrefs:\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x4016D2)                ; +0x0, 0x4016c8\nLDRB.W          R1, [R0,#0x1C0]; cocos2d::CCObject *                   ; +0x2, 0x4016ca\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x4016ce\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x4016d0\nPUSH            {R4-R6,LR}                                             ; +0xa, 0x4016d2\nSUB             SP, SP, #0x18                                          ; +0xc, 0x4016d4\nLDR             R2, [R3]                                               ; +0xe, 0x4016d6\nMOV             R5, R0                                                 ; +0x10, 0x4016d8\nMOV             R6, R3                                                 ; +0x12, 0x4016da\nSTR             R2, [SP,#0x18+var_4]                                   ; +0x14, 0x4016dc\nCMP             R1, #0                                                 ; +0x16, 0x4016de\nBNE             loc_40174A                                             ; +0x18, 0x4016e0\nLDR.W           R3, [R0,#0x1CC]                                        ; +0x1a, 0x4016e2\nLDR.W           R3, [R3,#0x608]                                        ; +0x1e, 0x4016e6\nLDR.W           R3, [R3,#0x2F8]                                        ; +0x22, 0x4016ea\nCMP             R3, #2                                                 ; +0x26, 0x4016ee\nBEQ             loc_4016F8                                             ; +0x28, 0x4016f0\nBL              _ZN16EditorPauseLayer12onExitEditorEPN7cocos2d8CCObjectE; EditorPauseLayer::onExitEditor(cocos2d::CCObject *) ; +0x2a, 0x4016f2\nB               loc_40174A                                             ; +0x2e, 0x4016f6\nADD             R4, SP, #0x18+var_8                                    ; +0x30, 0x4016f8\nLDR             R1, =(aCyExitCWithout - 0x401702); \"<cy>Exit</c> without saving? All unsave\"... ; +0x32, 0x4016fa\nADD             R2, SP, #0x18+var_C                                    ; +0x34, 0x4016fc\nADD             R1, PC; \"<cy>Exit</c> without saving? All unsave\"...   ; +0x36, 0x4016fe\nMOV             R0, R4; int                                            ; +0x38, 0x401700\nBL              sub_776584                                             ; +0x3a, 0x401702\nLDR             R3, =(aYes_0 - 0x401712); \"YES\"                        ; +0x3e, 0x401706\nLDR             R1, =(aExit_0 - 0x401718); \"Exit\"                      ; +0x40, 0x401708\nADD.W           R0, R5, #0x1BC; int                                    ; +0x42, 0x40170a\nADD             R3, PC; \"YES\"                                          ; +0x46, 0x40170e\nSTR             R3, [SP,#0x18+var_18]; int                             ; +0x48, 0x401710\nLDR             R3, flt_40175C                                         ; +0x4a, 0x401712\nADD             R1, PC; \"Exit\"                                         ; +0x4c, 0x401714\nMOV             R2, R4; int                                            ; +0x4e, 0x401716\nSTR             R3, [SP,#0x18+var_14]; float                           ; +0x50, 0x401718\nLDR             R3, =(aNo_0 - 0x401720); \"NO\"                          ; +0x52, 0x40171a\nADD             R3, PC; \"NO\"                                           ; +0x54, 0x40171c\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x56, 0x40171e\nMOV             R5, R0                                                 ; +0x5a, 0x401722\nMOV             R0, R4                                                 ; +0x5c, 0x401724\nBL              sub_774008                                             ; +0x5e, 0x401726\nLDR             R3, [R5]                                               ; +0x62, 0x40172a\nMOV             R0, R5                                                 ; +0x64, 0x40172c\nMOVS            R1, #1                                                 ; +0x66, 0x40172e\nLDR             R3, [R3,#0x24]                                         ; +0x68, 0x401730\nBLX             R3                                                     ; +0x6a, 0x401732\nLDR             R3, [R5]                                               ; +0x6c, 0x401734\nMOV             R0, R5                                                 ; +0x6e, 0x401736\nLDR.W           R3, [R3,#0x284]                                        ; +0x70, 0x401738\nBLX             R3                                                     ; +0x74, 0x40173c\nB               loc_40174A                                             ; +0x76, 0x40173e\nMOV             R0, R4                                                 ; +0x78, 0x401740\nBL              sub_774008                                             ; +0x7a, 0x401742\nBL              __cxa_end_cleanup                                      ; +0x7e, 0x401746\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x82, 0x40174a\nLDR             R3, [R6]                                               ; +0x84, 0x40174c\nCMP             R2, R3                                                 ; +0x86, 0x40174e\nBEQ             loc_401756                                             ; +0x88, 0x401750\nBLX             __stack_chk_fail                                       ; +0x8a, 0x401752\nADD             SP, SP, #0x18                                          ; +0x8e, 0x401756\nPOP             {R4-R6,PC}                                             ; +0x90, 0x401758", "xrefs": [], "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"}