{"type": "func", "start": 4297056544, "end": 4297057173, "name": "EditLevelLayer::FLAlert_Clicked", "pseudocode": "// \n// EditLevelLayer::FLAlert_Clicked from 0x1001fe120 to 0x1001fe395 (629 bytes)\n// \n// 2 xrefs:\n// > sub_1001FE4E0 @ 0x1001fe4ec\n// > <???> @ 0x1008da7f8\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 __fastcall EditLevelLayer::FLAlert_Clicked(EditLevelLayer *a1, FLAlertLayer *a2, bool a3)\n{\n  __int128 v3; // xmm0\n  bool v5; // r12\n  GameLevelManager *v6; // rax\n  GJGameLevel *m_level; // rsi\n  LocalLevelManager *v8; // rax\n  GameLevelManager *v9; // r14\n  GJGameLevel *v10; // rax\n  unsigned int v11; // r15d\n  std::string *p_m_levelDesc; // rax\n  GameManager *v13; // rax\n  char updated; // r14\n  UploadActionPopup *m_descriptionPopup; // rax\n  UploadActionPopup *v16; // rax\n  void *v17[3]; // [rsp+8h] [rbp-58h] BYREF\n  __int128 v18; // [rsp+20h] [rbp-40h] BYREF\n  void *__p; // [rsp+30h] [rbp-30h]\n\n  v5 = !a3;\n  if ( !(!a3 | (((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) != 4)) )\n  {\n    ((void (__fastcall *)(cocos2d::CCMenu *, _QWORD))a1->m_buttonMenu->setEnabled)(a1->m_buttonMenu, 0);\n    v6 = GameLevelManager::sharedState();\n    m_level = a1->m_level;\n    GameLevelManager::deleteLevel(v6, m_level);\n    EditLevelLayer::onBack(a1, m_level);\n    return;\n  }\n  if ( !(v5 | (((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) != 7)) )\n  {\n    EditLevelLayer::onClone(a1);\n    return;\n  }\n  if ( !(v5 | (((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) != 8)) )\n  {\n    v8 = LocalLevelManager::sharedState();\n    LocalLevelManager::moveLevelToTop(v8, a1->m_level);\n    return;\n  }\n  if ( ((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) == 10 )\n  {\n    EditLevelLayer::onShare(a1, a2);\n    return;\n  }\n  if ( ((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) == 5 )\n  {\n    if ( !a3 )\n    {\n      EditLevelLayer::onEdit(a1, a2);\n      return;\n    }\nLABEL_16:\n    v13 = GameManager::sharedState();\n    GameManager::openEditorGuide(v13);\n    return;\n  }\n  if ( v5 | (((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) != 9) )\n  {\n    if ( v5 | (((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) != 6) )\n      return;\n    goto LABEL_16;\n  }\n  EditLevelLayer::closeTextInputs(a1);\n  GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;\n  v9 = GameLevelManager::sharedState();\n  v10 = a1->m_level;\n  v11 = v10->m_levelID.random - v10->m_levelID.seed;\n  if ( (v10->m_levelDesc.m_data.m_short.sizex2 & 1) != 0 )\n  {\n    sub_100006B70(&v18, v10->m_levelDesc.m_data.m_long.longStorage, v10->m_levelDesc.m_data.m_long.size, *(double *)&v3);\n  }\n  else\n  {\n    p_m_levelDesc = &v10->m_levelDesc;\n    __p = p_m_levelDesc->m_data.m_long.longStorage;\n    v3 = *(_OWORD *)&p_m_levelDesc->m_data.m_short.sizex2;\n    v18 = *(_OWORD *)&p_m_levelDesc->m_data.m_short.sizex2;\n  }\n  updated = GameLevelManager::updateDescription(v9, v11, &v18);\n  if ( (v18 & 1) != 0 )\n    operator delete(__p);\n  if ( updated )\n  {\n    m_descriptionPopup = a1->m_descriptionPopup;\n    if ( m_descriptionPopup )\n    {\n      m_descriptionPopup->m_delegate = nullptr;\n      a1->m_descriptionPopup = nullptr;\n    }\n    sub_100030790(v17, \"Updating description...\", *(double *)&v3);\n    v16 = (UploadActionPopup *)UploadActionPopup::create(&a1->UploadPopupDelegate, v17);\n    a1->m_descriptionPopup = v16;\n    if ( ((__int64)v17[0] & 1) != 0 )\n    {\n      operator delete(v17[2]);\n      v16 = a1->m_descriptionPopup;\n    }\n    ((void (__fastcall *)(UploadActionPopup *))v16->show)(v16);\n  }\n}", "assembly": "; \n; EditLevelLayer::FLAlert_Clicked from 0x1001fe120 to 0x1001fe395 (629 bytes)\n; \n; 2 xrefs:\n; > sub_1001FE4E0 @ 0x1001fe4ec\n; > <???> @ 0x1008da7f8\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\npush    rbp                                                            ; +0x0, 0x1001fe120\nmov     rbp, rsp                                                       ; +0x1, 0x1001fe121\npush    r15                                                            ; +0x4, 0x1001fe124\npush    r14                                                            ; +0x6, 0x1001fe126\npush    r12                                                            ; +0x8, 0x1001fe128\npush    rbx                                                            ; +0xa, 0x1001fe12a\nsub     rsp, 40h                                                       ; +0xb, 0x1001fe12b\nmov     r15d, edx                                                      ; +0xf, 0x1001fe12f\nmov     r14, rsi                                                       ; +0x12, 0x1001fe132\nmov     rbx, rdi                                                       ; +0x15, 0x1001fe135\nmov     r12d, r15d                                                     ; +0x18, 0x1001fe138\nxor     r12b, 1                                                        ; +0x1b, 0x1001fe13b\nmov     rax, [rsi]                                                     ; +0x1f, 0x1001fe13f\nmov     rdi, rsi                                                       ; +0x22, 0x1001fe142\ncall    qword ptr [rax+40h]                                            ; +0x25, 0x1001fe145\ncmp     eax, 4                                                         ; +0x28, 0x1001fe148\nsetnz   al                                                             ; +0x2b, 0x1001fe14b\nor      al, r12b                                                       ; +0x2e, 0x1001fe14e\njnz     short loc_1001FE18D                                            ; +0x31, 0x1001fe151\nmov     rdi, [rbx+1C0h]                                                ; +0x33, 0x1001fe153\nmov     rax, [rdi]                                                     ; +0x3a, 0x1001fe15a\nxor     esi, esi                                                       ; +0x3d, 0x1001fe15d\ncall    qword ptr [rax+4E8h]                                           ; +0x3f, 0x1001fe15f\ncall    GameLevelManager__sharedState                                  ; +0x45, 0x1001fe165\nmov     rsi, [rbx+1C8h]                                                ; +0x4a, 0x1001fe16a\nmov     rdi, rax                                                       ; +0x51, 0x1001fe171\ncall    GameLevelManager__deleteLevel                                  ; +0x54, 0x1001fe174\nmov     rdi, rbx                                                       ; +0x59, 0x1001fe179\nadd     rsp, 40h                                                       ; +0x5c, 0x1001fe17c\npop     rbx                                                            ; +0x60, 0x1001fe180\npop     r12                                                            ; +0x61, 0x1001fe181\npop     r14                                                            ; +0x63, 0x1001fe183\npop     r15                                                            ; +0x65, 0x1001fe185\npop     rbp                                                            ; +0x67, 0x1001fe187\njmp     EditLevelLayer__onBack                                         ; +0x68, 0x1001fe188\nmov     rax, [r14]                                                     ; +0x6d, 0x1001fe18d\nmov     rdi, r14                                                       ; +0x70, 0x1001fe190\ncall    qword ptr [rax+40h]                                            ; +0x73, 0x1001fe193\ncmp     eax, 7                                                         ; +0x76, 0x1001fe196\nsetnz   al                                                             ; +0x79, 0x1001fe199\nor      al, r12b                                                       ; +0x7c, 0x1001fe19c\njnz     short loc_1001FE1B5                                            ; +0x7f, 0x1001fe19f\nmov     rdi, rbx                                                       ; +0x81, 0x1001fe1a1\nadd     rsp, 40h                                                       ; +0x84, 0x1001fe1a4\npop     rbx                                                            ; +0x88, 0x1001fe1a8\npop     r12                                                            ; +0x89, 0x1001fe1a9\npop     r14                                                            ; +0x8b, 0x1001fe1ab\npop     r15                                                            ; +0x8d, 0x1001fe1ad\npop     rbp                                                            ; +0x8f, 0x1001fe1af\njmp     EditLevelLayer__onClone                                        ; +0x90, 0x1001fe1b0\nmov     rax, [r14]                                                     ; +0x95, 0x1001fe1b5\nmov     rdi, r14                                                       ; +0x98, 0x1001fe1b8\ncall    qword ptr [rax+40h]                                            ; +0x9b, 0x1001fe1bb\ncmp     eax, 8                                                         ; +0x9e, 0x1001fe1be\nsetnz   al                                                             ; +0xa1, 0x1001fe1c1\nor      al, r12b                                                       ; +0xa4, 0x1001fe1c4\njnz     short loc_1001FE1E9                                            ; +0xa7, 0x1001fe1c7\ncall    LocalLevelManager__sharedState                                 ; +0xa9, 0x1001fe1c9\nmov     rsi, [rbx+1C8h]                                                ; +0xae, 0x1001fe1ce\nmov     rdi, rax                                                       ; +0xb5, 0x1001fe1d5\nadd     rsp, 40h                                                       ; +0xb8, 0x1001fe1d8\npop     rbx                                                            ; +0xbc, 0x1001fe1dc\npop     r12                                                            ; +0xbd, 0x1001fe1dd\npop     r14                                                            ; +0xbf, 0x1001fe1df\npop     r15                                                            ; +0xc1, 0x1001fe1e1\npop     rbp                                                            ; +0xc3, 0x1001fe1e3\njmp     LocalLevelManager__moveLevelToTop                              ; +0xc4, 0x1001fe1e4\nmov     rax, [r14]                                                     ; +0xc9, 0x1001fe1e9\nmov     rdi, r14                                                       ; +0xcc, 0x1001fe1ec\ncall    qword ptr [rax+40h]                                            ; +0xcf, 0x1001fe1ef\ncmp     eax, 0Ah                                                       ; +0xd2, 0x1001fe1f2\njnz     short loc_1001FE20B                                            ; +0xd5, 0x1001fe1f5\nmov     rdi, rbx                                                       ; +0xd7, 0x1001fe1f7\nadd     rsp, 40h                                                       ; +0xda, 0x1001fe1fa\npop     rbx                                                            ; +0xde, 0x1001fe1fe\npop     r12                                                            ; +0xdf, 0x1001fe1ff\npop     r14                                                            ; +0xe1, 0x1001fe201\npop     r15                                                            ; +0xe3, 0x1001fe203\npop     rbp                                                            ; +0xe5, 0x1001fe205\njmp     EditLevelLayer__onShare                                        ; +0xe6, 0x1001fe206\nmov     rax, [r14]                                                     ; +0xeb, 0x1001fe20b\nmov     rdi, r14                                                       ; +0xee, 0x1001fe20e\ncall    qword ptr [rax+40h]                                            ; +0xf1, 0x1001fe211\ncmp     eax, 5                                                         ; +0xf4, 0x1001fe214\njnz     short loc_1001FE236                                            ; +0xf7, 0x1001fe217\ntest    r15b, r15b                                                     ; +0xf9, 0x1001fe219\njnz     loc_1001FE2BA                                                  ; +0xfc, 0x1001fe21c\nmov     rdi, rbx                                                       ; +0x102, 0x1001fe222\nadd     rsp, 40h                                                       ; +0x105, 0x1001fe225\npop     rbx                                                            ; +0x109, 0x1001fe229\npop     r12                                                            ; +0x10a, 0x1001fe22a\npop     r14                                                            ; +0x10c, 0x1001fe22c\npop     r15                                                            ; +0x10e, 0x1001fe22e\npop     rbp                                                            ; +0x110, 0x1001fe230\njmp     EditLevelLayer__onEdit                                         ; +0x111, 0x1001fe231\nmov     rax, [r14]                                                     ; +0x116, 0x1001fe236\nmov     rdi, r14                                                       ; +0x119, 0x1001fe239\ncall    qword ptr [rax+40h]                                            ; +0x11c, 0x1001fe23c\ncmp     eax, 9                                                         ; +0x11f, 0x1001fe23f\nsetnz   al                                                             ; +0x122, 0x1001fe242\nor      al, r12b                                                       ; +0x125, 0x1001fe245\njnz     short loc_1001FE2A2                                            ; +0x128, 0x1001fe248\nmov     rdi, rbx                                                       ; +0x12a, 0x1001fe24a\ncall    EditLevelLayer__closeTextInputs                                ; +0x12d, 0x1001fe24d\ncall    GameLevelManager__sharedState                                  ; +0x132, 0x1001fe252\nlea     rcx, [rbx+1A8h]                                                ; +0x137, 0x1001fe257\nmov     [rax+328h], rcx                                                ; +0x13e, 0x1001fe25e\ncall    GameLevelManager__sharedState                                  ; +0x145, 0x1001fe265\nmov     r14, rax                                                       ; +0x14a, 0x1001fe26a\nmov     rax, [rbx+1C8h]                                                ; +0x14d, 0x1001fe26d\nmov     r15d, [rax+148h]                                               ; +0x154, 0x1001fe274\nsub     r15d, [rax+14Ch]                                               ; +0x15b, 0x1001fe27b\ntest    byte ptr [rax+170h], 1                                         ; +0x162, 0x1001fe282\njnz     short loc_1001FE2D3                                            ; +0x169, 0x1001fe289\nadd     rax, 170h                                                      ; +0x16b, 0x1001fe28b\nmov     rcx, [rax+10h]                                                 ; +0x171, 0x1001fe291\nmov     [rbp+__p], rcx                                                 ; +0x175, 0x1001fe295\nmovups  xmm0, xmmword ptr [rax]                                        ; +0x179, 0x1001fe299\nmovaps  [rbp+var_40], xmm0                                             ; +0x17c, 0x1001fe29c\njmp     short loc_1001FE2EA                                            ; +0x180, 0x1001fe2a0\nmov     rax, [r14]                                                     ; +0x182, 0x1001fe2a2\nmov     rdi, r14                                                       ; +0x185, 0x1001fe2a5\ncall    qword ptr [rax+40h]                                            ; +0x188, 0x1001fe2a8\ncmp     eax, 6                                                         ; +0x18b, 0x1001fe2ab\nsetnz   al                                                             ; +0x18e, 0x1001fe2ae\nor      al, r12b                                                       ; +0x191, 0x1001fe2b1\njnz     loc_1001FE388                                                  ; +0x194, 0x1001fe2b4\ncall    GameManager__sharedState                                       ; +0x19a, 0x1001fe2ba\nmov     rdi, rax                                                       ; +0x19f, 0x1001fe2bf\nadd     rsp, 40h                                                       ; +0x1a2, 0x1001fe2c2\npop     rbx                                                            ; +0x1a6, 0x1001fe2c6\npop     r12                                                            ; +0x1a7, 0x1001fe2c7\npop     r14                                                            ; +0x1a9, 0x1001fe2c9\npop     r15                                                            ; +0x1ab, 0x1001fe2cb\npop     rbp                                                            ; +0x1ad, 0x1001fe2cd\njmp     GameManager__openEditorGuide                                   ; +0x1ae, 0x1001fe2ce\nmov     rdx, [rax+178h]                                                ; +0x1b3, 0x1001fe2d3\nmov     rsi, [rax+180h]                                                ; +0x1ba, 0x1001fe2da\nlea     rdi, [rbp+var_40]                                              ; +0x1c1, 0x1001fe2e1\ncall    sub_100006B70                                                  ; +0x1c5, 0x1001fe2e5\nlea     r12, [rbp+__p]                                                 ; +0x1ca, 0x1001fe2ea\nlea     rdx, [rbp+var_40]                                              ; +0x1ce, 0x1001fe2ee\nmov     rdi, r14                                                       ; +0x1d2, 0x1001fe2f2\nmov     esi, r15d                                                      ; +0x1d5, 0x1001fe2f5\ncall    GameLevelManager__updateDescription                            ; +0x1d8, 0x1001fe2f8\nmov     r14d, eax                                                      ; +0x1dd, 0x1001fe2fd\ntest    byte ptr [rbp+var_40], 1                                       ; +0x1e0, 0x1001fe300\njz      short loc_1001FE30F                                            ; +0x1e4, 0x1001fe304\nmov     rdi, [rbp+__p]; __p                                            ; +0x1e6, 0x1001fe306\ncall    __ZdlPv; operator delete(void *)                               ; +0x1ea, 0x1001fe30a\ntest    r14b, r14b                                                     ; +0x1ef, 0x1001fe30f\njz      short loc_1001FE388                                            ; +0x1f2, 0x1001fe312\nmov     rax, [rbx+200h]                                                ; +0x1f4, 0x1001fe314\ntest    rax, rax                                                       ; +0x1fb, 0x1001fe31b\njz      short loc_1001FE336                                            ; +0x1fe, 0x1001fe31e\nmov     qword ptr [rax+278h], 0                                        ; +0x200, 0x1001fe320\nmov     qword ptr [rbx+200h], 0                                        ; +0x20b, 0x1001fe32b\nlea     r12, [rbp+var_48]                                              ; +0x216, 0x1001fe336\nlea     r14, [rbx+1B0h]                                                ; +0x21a, 0x1001fe33a\nlea     rsi, aUpdatingDescri; \"Updating description...\"                ; +0x221, 0x1001fe341\nlea     r15, [rbp+var_58]                                              ; +0x228, 0x1001fe348\nmov     rdi, r15                                                       ; +0x22c, 0x1001fe34c\ncall    sub_100030790                                                  ; +0x22f, 0x1001fe34f\nmov     rdi, r14                                                       ; +0x234, 0x1001fe354\nmov     rsi, r15                                                       ; +0x237, 0x1001fe357\ncall    UploadActionPopup__create                                      ; +0x23a, 0x1001fe35a\nmov     [rbx+200h], rax                                                ; +0x23f, 0x1001fe35f\ntest    [rbp+var_58], 1                                                ; +0x246, 0x1001fe366\njz      short loc_1001FE37C                                            ; +0x24a, 0x1001fe36a\nmov     rdi, [rbp+var_48]; __p                                         ; +0x24c, 0x1001fe36c\ncall    __ZdlPv; operator delete(void *)                               ; +0x250, 0x1001fe370\nmov     rax, [rbx+200h]                                                ; +0x255, 0x1001fe375\nmov     rcx, [rax]                                                     ; +0x25c, 0x1001fe37c\nmov     rdi, rax                                                       ; +0x25f, 0x1001fe37f\ncall    qword ptr [rcx+508h]                                           ; +0x262, 0x1001fe382\nadd     rsp, 40h                                                       ; +0x268, 0x1001fe388\npop     rbx                                                            ; +0x26c, 0x1001fe38c\npop     r12                                                            ; +0x26d, 0x1001fe38d\npop     r14                                                            ; +0x26f, 0x1001fe38f\npop     r15                                                            ; +0x271, 0x1001fe391\npop     rbp                                                            ; +0x273, 0x1001fe393\nretn                                                                   ; +0x274, 0x1001fe394", "xrefs": ["sub_1001FE4E0 @ 0x1001fe4ec", "<???> @ 0x1008da7f8"], "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"}