{"type": "func", "start": 5370268688, "end": 5370269155, "name": "EditLevelLayer::onExportLevel", "pseudocode": "// \n// EditLevelLayer::onExportLevel from 0x14017cc10 to 0x14017cde3 (467 bytes)\n// \n// 2 xrefs:\n// > EditLevelLayer::init @ 0x140179738\n// > <???> @ 0x1409187dc\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:35 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall EditLevelLayer::onExportLevel(__int64 *a1)\n{\n  struct cocos2d::CCObject *v2; // rcx\n  struct cocos2d::CCArray *v3; // rbx\n  __int64 v4; // rcx\n  __int64 v5; // rcx\n  int v6; // eax\n  __int64 v7; // rdx\n  __int64 v8; // r8\n  __int64 v9; // rbx\n  __int64 v10; // rax\n  __int64 v11; // rax\n  cocos2d::CCObject *v12; // rbx\n  __int128 v13; // [rsp+50h] [rbp+17h] BYREF\n  __int64 v14; // [rsp+60h] [rbp+27h]\n  __int64 v15; // [rsp+68h] [rbp+2Fh]\n  __int128 v16; // [rsp+70h] [rbp+37h] BYREF\n  __int64 v17; // [rsp+80h] [rbp+47h]\n  __int64 v18; // [rsp+88h] [rbp+4Fh]\n\n  v2 = (struct cocos2d::CCObject *)a1[59];\n  if ( v2 )\n  {\n    v3 = cocos2d::CCArray::createWithObject(v2);\n    LocalLevelManager::sharedState(v4);\n    v6 = LocalLevelManager::exportLevelsToFile(v5, v3);\n    if ( v6 <= 0 )\n    {\n      if ( !v6 )\n      {\n        v13 = 0;\n        v14 = 0;\n        v15 = 0;\n        *(_QWORD *)&v13 = sub_14003D460(0x20u);\n        v14 = 23;\n        v15 = 31;\n        strcpy((char *)v13, \"Failed to export level.\");\n        v11 = sub_14003F4F0((__int64)&v16, (__int64)&v13);\n        v12 = FLAlertLayer::create(0, (int)\"Error\", v11, (__int64)\"OK\", 0, 1132068864, 0, 0, 1065353216);\n        sub_14003D310((__int64)&v13);\n        (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v12 + 1064LL))(v12);\n      }\n    }\n    else\n    {\n      v16 = 0;\n      v17 = 0;\n      v18 = 15;\n      LOBYTE(v16) = 0;\n      v14 = 15;\n      v15 = 15;\n      strcpy((char *)&v13, \"Level exported!\");\n      v9 = *a1;\n      v10 = TextAlertPopup::create(&v13, v7, v8, 150, &v16);\n      (*(void (__fastcall **)(__int64 *, __int64, __int64))(v9 + 456))(a1, v10, 100);\n    }\n  }\n}", "assembly": "; \n; EditLevelLayer::onExportLevel from 0x14017cc10 to 0x14017cde3 (467 bytes)\n; \n; 2 xrefs:\n; > EditLevelLayer::init @ 0x140179738\n; > <???> @ 0x1409187dc\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:35 +0000\n; \nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x14017cc10\nmov     [rsp-8+arg_18], rdi                                            ; +0x5, 0x14017cc15\npush    rbp                                                            ; +0xa, 0x14017cc1a\nlea     rbp, [rsp-57h]                                                 ; +0xb, 0x14017cc1b\nsub     rsp, 90h                                                       ; +0x10, 0x14017cc20\nmov     rdi, rcx                                                       ; +0x17, 0x14017cc27\nmov     rcx, [rcx+1D8h]                                                ; +0x1a, 0x14017cc2a\ntest    rcx, rcx                                                       ; +0x21, 0x14017cc31\njz      loc_14017CDCE                                                  ; +0x24, 0x14017cc34\ncall    cs:?createWithObject@CCArray@cocos2d@@SAPEAV12@PEAVCCObject@2@@Z; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0x2a, 0x14017cc3a\nmov     rbx, rax                                                       ; +0x30, 0x14017cc40\ncall    LocalLevelManager__sharedState                                 ; +0x33, 0x14017cc43\nmov     rdx, rbx                                                       ; +0x38, 0x14017cc48\ncall    LocalLevelManager__exportLevelsToFile                          ; +0x3b, 0x14017cc4b\ntest    eax, eax                                                       ; +0x40, 0x14017cc50\njle     loc_14017CCF8                                                  ; +0x42, 0x14017cc52\nlea     rax, [rbp+57h+var_20]                                          ; +0x48, 0x14017cc58\nmov     [rbp+57h+arg_0], rax                                           ; +0x4c, 0x14017cc5c\nxorps   xmm0, xmm0                                                     ; +0x50, 0x14017cc60\nmovups  [rbp+57h+var_20], xmm0                                         ; +0x53, 0x14017cc63\nxor     ebx, ebx                                                       ; +0x57, 0x14017cc67\nmov     [rbp+57h+var_10], rbx                                          ; +0x59, 0x14017cc69\nmov     [rbp+57h+var_8], 0Fh                                           ; +0x5d, 0x14017cc6d\nmov     byte ptr [rbp+57h+var_20], bl                                  ; +0x65, 0x14017cc75\nmov     [rbp+57h+var_30], 0Fh                                          ; +0x68, 0x14017cc78\nmov     [rbp+57h+var_28], 0Fh                                          ; +0x70, 0x14017cc80\nmovsd   xmm0, cs:qword_140748128                                       ; +0x78, 0x14017cc88\nmovsd   qword ptr [rbp+57h+var_40], xmm0                               ; +0x80, 0x14017cc90\nmov     eax, cs:dword_140748130                                        ; +0x85, 0x14017cc95\nmov     dword ptr [rbp+57h+var_40+8], eax                              ; +0x8b, 0x14017cc9b\nmovzx   eax, cs:word_140748134                                         ; +0x8e, 0x14017cc9e\nmov     word ptr [rbp+57h+var_40+0Ch], ax                              ; +0x95, 0x14017cca5\nmovzx   eax, cs:byte_140748136                                         ; +0x99, 0x14017cca9\nmov     byte ptr [rbp+57h+var_40+0Eh], al                              ; +0xa0, 0x14017ccb0\nmov     byte ptr [rbp+57h+var_40+0Fh], bl                              ; +0xa3, 0x14017ccb3\nmov     rbx, [rdi]                                                     ; +0xa6, 0x14017ccb6\nlea     rax, [rbp+57h+var_20]                                          ; +0xa9, 0x14017ccb9\nmov     [rsp+90h+var_70], rax                                          ; +0xad, 0x14017ccbd\nmov     r9d, 96h                                                       ; +0xb2, 0x14017ccc2\nmovss   xmm2, cs:dword_140834F64                                       ; +0xb8, 0x14017ccc8\nmovss   xmm1, cs:dword_140834F20                                       ; +0xc0, 0x14017ccd0\nlea     rcx, [rbp+57h+var_40]                                          ; +0xc8, 0x14017ccd8\ncall    TextAlertPopup__create                                         ; +0xcc, 0x14017ccdc\nmov     rdx, rax                                                       ; +0xd1, 0x14017cce1\nmov     r8d, 64h ; 'd'                                                 ; +0xd4, 0x14017cce4\nmov     rcx, rdi                                                       ; +0xda, 0x14017ccea\ncall    qword ptr [rbx+1C8h]                                           ; +0xdd, 0x14017cced\njmp     loc_14017CDCE                                                  ; +0xe3, 0x14017ccf3\njnz     loc_14017CDCE                                                  ; +0xe8, 0x14017ccf8\nxorps   xmm0, xmm0                                                     ; +0xee, 0x14017ccfe\nmovups  [rbp+57h+var_40], xmm0                                         ; +0xf1, 0x14017cd01\nxor     ebx, ebx                                                       ; +0xf5, 0x14017cd05\nmov     [rbp+57h+var_30], rbx                                          ; +0xf7, 0x14017cd07\nmov     [rbp+57h+var_28], rbx                                          ; +0xfb, 0x14017cd0b\nmov     ecx, 20h ; ' '                                                 ; +0xff, 0x14017cd0f\ncall    sub_14003D460                                                  ; +0x104, 0x14017cd14\nmov     qword ptr [rbp+57h+var_40], rax                                ; +0x109, 0x14017cd19\nmov     [rbp+57h+var_30], 17h                                          ; +0x10d, 0x14017cd1d\nmov     [rbp+57h+var_28], 1Fh                                          ; +0x115, 0x14017cd25\nmovups  xmm0, cs:xmmword_140748110                                     ; +0x11d, 0x14017cd2d\nmovups  xmmword ptr [rax], xmm0                                        ; +0x124, 0x14017cd34\nmov     ecx, cs:dword_140748120                                        ; +0x127, 0x14017cd37\nmov     [rax+10h], ecx                                                 ; +0x12d, 0x14017cd3d\nmovzx   ecx, cs:word_140748124                                         ; +0x130, 0x14017cd40\nmov     [rax+14h], cx                                                  ; +0x137, 0x14017cd47\nmovzx   ecx, cs:byte_140748126                                         ; +0x13b, 0x14017cd4b\nmov     [rax+16h], cl                                                  ; +0x142, 0x14017cd52\nmov     [rax+17h], bl                                                  ; +0x145, 0x14017cd55\nlea     rax, [rbp+57h+var_40]                                          ; +0x148, 0x14017cd58\nmov     [rbp+57h+arg_0], rax                                           ; +0x14c, 0x14017cd5c\nlea     rdx, [rbp+57h+var_40]                                          ; +0x150, 0x14017cd60\nlea     rcx, [rbp+57h+var_20]                                          ; +0x154, 0x14017cd64\ncall    sub_14003F4F0                                                  ; +0x158, 0x14017cd68\nmovss   xmm0, cs:flt_140835080                                         ; +0x15d, 0x14017cd6d\nmovss   [rsp+90h+var_50], xmm0                                         ; +0x165, 0x14017cd75\nxorps   xmm1, xmm1                                                     ; +0x16b, 0x14017cd7b\nmovss   [rsp+90h+var_58], xmm1                                         ; +0x16e, 0x14017cd7e\nmov     [rsp+90h+var_60], bl                                           ; +0x174, 0x14017cd84\nmovss   xmm0, cs:dword_14083595C                                       ; +0x178, 0x14017cd88\nmovss   [rsp+90h+var_68], xmm0                                         ; +0x180, 0x14017cd90\nmov     [rsp+90h+var_70], rbx                                          ; +0x186, 0x14017cd96\nlea     r9, aOk; \"OK\"                                                  ; +0x18b, 0x14017cd9b\nmov     r8, rax                                                        ; +0x192, 0x14017cda2\nlea     rdx, aError; \"Error\"                                           ; +0x195, 0x14017cda5\nxor     ecx, ecx                                                       ; +0x19c, 0x14017cdac\ncall    FLAlertLayer__create                                           ; +0x19e, 0x14017cdae\nmov     rbx, rax                                                       ; +0x1a3, 0x14017cdb3\nlea     rcx, [rbp+57h+var_40]                                          ; +0x1a6, 0x14017cdb6\ncall    sub_14003D310                                                  ; +0x1aa, 0x14017cdba\nmov     rcx, [rbx]                                                     ; +0x1af, 0x14017cdbf\nmov     rdx, [rcx+428h]                                                ; +0x1b2, 0x14017cdc2\nmov     rcx, rbx                                                       ; +0x1b9, 0x14017cdc9\ncall    rdx                                                            ; +0x1bc, 0x14017cdcc\nlea     r11, [rsp+90h+var_s0]                                          ; +0x1be, 0x14017cdce\nmov     rbx, [r11+18h]                                                 ; +0x1c6, 0x14017cdd6\nmov     rdi, [r11+28h]                                                 ; +0x1ca, 0x14017cdda\nmov     rsp, r11                                                       ; +0x1ce, 0x14017cdde\npop     rbp                                                            ; +0x1d1, 0x14017cde1\nretn                                                                   ; +0x1d2, 0x14017cde2", "xrefs": ["EditLevelLayer::init @ 0x140179738", "<???> @ 0x1409187dc"], "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"}