{"type": "func", "start": 5370292528, "end": 5370293040, "name": "EditorPauseLayer::onExport", "pseudocode": "// \n// EditorPauseLayer::onExport from 0x140182930 to 0x140182b30 (512 bytes)\n// \n// 3 xrefs:\n// > EditorPauseLayer::customSetup @ 0x140181a32\n// > EditorPauseLayer::customSetup @ 0x140181ea7\n// > <???> @ 0x140918c68\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 11:27:37 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall EditorPauseLayer::onExport(__int64 a1)\n{\n  __int64 v2; // rax\n  struct cocos2d::CCArray *v3; // rbx\n  __int64 v4; // rcx\n  __int64 v5; // rcx\n  int v6; // eax\n  __int64 v7; // rax\n  cocos2d::CCObject *v8; // rbx\n  __int64 v9; // rax\n  __int128 v10; // [rsp+50h] [rbp+17h] BYREF\n  __int64 v11; // [rsp+60h] [rbp+27h]\n  __int64 v12; // [rsp+68h] [rbp+2Fh]\n  _BYTE v13[32]; // [rsp+70h] [rbp+37h] BYREF\n\n  if ( !*(_BYTE *)(a1 + 568) )\n  {\n    v2 = LocalLevelManager::sharedState(a1);\n    GManager::waitForSave(v2, 30.0);\n    if ( *(_QWORD *)(a1 + 576) )\n      LevelEditorLayer::saveLevel();\n    v3 = cocos2d::CCArray::createWithObject(*(struct cocos2d::CCObject **)(*(_QWORD *)(a1 + 576) + 2168LL));\n    LocalLevelManager::sharedState(v4);\n    v6 = LocalLevelManager::exportLevelsToFile(v5, v3);\n    if ( v6 <= 0 )\n    {\n      if ( v6 )\n        return;\n      v10 = 0;\n      v11 = 0;\n      v12 = 0;\n      *(_QWORD *)&v10 = sub_14003D460(0x20u);\n      v11 = 23;\n      v12 = 31;\n      strcpy((char *)v10, \"Failed to export level.\");\n      v9 = sub_14003F4F0((__int64)v13, (__int64)&v10);\n      v8 = FLAlertLayer::create(0, (int)\"Error\", v9, (__int64)\"OK\", 0, 1133903872, 0, 0, 1065353216);\n    }\n    else\n    {\n      v11 = 15;\n      v12 = 15;\n      strcpy((char *)&v10, \"Level exported!\");\n      v7 = sub_14003F4F0((__int64)v13, (__int64)&v10);\n      v8 = FLAlertLayer::create(0, (int)\"Exported\", v7, (__int64)\"OK\", 0, 1133903872, 0, 0, 1065353216);\n    }\n    sub_14003D310((__int64)&v10);\n    (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v8 + 1064LL))(v8);\n  }\n}", "assembly": "; \n; EditorPauseLayer::onExport from 0x140182930 to 0x140182b30 (512 bytes)\n; \n; 3 xrefs:\n; > EditorPauseLayer::customSetup @ 0x140181a32\n; > EditorPauseLayer::customSetup @ 0x140181ea7\n; > <???> @ 0x140918c68\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 11:27:37 +0000\n; \nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x140182930\npush    rbp                                                            ; +0x5, 0x140182935\nlea     rbp, [rsp-57h]                                                 ; +0x6, 0x140182936\nsub     rsp, 90h                                                       ; +0xb, 0x14018293b\nmov     rbx, rcx                                                       ; +0x12, 0x140182942\ncmp     byte ptr [rcx+238h], 0                                         ; +0x15, 0x140182945\njnz     loc_140182B1F                                                  ; +0x1c, 0x14018294c\ncall    LocalLevelManager__sharedState                                 ; +0x22, 0x140182952\nmov     rcx, rax                                                       ; +0x27, 0x140182957\nmovsd   xmm1, cs:qword_140835380                                       ; +0x2a, 0x14018295a\ncall    GManager__waitForSave                                          ; +0x32, 0x140182962\nmov     rcx, [rbx+240h]                                                ; +0x37, 0x140182967\ntest    rcx, rcx                                                       ; +0x3e, 0x14018296e\njz      short loc_140182978                                            ; +0x41, 0x140182971\ncall    LevelEditorLayer__saveLevel                                    ; +0x43, 0x140182973\nmov     rcx, [rbx+240h]                                                ; +0x48, 0x140182978\nmov     rcx, [rcx+878h]                                                ; +0x4f, 0x14018297f\ncall    cs:?createWithObject@CCArray@cocos2d@@SAPEAV12@PEAVCCObject@2@@Z; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0x56, 0x140182986\nmov     rbx, rax                                                       ; +0x5c, 0x14018298c\ncall    LocalLevelManager__sharedState                                 ; +0x5f, 0x14018298f\nmov     rdx, rbx                                                       ; +0x64, 0x140182994\ncall    LocalLevelManager__exportLevelsToFile                          ; +0x67, 0x140182997\ntest    eax, eax                                                       ; +0x6c, 0x14018299c\njle     loc_140182A49                                                  ; +0x6e, 0x14018299e\nmov     [rbp+57h+var_30], 0Fh                                          ; +0x74, 0x1401829a4\nmov     [rbp+57h+var_28], 0Fh                                          ; +0x7c, 0x1401829ac\nmovsd   xmm0, cs:qword_140748128                                       ; +0x84, 0x1401829b4\nmovsd   qword ptr [rbp+57h+var_40], xmm0                               ; +0x8c, 0x1401829bc\nmov     eax, cs:dword_140748130                                        ; +0x91, 0x1401829c1\nmov     dword ptr [rbp+57h+var_40+8], eax                              ; +0x97, 0x1401829c7\nmovzx   eax, cs:word_140748134                                         ; +0x9a, 0x1401829ca\nmov     word ptr [rbp+57h+var_40+0Ch], ax                              ; +0xa1, 0x1401829d1\nmovzx   eax, cs:byte_140748136                                         ; +0xa5, 0x1401829d5\nmov     byte ptr [rbp+57h+var_40+0Eh], al                              ; +0xac, 0x1401829dc\nmov     byte ptr [rbp+57h+var_40+0Fh], 0                               ; +0xaf, 0x1401829df\nlea     rax, [rbp+57h+var_40]                                          ; +0xb3, 0x1401829e3\nmov     [rbp+57h+arg_0], rax                                           ; +0xb7, 0x1401829e7\nlea     rdx, [rbp+57h+var_40]                                          ; +0xbb, 0x1401829eb\nlea     rcx, [rbp+57h+var_20]                                          ; +0xbf, 0x1401829ef\ncall    sub_14003F4F0                                                  ; +0xc3, 0x1401829f3\nmovss   xmm0, cs:flt_140835080                                         ; +0xc8, 0x1401829f8\nmovss   [rsp+90h+var_50], xmm0                                         ; +0xd0, 0x140182a00\nxorps   xmm1, xmm1                                                     ; +0xd6, 0x140182a06\nmovss   [rsp+90h+var_58], xmm1                                         ; +0xd9, 0x140182a09\nmov     [rsp+90h+var_60], 0                                            ; +0xdf, 0x140182a0f\nmovss   xmm0, cs:dword_1408359A4                                       ; +0xe4, 0x140182a14\nmovss   [rsp+90h+var_68], xmm0                                         ; +0xec, 0x140182a1c\nxor     ebx, ebx                                                       ; +0xf2, 0x140182a22\nmov     [rsp+90h+var_70], rbx                                          ; +0xf4, 0x140182a24\nlea     r9, aOk; \"OK\"                                                  ; +0xf9, 0x140182a29\nmov     r8, rax                                                        ; +0x100, 0x140182a30\nlea     rdx, aExported; \"Exported\"                                     ; +0x103, 0x140182a33\nxor     ecx, ecx                                                       ; +0x10a, 0x140182a3a\ncall    FLAlertLayer__create                                           ; +0x10c, 0x140182a3c\nmov     rbx, rax                                                       ; +0x111, 0x140182a41\njmp     loc_140182B07                                                  ; +0x114, 0x140182a44\njnz     loc_140182B1F                                                  ; +0x119, 0x140182a49\nxorps   xmm0, xmm0                                                     ; +0x11f, 0x140182a4f\nmovups  [rbp+57h+var_40], xmm0                                         ; +0x122, 0x140182a52\nxor     ebx, ebx                                                       ; +0x126, 0x140182a56\nmov     [rbp+57h+var_30], rbx                                          ; +0x128, 0x140182a58\nmov     [rbp+57h+var_28], rbx                                          ; +0x12c, 0x140182a5c\nmov     ecx, 20h ; ' '                                                 ; +0x130, 0x140182a60\ncall    sub_14003D460                                                  ; +0x135, 0x140182a65\nmov     qword ptr [rbp+57h+var_40], rax                                ; +0x13a, 0x140182a6a\nmov     [rbp+57h+var_30], 17h                                          ; +0x13e, 0x140182a6e\nmov     [rbp+57h+var_28], 1Fh                                          ; +0x146, 0x140182a76\nmovups  xmm0, cs:xmmword_140748110                                     ; +0x14e, 0x140182a7e\nmovups  xmmword ptr [rax], xmm0                                        ; +0x155, 0x140182a85\nmov     ecx, cs:dword_140748120                                        ; +0x158, 0x140182a88\nmov     [rax+10h], ecx                                                 ; +0x15e, 0x140182a8e\nmovzx   ecx, cs:word_140748124                                         ; +0x161, 0x140182a91\nmov     [rax+14h], cx                                                  ; +0x168, 0x140182a98\nmovzx   ecx, cs:byte_140748126                                         ; +0x16c, 0x140182a9c\nmov     [rax+16h], cl                                                  ; +0x173, 0x140182aa3\nmov     [rax+17h], bl                                                  ; +0x176, 0x140182aa6\nlea     rax, [rbp+57h+var_40]                                          ; +0x179, 0x140182aa9\nmov     [rbp+57h+arg_0], rax                                           ; +0x17d, 0x140182aad\nlea     rdx, [rbp+57h+var_40]                                          ; +0x181, 0x140182ab1\nlea     rcx, [rbp+57h+var_20]                                          ; +0x185, 0x140182ab5\ncall    sub_14003F4F0                                                  ; +0x189, 0x140182ab9\nmovss   xmm0, cs:flt_140835080                                         ; +0x18e, 0x140182abe\nmovss   [rsp+90h+var_50], xmm0                                         ; +0x196, 0x140182ac6\nxorps   xmm1, xmm1                                                     ; +0x19c, 0x140182acc\nmovss   [rsp+90h+var_58], xmm1                                         ; +0x19f, 0x140182acf\nmov     [rsp+90h+var_60], bl                                           ; +0x1a5, 0x140182ad5\nmovss   xmm0, cs:dword_1408359A4                                       ; +0x1a9, 0x140182ad9\nmovss   [rsp+90h+var_68], xmm0                                         ; +0x1b1, 0x140182ae1\nmov     [rsp+90h+var_70], rbx                                          ; +0x1b7, 0x140182ae7\nlea     r9, aOk; \"OK\"                                                  ; +0x1bc, 0x140182aec\nmov     r8, rax                                                        ; +0x1c3, 0x140182af3\nlea     rdx, aError; \"Error\"                                           ; +0x1c6, 0x140182af6\nxor     ecx, ecx                                                       ; +0x1cd, 0x140182afd\ncall    FLAlertLayer__create                                           ; +0x1cf, 0x140182aff\nmov     rbx, rax                                                       ; +0x1d4, 0x140182b04\nlea     rcx, [rbp+57h+var_40]                                          ; +0x1d7, 0x140182b07\ncall    sub_14003D310                                                  ; +0x1db, 0x140182b0b\nmov     rcx, [rbx]                                                     ; +0x1e0, 0x140182b10\nmov     rdx, [rcx+428h]                                                ; +0x1e3, 0x140182b13\nmov     rcx, rbx                                                       ; +0x1ea, 0x140182b1a\ncall    rdx                                                            ; +0x1ed, 0x140182b1d\nmov     rbx, [rsp+90h+arg_8]                                           ; +0x1ef, 0x140182b1f\nadd     rsp, 90h                                                       ; +0x1f7, 0x140182b27\npop     rbp                                                            ; +0x1fe, 0x140182b2e\nretn                                                                   ; +0x1ff, 0x140182b2f", "xrefs": ["EditorPauseLayer::customSetup @ 0x140181a32", "EditorPauseLayer::customSetup @ 0x140181ea7", "<???> @ 0x140918c68"], "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"}