{"type": "func", "start": 4297581408, "end": 4297581567, "name": "EditorPauseLayer::onSaveAndExit", "pseudocode": "// \n// EditorPauseLayer::onSaveAndExit from 0x10027e360 to 0x10027e3ff (159 bytes)\n// \n// 1 xrefs:\n// > EditorPauseLayer::customSetup @ 0x10027d430\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 12:27:42 +0000\n// \n\n__int64 __fastcall EditorPauseLayer::onSaveAndExit(__int64 a1)\n{\n  double v2; // xmm0_8\n  __int64 v3; // rax\n  __int64 v4; // rdi\n  __int64 v5; // rax\n  __int64 v6; // rax\n  __int64 v7; // rdx\n  double v8; // xmm0_8\n  __int64 v9; // rax\n  __int64 result; // rax\n\n  if ( !*(_BYTE *)(a1 + 568) )\n  {\n    v2 = (*(double (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);\n    *(_BYTE *)(a1 + 568) = 1;\n    v3 = LocalLevelManager::sharedState(v2);\n    sub_1004A5220(v3, 30.0);\n    v4 = *(_QWORD *)(a1 + 576);\n    if ( v4 )\n      LevelEditorLayer::saveLevel(v4);\n    v5 = EditorSFXManager::sharedState(v4);\n    EditorSFXManager::playAction_1(v5, 224);\n    sub_1000A9AF0(30.0);\n    v6 = FMODAudioEngine::sharedEngine(30.0);\n    FMODAudioEngine::unloadAllEffects(v6);\n    CCBlockLayer::decrementForcePrio(a1);\n    *(_QWORD *)&v8 = GameManager::sharedState(a1, 224, v7).u64[0];\n    return GameManager::returnToLastScene(v9, *(_QWORD *)(*(_QWORD *)(a1 + 576) + 1936LL), v8);\n  }\n  return result;\n}", "assembly": "; \n; EditorPauseLayer::onSaveAndExit from 0x10027e360 to 0x10027e3ff (159 bytes)\n; \n; 1 xrefs:\n; > EditorPauseLayer::customSetup @ 0x10027d430\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 12:27:42 +0000\n; \ncmp     byte ptr [rdi+238h], 0                                         ; +0x0, 0x10027e360\njz      short loc_10027E36A                                            ; +0x7, 0x10027e367\nretn                                                                   ; +0x9, 0x10027e369\npush    rbp                                                            ; +0xa, 0x10027e36a\nmov     rbp, rsp                                                       ; +0xb, 0x10027e36b\npush    rbx                                                            ; +0xe, 0x10027e36e\npush    rax                                                            ; +0xf, 0x10027e36f\nmov     rbx, rdi                                                       ; +0x10, 0x10027e370\nmov     rax, [rdi]                                                     ; +0x13, 0x10027e373\nxor     esi, esi                                                       ; +0x16, 0x10027e376\ncall    qword ptr [rax+430h]                                           ; +0x18, 0x10027e378\nmov     byte ptr [rbx+238h], 1                                         ; +0x1e, 0x10027e37e\ncall    LocalLevelManager__sharedState                                 ; +0x25, 0x10027e385\nmovsd   xmm0, cs:qword_100A072C8                                       ; +0x2a, 0x10027e38a\nmov     rdi, rax                                                       ; +0x32, 0x10027e392\ncall    sub_1004A5220                                                  ; +0x35, 0x10027e395\nmov     rdi, [rbx+240h]                                                ; +0x3a, 0x10027e39a\ntest    rdi, rdi                                                       ; +0x41, 0x10027e3a1\njz      short loc_10027E3AB                                            ; +0x44, 0x10027e3a4\ncall    LevelEditorLayer__saveLevel                                    ; +0x46, 0x10027e3a6\ncall    EditorSFXManager__sharedState                                  ; +0x4b, 0x10027e3ab\nmov     rdi, rax                                                       ; +0x50, 0x10027e3b0\nmov     esi, 0E0h                                                      ; +0x53, 0x10027e3b3\ncall    EditorSFXManager__playAction_1                                 ; +0x58, 0x10027e3b8\nmov     rdi, [rbx+240h]                                                ; +0x5d, 0x10027e3bd\ncall    sub_1000A9AF0                                                  ; +0x64, 0x10027e3c4\ncall    FMODAudioEngine__sharedEngine                                  ; +0x69, 0x10027e3c9\nmov     rdi, rax                                                       ; +0x6e, 0x10027e3ce\ncall    FMODAudioEngine__unloadAllEffects                              ; +0x71, 0x10027e3d1\nmov     rdi, rbx                                                       ; +0x76, 0x10027e3d6\ncall    CCBlockLayer__decrementForcePrio                               ; +0x79, 0x10027e3d9\ncall    GameManager__sharedState                                       ; +0x7e, 0x10027e3de\nmov     rcx, [rbx+240h]                                                ; +0x83, 0x10027e3e3\nmov     rsi, [rcx+790h]                                                ; +0x8a, 0x10027e3ea\nmov     rdi, rax                                                       ; +0x91, 0x10027e3f1\nadd     rsp, 8                                                         ; +0x94, 0x10027e3f4\npop     rbx                                                            ; +0x98, 0x10027e3f8\npop     rbp                                                            ; +0x99, 0x10027e3f9\njmp     GameManager__returnToLastScene                                 ; +0x9a, 0x10027e3fa", "xrefs": ["EditorPauseLayer::customSetup @ 0x10027d430"], "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"}