{"type": "func", "start": 7221052, "end": 7221848, "name": "EditLevelLayer::FLAlert_Clicked", "pseudocode": "// \n// EditLevelLayer::FLAlert_Clicked from 0x6e2f3c to 0x6e3258 (796 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x6e325c\n// > <???> @ 0x7f080\n// > <???> @ 0x115be08\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 EditLevelLayer::FLAlert_Clicked(EditLevelLayer *a1, FLAlertLayer *a2, bool a3)\n{\n  _BOOL4 v5; // w21\n  GameLevelManager *v6; // x23\n  GJGameLevel *m_level; // x3\n  int v8; // w21\n  int updated; // w23\n  UploadPopupDelegate_vtbl *v10; // x0\n  UploadActionPopup *m_descriptionPopup; // x0\n  UploadActionPopup *v12; // x0\n  UploadPopupDelegate_vtbl *v13; // x1\n  GameManager *v14; // x0\n  unsigned int *v15; // x1\n  int onClosePopup; // w2\n  unsigned int *v17; // x19\n  int v18; // w0\n  UploadPopupDelegate v19; // [xsp+50h] [xbp+50h] BYREF\n  std::string v20; // 0:x2.8\n\n  v5 = a3;\n  if ( a2->getTag(a2) == 4 && v5 )\n  {\n    EditLevelLayer::onDelete(a1);\n    return;\n  }\n  if ( a2->getTag(a2) == 7 && v5 )\n  {\n    EditLevelLayer::onClone(a1);\n    return;\n  }\n  if ( a2->getTag(a2) == 8 && v5 )\n  {\n    EditLevelLayer::onMoveToTop(a1);\n    return;\n  }\n  if ( a2->getTag(a2) == 10 )\n  {\n    EditLevelLayer::onShare(a1, nullptr);\n    return;\n  }\n  if ( a2->getTag(a2) == 5 )\n  {\n    if ( !v5 )\n    {\n      EditLevelLayer::onEdit(a1, nullptr);\n      return;\n    }\n    goto LABEL_22;\n  }\n  if ( a2->getTag(a2) != 9 || !v5 )\n  {\n    if ( a2->getTag(a2) != 6 || !v5 )\n      return;\nLABEL_22:\n    v14 = GameManager::sharedState();\n    GameManager::openEditorGuide(v14);\n    return;\n  }\n  EditLevelLayer::closeTextInputs(a1);\n  GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;\n  v6 = GameLevelManager::sharedState();\n  m_level = a1->m_level;\n  v8 = m_level->m_levelID.random - m_level->m_levelID.seed;\n  sub_D18D28(&v19, &m_level->m_levelDesc);\n  updated = (unsigned __int8)GameLevelManager::updateDescription(v6, v8, (std::string)&v19);\n  v10 = v19.__vftable - 3;\n  if ( (__int64 *)&v19.__vftable[-3] != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v15 = (unsigned int *)&v19.__vftable[-1];\n      do\n        onClosePopup = __ldaxr(v15);\n      while ( __stlxr(onClosePopup - 1, v15) );\n    }\n    else\n    {\n      onClosePopup = (int)v19.__vftable[-1].onClosePopup;\n      LODWORD(v19.__vftable[-1].onClosePopup) = onClosePopup - 1;\n    }\n    if ( onClosePopup <= 0 )\n      operator delete(v10);\n  }\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_D153B8((int)&v19, \"Updating description...\");\n    v12 = (UploadActionPopup *)UploadActionPopup::create((UploadActionPopup *)&a1->UploadPopupDelegate, &v19, v20);\n    a1->m_descriptionPopup = v12;\n    v13 = v19.__vftable - 3;\n    if ( (__int64 *)&v19.__vftable[-3] != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v17 = (unsigned int *)&v19.__vftable[-1];\n        do\n          v18 = __ldaxr(v17);\n        while ( __stlxr(v18 - 1, v17) );\n      }\n      else\n      {\n        v18 = (int)v19.__vftable[-1].onClosePopup;\n        LODWORD(v19.__vftable[-1].onClosePopup) = v18 - 1;\n      }\n      if ( v18 <= 0 )\n        operator delete(v13);\n      v12 = a1->m_descriptionPopup;\n    }\n    v12->show(v12);\n  }\n}", "assembly": "; \n; EditLevelLayer::FLAlert_Clicked from 0x6e2f3c to 0x6e3258 (796 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x6e325c\n; > <???> @ 0x7f080\n; > <???> @ 0x115be08\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\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x6e2f3c\nMOV             X29, SP                                                ; +0x4, 0x6e2f40\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x8, 0x6e2f44\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x6e2f48\nMOV             X19, X1                                                ; +0x10, 0x6e2f4c\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x14, 0x6e2f50\nMOV             X22, X0                                                ; +0x18, 0x6e2f54\nUXTB            W21, W2                                                ; +0x1c, 0x6e2f58\nMOV             X0, X1                                                 ; +0x20, 0x6e2f5c\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x6e2f60\nLDR             X1, [X1]                                               ; +0x28, 0x6e2f64\nSTR             X23, [SP,#0x60+var_30]                                 ; +0x2c, 0x6e2f68\nLDR             X2, [X2]                                               ; +0x30, 0x6e2f6c\nLDR             X1, [X1,#0x40]                                         ; +0x34, 0x6e2f70\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x38, 0x6e2f74\nBLR             X1                                                     ; +0x3c, 0x6e2f78\nCMP             W0, #4                                                 ; +0x40, 0x6e2f7c\nB.NE            loc_6E2FB8                                             ; +0x44, 0x6e2f80\nCBZ             W21, loc_6E2FB8                                        ; +0x48, 0x6e2f84\nMOV             X0, X22; this                                          ; +0x4c, 0x6e2f88\nBL              _ZN14EditLevelLayer8onDeleteEv; EditLevelLayer::onDelete(void) ; +0x50, 0x6e2f8c\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x54, 0x6e2f90\nLDR             X1, [X29,#0x60+var_8]                                  ; +0x58, 0x6e2f94\nLDR             X0, [X20]                                              ; +0x5c, 0x6e2f98\nCMP             X1, X0                                                 ; +0x60, 0x6e2f9c\nB.NE            loc_6E3200                                             ; +0x64, 0x6e2fa0\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0x68, 0x6e2fa4\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0x6c, 0x6e2fa8\nLDR             X23, [SP,#0x60+var_30]                                 ; +0x70, 0x6e2fac\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0x74, 0x6e2fb0\nRET                                                                    ; +0x78, 0x6e2fb4\nLDR             X1, [X19]                                              ; +0x7c, 0x6e2fb8\nMOV             X0, X19                                                ; +0x80, 0x6e2fbc\nLDR             X1, [X1,#0x40]                                         ; +0x84, 0x6e2fc0\nBLR             X1                                                     ; +0x88, 0x6e2fc4\nCMP             W0, #7                                                 ; +0x8c, 0x6e2fc8\nB.NE            loc_6E2FE0                                             ; +0x90, 0x6e2fcc\nCBZ             W21, loc_6E2FE0                                        ; +0x94, 0x6e2fd0\nMOV             X0, X22; this                                          ; +0x98, 0x6e2fd4\nBL              _ZN14EditLevelLayer7onCloneEv; EditLevelLayer::onClone(void) ; +0x9c, 0x6e2fd8\nB               loc_6E2F90                                             ; +0xa0, 0x6e2fdc\nLDR             X1, [X19]                                              ; +0xa4, 0x6e2fe0\nMOV             X0, X19                                                ; +0xa8, 0x6e2fe4\nLDR             X1, [X1,#0x40]                                         ; +0xac, 0x6e2fe8\nBLR             X1                                                     ; +0xb0, 0x6e2fec\nCMP             W0, #8                                                 ; +0xb4, 0x6e2ff0\nB.NE            loc_6E3008                                             ; +0xb8, 0x6e2ff4\nCBZ             W21, loc_6E3008                                        ; +0xbc, 0x6e2ff8\nMOV             X0, X22; this                                          ; +0xc0, 0x6e2ffc\nBL              _ZN14EditLevelLayer11onMoveToTopEv; EditLevelLayer::onMoveToTop(void) ; +0xc4, 0x6e3000\nB               loc_6E2F90                                             ; +0xc8, 0x6e3004\nLDR             X1, [X19]                                              ; +0xcc, 0x6e3008\nMOV             X0, X19                                                ; +0xd0, 0x6e300c\nLDR             X1, [X1,#0x40]                                         ; +0xd4, 0x6e3010\nBLR             X1                                                     ; +0xd8, 0x6e3014\nCMP             W0, #0xA                                               ; +0xdc, 0x6e3018\nB.EQ            loc_6E318C                                             ; +0xe0, 0x6e301c\nLDR             X1, [X19]                                              ; +0xe4, 0x6e3020\nMOV             X0, X19                                                ; +0xe8, 0x6e3024\nLDR             X1, [X1,#0x40]                                         ; +0xec, 0x6e3028\nBLR             X1                                                     ; +0xf0, 0x6e302c\nCMP             W0, #5                                                 ; +0xf4, 0x6e3030\nB.EQ            loc_6E3118                                             ; +0xf8, 0x6e3034\nLDR             X1, [X19]                                              ; +0xfc, 0x6e3038\nMOV             X0, X19                                                ; +0x100, 0x6e303c\nLDR             X1, [X1,#0x40]                                         ; +0x104, 0x6e3040\nBLR             X1                                                     ; +0x108, 0x6e3044\nCMP             W0, #9                                                 ; +0x10c, 0x6e3048\nB.NE            loc_6E3128                                             ; +0x110, 0x6e304c\nCBZ             W21, loc_6E3128                                        ; +0x114, 0x6e3050\nMOV             X0, X22; this                                          ; +0x118, 0x6e3054\nADD             X19, X29, #0x60+var_10                                 ; +0x11c, 0x6e3058\nBL              _ZN14EditLevelLayer15closeTextInputsEv; EditLevelLayer::closeTextInputs(void) ; +0x120, 0x6e305c\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x124, 0x6e3060\nADD             X1, X22, #0x1A8                                        ; +0x128, 0x6e3064\nSTR             X1, [X0,#0x338]                                        ; +0x12c, 0x6e3068\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x130, 0x6e306c\nMOV             X23, X0                                                ; +0x134, 0x6e3070\nLDR             X3, [X22,#0x1C8]                                       ; +0x138, 0x6e3074\nMOV             X0, X19                                                ; +0x13c, 0x6e3078\nADD             X1, X3, #0x160                                         ; +0x140, 0x6e307c\nLDR             W2, [X3,#0x148]                                        ; +0x144, 0x6e3080\nLDR             W21, [X3,#0x14C]                                       ; +0x148, 0x6e3084\nSUB             W21, W2, W21                                           ; +0x14c, 0x6e3088\nBL              sub_D18D28                                             ; +0x150, 0x6e308c\nMOV             X0, X23                                                ; +0x154, 0x6e3090\nMOV             W1, W21                                                ; +0x158, 0x6e3094\nMOV             X2, X19                                                ; +0x15c, 0x6e3098\nBL              _ZN16GameLevelManager17updateDescriptionEiSs; GameLevelManager::updateDescription(int,std::string) ; +0x160, 0x6e309c\nADRP            X21, #off_122EFE8@PAGE                                 ; +0x164, 0x6e30a0\nLDR             X1, [X29,#0x60+var_10]                                 ; +0x168, 0x6e30a4\nUXTB            W23, W0                                                ; +0x16c, 0x6e30a8\nSUB             X0, X1, #0x18; p                                       ; +0x170, 0x6e30ac\nLDR             X2, [X21,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x174, 0x6e30b0\nCMP             X0, X2                                                 ; +0x178, 0x6e30b4\nB.NE            loc_6E3158                                             ; +0x17c, 0x6e30b8\nCBZ             W23, loc_6E2F90                                        ; +0x180, 0x6e30bc\nLDR             X0, [X22,#0x1F0]                                       ; +0x184, 0x6e30c0\nCBZ             X0, loc_6E30D0                                         ; +0x188, 0x6e30c4\nSTR             XZR, [X0,#0x278]                                       ; +0x18c, 0x6e30c8\nSTR             XZR, [X22,#0x1F0]                                      ; +0x190, 0x6e30cc\nADRP            X1, #aUpdatingDescri@PAGE; \"Updating description...\"   ; +0x194, 0x6e30d0\nMOV             X0, X19; int                                           ; +0x198, 0x6e30d4\nADD             X1, X1, #aUpdatingDescri@PAGEOFF; \"Updating description...\" ; +0x19c, 0x6e30d8\nADD             X2, X29, #0x60+var_20                                  ; +0x1a0, 0x6e30dc\nBL              sub_D153B8                                             ; +0x1a4, 0x6e30e0\nADD             X0, X22, #0x1B0                                        ; +0x1a8, 0x6e30e4\nMOV             X1, X19                                                ; +0x1ac, 0x6e30e8\nBL              _ZN17UploadActionPopup6createEP19UploadPopupDelegateSs; UploadActionPopup::create(UploadPopupDelegate *,std::string) ; +0x1b0, 0x6e30ec\nSTR             X0, [X22,#0x1F0]                                       ; +0x1b4, 0x6e30f0\nLDR             X19, [X29,#0x60+var_10]                                ; +0x1b8, 0x6e30f4\nLDR             X21, [X21,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0x1bc, 0x6e30f8\nSUB             X1, X19, #0x18                                         ; +0x1c0, 0x6e30fc\nCMP             X1, X21                                                ; +0x1c4, 0x6e3100\nB.NE            loc_6E319C                                             ; +0x1c8, 0x6e3104\nLDR             X1, [X0]                                               ; +0x1cc, 0x6e3108\nLDR             X1, [X1,#0x508]                                        ; +0x1d0, 0x6e310c\nBLR             X1                                                     ; +0x1d4, 0x6e3110\nB               loc_6E2F90                                             ; +0x1d8, 0x6e3114\nCBZ             W21, loc_6E3148                                        ; +0x1dc, 0x6e3118\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x1e0, 0x6e311c\nBL              _ZN11GameManager15openEditorGuideEv; GameManager::openEditorGuide(void) ; +0x1e4, 0x6e3120\nB               loc_6E2F90                                             ; +0x1e8, 0x6e3124\nLDR             X1, [X19]                                              ; +0x1ec, 0x6e3128\nMOV             X0, X19                                                ; +0x1f0, 0x6e312c\nLDR             X1, [X1,#0x40]                                         ; +0x1f4, 0x6e3130\nBLR             X1                                                     ; +0x1f8, 0x6e3134\nCMP             W0, #6                                                 ; +0x1fc, 0x6e3138\nB.NE            loc_6E2F90                                             ; +0x200, 0x6e313c\nCBNZ            W21, loc_6E311C                                        ; +0x204, 0x6e3140\nB               loc_6E2F90                                             ; +0x208, 0x6e3144\nMOV             X0, X22; this                                          ; +0x20c, 0x6e3148\nMOV             X1, #0; cocos2d::CCObject *                            ; +0x210, 0x6e314c\nBL              _ZN14EditLevelLayer6onEditEPN7cocos2d8CCObjectE; EditLevelLayer::onEdit(cocos2d::CCObject *) ; +0x214, 0x6e3150\nB               loc_6E2F90                                             ; +0x218, 0x6e3154\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x21c, 0x6e3158\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x220, 0x6e315c\nCBZ             X2, loc_6E31E0                                         ; +0x224, 0x6e3160\nSUB             X1, X1, #8                                             ; +0x228, 0x6e3164\nLDAXR           W2, [X1]                                               ; +0x22c, 0x6e3168\nSUB             W3, W2, #1                                             ; +0x230, 0x6e316c\nSTLXR           W4, W3, [X1]                                           ; +0x234, 0x6e3170\nCBNZ            W4, loc_6E3168                                         ; +0x238, 0x6e3174\nCMP             W2, WZR                                                ; +0x23c, 0x6e3178\nB.GT            loc_6E30BC                                             ; +0x240, 0x6e317c\nADD             X1, X29, #0x60+var_18                                  ; +0x244, 0x6e3180\nBL              j__ZdlPv; operator delete(void *)                      ; +0x248, 0x6e3184\nB               loc_6E30BC                                             ; +0x24c, 0x6e3188\nMOV             X0, X22; this                                          ; +0x250, 0x6e318c\nMOV             X1, #0; cocos2d::CCObject *                            ; +0x254, 0x6e3190\nBL              _ZN14EditLevelLayer7onShareEPN7cocos2d8CCObjectE; EditLevelLayer::onShare(cocos2d::CCObject *) ; +0x258, 0x6e3194\nB               loc_6E2F90                                             ; +0x25c, 0x6e3198\nADRP            X0, #pthread_create_ptr_0@PAGE                         ; +0x260, 0x6e319c\nLDR             X0, [X0,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x264, 0x6e31a0\nCBZ             X0, loc_6E31F0                                         ; +0x268, 0x6e31a4\nSUB             X19, X19, #8                                           ; +0x26c, 0x6e31a8\nLDAXR           W0, [X19]                                              ; +0x270, 0x6e31ac\nSUB             W2, W0, #1                                             ; +0x274, 0x6e31b0\nSTLXR           W3, W2, [X19]                                          ; +0x278, 0x6e31b4\nCBNZ            W3, loc_6E31AC                                         ; +0x27c, 0x6e31b8\nCMP             W0, WZR                                                ; +0x280, 0x6e31bc\nB.LE            loc_6E31CC                                             ; +0x284, 0x6e31c0\nLDR             X0, [X22,#0x1F0]                                       ; +0x288, 0x6e31c4\nB               loc_6E3108                                             ; +0x28c, 0x6e31c8\nMOV             X0, X1; p                                              ; +0x290, 0x6e31cc\nADD             X1, X29, #0x60+var_18                                  ; +0x294, 0x6e31d0\nBL              j__ZdlPv; operator delete(void *)                      ; +0x298, 0x6e31d4\nLDR             X0, [X22,#0x1F0]                                       ; +0x29c, 0x6e31d8\nB               loc_6E3108                                             ; +0x2a0, 0x6e31dc\nLDUR            W2, [X1,#-8]                                           ; +0x2a4, 0x6e31e0\nSUB             W3, W2, #1                                             ; +0x2a8, 0x6e31e4\nSTUR            W3, [X1,#-8]                                           ; +0x2ac, 0x6e31e8\nB               loc_6E3178                                             ; +0x2b0, 0x6e31ec\nLDUR            W0, [X19,#-8]                                          ; +0x2b4, 0x6e31f0\nSUB             W2, W0, #1                                             ; +0x2b8, 0x6e31f4\nSTUR            W2, [X19,#-8]                                          ; +0x2bc, 0x6e31f8\nB               loc_6E31BC                                             ; +0x2c0, 0x6e31fc\nBL              .__stack_chk_fail                                      ; +0x2c4, 0x6e3200\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x2c8, 0x6e3204\nMOV             X19, X0                                                ; +0x2cc, 0x6e3208\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x2d0, 0x6e320c\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x2d4, 0x6e3210\nSUB             X0, X0, #0x18                                          ; +0x2d8, 0x6e3214\nCMP             X0, X1                                                 ; +0x2dc, 0x6e3218\nB.EQ            loc_6E3228                                             ; +0x2e0, 0x6e321c\nADD             X1, X29, #0x60+var_18                                  ; +0x2e4, 0x6e3220\nBL              sub_4DB8F0                                             ; +0x2e8, 0x6e3224\nMOV             X0, X19                                                ; +0x2ec, 0x6e3228\nBL              _Unwind_Resume                                         ; +0x2f0, 0x6e322c\nMOV             X20, X0                                                ; +0x2f4, 0x6e3230\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x2f8, 0x6e3234\nLDR             X21, [X21,#0xFE8]                                      ; +0x2fc, 0x6e3238\nSUB             X0, X0, #0x18                                          ; +0x300, 0x6e323c\nCMP             X0, X21                                                ; +0x304, 0x6e3240\nB.EQ            loc_6E3250                                             ; +0x308, 0x6e3244\nADD             X1, X29, #0x60+var_18                                  ; +0x30c, 0x6e3248\nBL              sub_4DB8F0                                             ; +0x310, 0x6e324c\nMOV             X0, X20                                                ; +0x314, 0x6e3250\nBL              _Unwind_Resume                                         ; +0x318, 0x6e3254", "xrefs": ["`non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x6e325c", "<???> @ 0x7f080", "<???> @ 0x115be08"], "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"}