{"type": "func", "start": 4858200, "end": 4858590, "name": "EditLevelLayer::FLAlert_Clicked", "pseudocode": "// \n// EditLevelLayer::FLAlert_Clicked from 0x4a2158 to 0x4a22de (390 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x4a22ec\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:51 +0000\n// \n\nint __fastcall EditLevelLayer::FLAlert_Clicked(GJGameLevel **this, FLAlertLayer *a2, int a3, int a4)\n{\n  int result; // r0\n  GameManager *v8; // r0\n  EditLevelLayer *v9; // r0\n  GameLevelManager *v10; // r0\n  GameLevelManager *v11; // r0\n  int v12; // r0\n  int v13; // r6\n  int v14; // r8\n  int updated; // r6\n  int v16; // r2\n  GJGameLevel **v17; // [sp+0h] [bp-10h] BYREF\n  FLAlertLayer *v18; // [sp+4h] [bp-Ch]\n  int v19; // [sp+8h] [bp-8h]\n  int v20; // [sp+Ch] [bp-4h]\n\n  v17 = this;\n  v18 = a2;\n  v19 = a3;\n  v20 = a4;\n  if ( (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)a2 + 32))(a2) == 4 && a3 )\n    return EditLevelLayer::onDelete((EditLevelLayer *)this);\n  if ( (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)a2 + 32))(a2) == 7 && a3 )\n    return EditLevelLayer::onClone(this);\n  if ( (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)a2 + 32))(a2) == 8 && a3 )\n    return EditLevelLayer::onMoveToTop(this);\n  if ( (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)a2 + 32))(a2) == 12 && a3 )\n    return EditLevelLayer::onMoveToBottom(this);\n  if ( (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)a2 + 32))(a2) == 10 )\n    return EditLevelLayer::onShare(this, nullptr);\n  if ( (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)a2 + 32))(a2) == 5 )\n  {\n    if ( a3 )\n    {\n      v8 = (GameManager *)GameManager::sharedState((GameManager *)&byte_5);\n      return GameManager::openEditorGuide(v8);\n    }\n    else\n    {\n      return EditLevelLayer::onEdit(this, nullptr);\n    }\n  }\n  else if ( (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)a2 + 32))(a2) == 9 && a3 )\n  {\n    v10 = (GameLevelManager *)EditLevelLayer::closeTextInputs(this);\n    v11 = (GameLevelManager *)GameLevelManager::sharedState(v10);\n    *((_DWORD *)v11 + 222) = this + 81;\n    v12 = GameLevelManager::sharedState(v11);\n    v13 = *((_DWORD *)*(this + 87) + 67) - *((_DWORD *)*(this + 87) + 68);\n    v14 = v12;\n    std::string::basic_string((int *)&v17, (int)*(this + 87) + 292);\n    updated = GameLevelManager::updateDescription(v14, v13, &v17);\n    result = std::string::~string((int)&v17);\n    if ( updated )\n    {\n      v16 = (int)*(this + 95);\n      if ( v16 )\n      {\n        *(_DWORD *)(v16 + 520) = 0;\n        *(this + 95) = nullptr;\n      }\n      v17 = nullptr;\n      v18 = nullptr;\n      v19 = 0;\n      std::string::__init((int *)&v17, \"Updating description...\", 0x17u);\n      *(this + 95) = (GJGameLevel *)UploadActionPopup::create(this + 82, &v17);\n      std::string::~string((int)&v17);\n      return (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 95) + 656))(*(this + 95));\n    }\n  }\n  else\n  {\n    result = (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)a2 + 32))(a2);\n    if ( result == 11 )\n    {\n      if ( a3 )\n      {\n        v9 = (EditLevelLayer *)this;\n        *((_BYTE *)this + 384) = 1;\n      }\n      else\n      {\n        GJGameLevel::clearPlatformerSave(*(this + 87));\n        v9 = (EditLevelLayer *)this;\n      }\n      return EditLevelLayer::onPlay(v9, nullptr);\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditLevelLayer::FLAlert_Clicked from 0x4a2158 to 0x4a22de (390 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x4a22ec\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:51 +0000\n; \nPUSH.W          {R0-R8,LR}                                             ; +0x0, 0x4a2158\nMOV             R4, R0                                                 ; +0x4, 0x4a215c\nLDR             R7, =(__stack_chk_guard_ptr - 0x4A216A)                ; +0x6, 0x4a215e\nMOV             R0, R1                                                 ; +0x8, 0x4a2160\nMOV             R5, R1                                                 ; +0xa, 0x4a2162\nMOV             R6, R2                                                 ; +0xc, 0x4a2164\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x4a2166\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x4a2168\nLDR             R3, [R7]                                               ; +0x12, 0x4a216a\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x14, 0x4a216c\nLDR             R3, [R1]                                               ; +0x16, 0x4a216e\nLDR             R3, [R3,#0x20]                                         ; +0x18, 0x4a2170\nBLX             R3                                                     ; +0x1a, 0x4a2172\nCMP             R0, #4                                                 ; +0x1c, 0x4a2174\nBNE             loc_4A217A                                             ; +0x1e, 0x4a2176\nCBNZ            R6, loc_4A2190                                         ; +0x20, 0x4a2178\nLDR             R3, [R5]                                               ; +0x22, 0x4a217a\nMOV             R0, R5                                                 ; +0x24, 0x4a217c\nLDR             R3, [R3,#0x20]                                         ; +0x26, 0x4a217e\nBLX             R3                                                     ; +0x28, 0x4a2180\nCMP             R0, #7                                                 ; +0x2a, 0x4a2182\nBNE             loc_4A2198                                             ; +0x2c, 0x4a2184\nCBZ             R6, loc_4A2198                                         ; +0x2e, 0x4a2186\nMOV             R0, R4; this                                           ; +0x30, 0x4a2188\nBL              _ZN14EditLevelLayer7onCloneEv; EditLevelLayer::onClone(void) ; +0x32, 0x4a218a\nB               loc_4A22CC                                             ; +0x36, 0x4a218e\nMOV             R0, R4; this                                           ; +0x38, 0x4a2190\nBL              _ZN14EditLevelLayer8onDeleteEv; EditLevelLayer::onDelete(void) ; +0x3a, 0x4a2192\nB               loc_4A22CC                                             ; +0x3e, 0x4a2196\nLDR             R3, [R5]                                               ; +0x40, 0x4a2198\nMOV             R0, R5                                                 ; +0x42, 0x4a219a\nLDR             R3, [R3,#0x20]                                         ; +0x44, 0x4a219c\nBLX             R3                                                     ; +0x46, 0x4a219e\nCMP             R0, #8                                                 ; +0x48, 0x4a21a0\nBNE             loc_4A21AE                                             ; +0x4a, 0x4a21a2\nCBZ             R6, loc_4A21AE                                         ; +0x4c, 0x4a21a4\nMOV             R0, R4; this                                           ; +0x4e, 0x4a21a6\nBL              _ZN14EditLevelLayer11onMoveToTopEv; EditLevelLayer::onMoveToTop(void) ; +0x50, 0x4a21a8\nB               loc_4A22CC                                             ; +0x54, 0x4a21ac\nLDR             R3, [R5]                                               ; +0x56, 0x4a21ae\nMOV             R0, R5                                                 ; +0x58, 0x4a21b0\nLDR             R3, [R3,#0x20]                                         ; +0x5a, 0x4a21b2\nBLX             R3                                                     ; +0x5c, 0x4a21b4\nCMP             R0, #0xC                                               ; +0x5e, 0x4a21b6\nBNE             loc_4A21C4                                             ; +0x60, 0x4a21b8\nCBZ             R6, loc_4A21C4                                         ; +0x62, 0x4a21ba\nMOV             R0, R4; this                                           ; +0x64, 0x4a21bc\nBL              _ZN14EditLevelLayer14onMoveToBottomEv; EditLevelLayer::onMoveToBottom(void) ; +0x66, 0x4a21be\nB               loc_4A22CC                                             ; +0x6a, 0x4a21c2\nLDR             R3, [R5]                                               ; +0x6c, 0x4a21c4\nMOV             R0, R5                                                 ; +0x6e, 0x4a21c6\nLDR             R3, [R3,#0x20]                                         ; +0x70, 0x4a21c8\nBLX             R3                                                     ; +0x72, 0x4a21ca\nCMP             R0, #0xA                                               ; +0x74, 0x4a21cc\nBNE             loc_4A21DA                                             ; +0x76, 0x4a21ce\nMOV             R0, R4; this                                           ; +0x78, 0x4a21d0\nMOVS            R1, #0; cocos2d::CCObject *                            ; +0x7a, 0x4a21d2\nBL              _ZN14EditLevelLayer7onShareEPN7cocos2d8CCObjectE; EditLevelLayer::onShare(cocos2d::CCObject *) ; +0x7c, 0x4a21d4\nB               loc_4A22CC                                             ; +0x80, 0x4a21d8\nLDR             R3, [R5]                                               ; +0x82, 0x4a21da\nMOV             R0, R5                                                 ; +0x84, 0x4a21dc\nLDR             R3, [R3,#0x20]                                         ; +0x86, 0x4a21de\nBLX             R3                                                     ; +0x88, 0x4a21e0\nCMP             R0, #5                                                 ; +0x8a, 0x4a21e2\nBNE             loc_4A21FC                                             ; +0x8c, 0x4a21e4\nCBZ             R6, loc_4A21F2                                         ; +0x8e, 0x4a21e6\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x90, 0x4a21e8\nBL              _ZN11GameManager15openEditorGuideEv; GameManager::openEditorGuide(void) ; +0x94, 0x4a21ec\nB               loc_4A22CC                                             ; +0x98, 0x4a21f0\nMOV             R0, R4; this                                           ; +0x9a, 0x4a21f2\nMOV             R1, R6; cocos2d::CCObject *                            ; +0x9c, 0x4a21f4\nBL              _ZN14EditLevelLayer6onEditEPN7cocos2d8CCObjectE; EditLevelLayer::onEdit(cocos2d::CCObject *) ; +0x9e, 0x4a21f6\nB               loc_4A22CC                                             ; +0xa2, 0x4a21fa\nLDR             R3, [R5]                                               ; +0xa4, 0x4a21fc\nMOV             R0, R5                                                 ; +0xa6, 0x4a21fe\nLDR             R3, [R3,#0x20]                                         ; +0xa8, 0x4a2200\nBLX             R3                                                     ; +0xaa, 0x4a2202\nCMP             R0, #9                                                 ; +0xac, 0x4a2204\nBNE             loc_4A220A                                             ; +0xae, 0x4a2206\nCBNZ            R6, loc_4A2236                                         ; +0xb0, 0x4a2208\nLDR             R3, [R5]                                               ; +0xb2, 0x4a220a\nMOV             R0, R5                                                 ; +0xb4, 0x4a220c\nLDR             R3, [R3,#0x20]                                         ; +0xb6, 0x4a220e\nBLX             R3                                                     ; +0xb8, 0x4a2210\nCMP             R0, #0xB                                               ; +0xba, 0x4a2212\nBNE             loc_4A22CC                                             ; +0xbc, 0x4a2214\nCBZ             R6, loc_4A2224                                         ; +0xbe, 0x4a2216\nMOVS            R3, #1                                                 ; +0xc0, 0x4a2218\nMOV             R0, R4                                                 ; +0xc2, 0x4a221a\nSTRB.W          R3, [R4,#0x180]                                        ; +0xc4, 0x4a221c\nMOVS            R1, #0                                                 ; +0xc8, 0x4a2220\nB               loc_4A2230                                             ; +0xca, 0x4a2222\nLDR.W           R0, [R4,#0x15C]; this                                  ; +0xcc, 0x4a2224\nBL              _ZN11GJGameLevel19clearPlatformerSaveEv; GJGameLevel::clearPlatformerSave(void) ; +0xd0, 0x4a2228\nMOV             R0, R4; this                                           ; +0xd4, 0x4a222c\nMOV             R1, R6; cocos2d::CCObject *                            ; +0xd6, 0x4a222e\nBL              _ZN14EditLevelLayer6onPlayEPN7cocos2d8CCObjectE; EditLevelLayer::onPlay(cocos2d::CCObject *) ; +0xd8, 0x4a2230\nB               loc_4A22CC                                             ; +0xdc, 0x4a2234\nMOV             R0, R4; this                                           ; +0xde, 0x4a2236\nMOV             R5, SP                                                 ; +0xe0, 0x4a2238\nBL              _ZN14EditLevelLayer15closeTextInputsEv; EditLevelLayer::closeTextInputs(void) ; +0xe2, 0x4a223a\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0xe6, 0x4a223e\nADD.W           R3, R4, #0x144                                         ; +0xea, 0x4a2242\nSTR.W           R3, [R0,#0x378]                                        ; +0xee, 0x4a2246\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0xf2, 0x4a224a\nLDR.W           R1, [R4,#0x15C]                                        ; +0xf6, 0x4a224e\nADD.W           R1, R1, #0x124                                         ; +0xfa, 0x4a2252\nLDR.W           R3, [R1,#-0x18]                                        ; +0xfe, 0x4a2256\nLDR.W           R6, [R1,#-0x14]                                        ; +0x102, 0x4a225a\nSUBS            R6, R3, R6                                             ; +0x106, 0x4a225e\nMOV             R8, R0                                                 ; +0x108, 0x4a2260\nMOV             R0, SP                                                 ; +0x10a, 0x4a2262\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x10c, 0x4a2264\nMOV             R0, R8                                                 ; +0x110, 0x4a2268\nMOV             R1, R6                                                 ; +0x112, 0x4a226a\nMOV             R2, SP                                                 ; +0x114, 0x4a226c\nBL              _ZN16GameLevelManager17updateDescriptionEiNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE; GameLevelManager::updateDescription(int,std::string) ; +0x116, 0x4a226e\nB               loc_4A2280                                             ; +0x11a, 0x4a2272\nB               loc_4A2276                                             ; +0x11c, 0x4a2274\nMOV             R0, R5                                                 ; +0x11e, 0x4a2276\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x120, 0x4a2278\nBL              __cxa_end_cleanup                                      ; +0x124, 0x4a227c\nMOV             R6, R0                                                 ; +0x128, 0x4a2280\nMOV             R0, SP                                                 ; +0x12a, 0x4a2282\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x12c, 0x4a2284\nCBZ             R6, loc_4A22CC                                         ; +0x130, 0x4a2288\nLDR.W           R2, [R4,#0x17C]                                        ; +0x132, 0x4a228a\nMOVS            R3, #0                                                 ; +0x136, 0x4a228e\nCBZ             R2, loc_4A229A                                         ; +0x138, 0x4a2290\nSTR.W           R3, [R2,#0x208]                                        ; +0x13a, 0x4a2292\nSTR.W           R3, [R4,#0x17C]                                        ; +0x13e, 0x4a2296\nLDR             R1, =(aUpdatingDescri - 0x4A22A6); \"Updating description...\" ; +0x142, 0x4a229a\nMOV             R0, R5                                                 ; +0x144, 0x4a229c\nMOVS            R2, #0x17                                              ; +0x146, 0x4a229e\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x148, 0x4a22a0\nADD             R1, PC; \"Updating description...\"                      ; +0x14a, 0x4a22a2\nSTR             R3, [SP,#0x10+var_C]                                   ; +0x14c, 0x4a22a4\nSTR             R3, [SP,#0x10+var_8]                                   ; +0x14e, 0x4a22a6\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x150, 0x4a22a8\nADD.W           R0, R4, #0x148                                         ; +0x154, 0x4a22ac\nMOV             R1, R5                                                 ; +0x158, 0x4a22b0\nBL              _ZN17UploadActionPopup6createEP19UploadPopupDelegateNSt6__ndk112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE; UploadActionPopup::create(UploadPopupDelegate *,std::string) ; +0x15a, 0x4a22b2\nSTR.W           R0, [R4,#0x17C]                                        ; +0x15e, 0x4a22b6\nMOV             R0, R5                                                 ; +0x162, 0x4a22ba\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x164, 0x4a22bc\nLDR.W           R0, [R4,#0x17C]                                        ; +0x168, 0x4a22c0\nLDR             R3, [R0]                                               ; +0x16c, 0x4a22c4\nLDR.W           R3, [R3,#0x290]                                        ; +0x16e, 0x4a22c6\nBLX             R3                                                     ; +0x172, 0x4a22ca\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x174, 0x4a22cc\nLDR             R3, [R7]                                               ; +0x176, 0x4a22ce\nCMP             R2, R3                                                 ; +0x178, 0x4a22d0\nBEQ             loc_4A22D8                                             ; +0x17a, 0x4a22d2\nBLX             __stack_chk_fail                                       ; +0x17c, 0x4a22d4\nADD             SP, SP, #0x10                                          ; +0x180, 0x4a22d8\nPOP.W           {R4-R8,PC}                                             ; +0x182, 0x4a22da", "xrefs": ["`non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x4a22ec"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}