{"type": "func", "start": 3899568, "end": 3899906, "name": "EditLevelLayer::FLAlert_Clicked", "pseudocode": "// \n// EditLevelLayer::FLAlert_Clicked from 0x3b80b0 to 0x3b8202 (338 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x3b8210\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; // r6\n  GameLevelManager *v6; // r0\n  int v7; // r6\n  GameLevelManager *v8; // r8\n  int updated; // r6\n  UploadActionPopup *m_descriptionPopup; // r2\n  std::string v11; // r2\n  GameManager *v12; // r0\n  UploadPopupDelegate v13; // [sp+8h] [bp-8h] BYREF\n\n  v13.__vftable = (UploadPopupDelegate_vtbl *)a3;\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_24;\n  }\n  if ( a2->getTag(a2) == 9 && v5 )\n  {\n    EditLevelLayer::closeTextInputs(a1);\n    GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;\n    v6 = GameLevelManager::sharedState();\n    v7 = a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed;\n    v8 = v6;\n    sub_775C20(&v13, &a1->m_level->m_levelDesc);\n    updated = GameLevelManager::updateDescription(v8, v7, (std::string)&v13);\n    sub_774008(&v13);\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_776584((int)&v13, \"Updating description...\");\n      a1->m_descriptionPopup = (UploadActionPopup *)UploadActionPopup::create(\n                                                      (UploadActionPopup *)&a1->UploadPopupDelegate,\n                                                      &v13,\n                                                      v11);\n      sub_774008(&v13);\n      a1->m_descriptionPopup->show(a1->m_descriptionPopup);\n    }\n  }\n  else if ( a2->getTag(a2) == 6 && v5 )\n  {\nLABEL_24:\n    v12 = GameManager::sharedState();\n    GameManager::openEditorGuide(v12);\n  }\n}", "assembly": "; \n; EditLevelLayer::FLAlert_Clicked from 0x3b80b0 to 0x3b8202 (338 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x3b8210\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.W          {R0-R8,LR}                                             ; +0x0, 0x3b80b0\nMOV             R5, R0                                                 ; +0x4, 0x3b80b4\nLDR             R7, =(__stack_chk_guard_ptr - 0x3B80C2)                ; +0x6, 0x3b80b6\nMOV             R0, R1                                                 ; +0x8, 0x3b80b8\nMOV             R4, R1                                                 ; +0xa, 0x3b80ba\nMOV             R6, R2                                                 ; +0xc, 0x3b80bc\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3b80be\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x3b80c0\nLDR             R3, [R7]                                               ; +0x12, 0x3b80c2\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x14, 0x3b80c4\nLDR             R3, [R1]                                               ; +0x16, 0x3b80c6\nLDR             R3, [R3,#0x20]                                         ; +0x18, 0x3b80c8\nBLX             R3                                                     ; +0x1a, 0x3b80ca\nCMP             R0, #4                                                 ; +0x1c, 0x3b80cc\nBNE             loc_3B80D2                                             ; +0x1e, 0x3b80ce\nCBNZ            R6, loc_3B80E8                                         ; +0x20, 0x3b80d0\nLDR             R3, [R4]                                               ; +0x22, 0x3b80d2\nMOV             R0, R4                                                 ; +0x24, 0x3b80d4\nLDR             R3, [R3,#0x20]                                         ; +0x26, 0x3b80d6\nBLX             R3                                                     ; +0x28, 0x3b80d8\nCMP             R0, #7                                                 ; +0x2a, 0x3b80da\nBNE             loc_3B80F0                                             ; +0x2c, 0x3b80dc\nCBZ             R6, loc_3B80F0                                         ; +0x2e, 0x3b80de\nMOV             R0, R5; this                                           ; +0x30, 0x3b80e0\nBL              _ZN14EditLevelLayer7onCloneEv; EditLevelLayer::onClone(void) ; +0x32, 0x3b80e2\nB               loc_3B81F0                                             ; +0x36, 0x3b80e6\nMOV             R0, R5; this                                           ; +0x38, 0x3b80e8\nBL              _ZN14EditLevelLayer8onDeleteEv; EditLevelLayer::onDelete(void) ; +0x3a, 0x3b80ea\nB               loc_3B81F0                                             ; +0x3e, 0x3b80ee\nLDR             R3, [R4]                                               ; +0x40, 0x3b80f0\nMOV             R0, R4                                                 ; +0x42, 0x3b80f2\nLDR             R3, [R3,#0x20]                                         ; +0x44, 0x3b80f4\nBLX             R3                                                     ; +0x46, 0x3b80f6\nCMP             R0, #8                                                 ; +0x48, 0x3b80f8\nBNE             loc_3B8106                                             ; +0x4a, 0x3b80fa\nCBZ             R6, loc_3B8106                                         ; +0x4c, 0x3b80fc\nMOV             R0, R5; this                                           ; +0x4e, 0x3b80fe\nBL              _ZN14EditLevelLayer11onMoveToTopEv; EditLevelLayer::onMoveToTop(void) ; +0x50, 0x3b8100\nB               loc_3B81F0                                             ; +0x54, 0x3b8104\nLDR             R3, [R4]                                               ; +0x56, 0x3b8106\nMOV             R0, R4                                                 ; +0x58, 0x3b8108\nLDR             R3, [R3,#0x20]                                         ; +0x5a, 0x3b810a\nBLX             R3                                                     ; +0x5c, 0x3b810c\nCMP             R0, #0xA                                               ; +0x5e, 0x3b810e\nBNE             loc_3B811C                                             ; +0x60, 0x3b8110\nMOV             R0, R5; this                                           ; +0x62, 0x3b8112\nMOVS            R1, #0; cocos2d::CCObject *                            ; +0x64, 0x3b8114\nBL              _ZN14EditLevelLayer7onShareEPN7cocos2d8CCObjectE; EditLevelLayer::onShare(cocos2d::CCObject *) ; +0x66, 0x3b8116\nB               loc_3B81F0                                             ; +0x6a, 0x3b811a\nLDR             R3, [R4]                                               ; +0x6c, 0x3b811c\nMOV             R0, R4                                                 ; +0x6e, 0x3b811e\nLDR             R3, [R3,#0x20]                                         ; +0x70, 0x3b8120\nBLX             R3                                                     ; +0x72, 0x3b8122\nCMP             R0, #5                                                 ; +0x74, 0x3b8124\nBNE             loc_3B8136                                             ; +0x76, 0x3b8126\nCMP             R6, #0                                                 ; +0x78, 0x3b8128\nBNE             loc_3B81E8                                             ; +0x7a, 0x3b812a\nMOV             R0, R5; this                                           ; +0x7c, 0x3b812c\nMOV             R1, R6; cocos2d::CCObject *                            ; +0x7e, 0x3b812e\nBL              _ZN14EditLevelLayer6onEditEPN7cocos2d8CCObjectE; EditLevelLayer::onEdit(cocos2d::CCObject *) ; +0x80, 0x3b8130\nB               loc_3B81F0                                             ; +0x84, 0x3b8134\nLDR             R3, [R4]                                               ; +0x86, 0x3b8136\nMOV             R0, R4                                                 ; +0x88, 0x3b8138\nLDR             R3, [R3,#0x20]                                         ; +0x8a, 0x3b813a\nBLX             R3                                                     ; +0x8c, 0x3b813c\nCMP             R0, #9                                                 ; +0x8e, 0x3b813e\nBNE             loc_3B8144                                             ; +0x90, 0x3b8140\nCBNZ            R6, loc_3B8156                                         ; +0x92, 0x3b8142\nLDR             R3, [R4]                                               ; +0x94, 0x3b8144\nMOV             R0, R4                                                 ; +0x96, 0x3b8146\nLDR             R3, [R3,#0x20]                                         ; +0x98, 0x3b8148\nBLX             R3                                                     ; +0x9a, 0x3b814a\nCMP             R0, #6                                                 ; +0x9c, 0x3b814c\nBNE             loc_3B81F0                                             ; +0x9e, 0x3b814e\nCMP             R6, #0                                                 ; +0xa0, 0x3b8150\nBNE             loc_3B81E8                                             ; +0xa2, 0x3b8152\nB               loc_3B81F0                                             ; +0xa4, 0x3b8154\nMOV             R0, R5; this                                           ; +0xa6, 0x3b8156\nADD             R4, SP, #0x10+var_8                                    ; +0xa8, 0x3b8158\nBL              _ZN14EditLevelLayer15closeTextInputsEv; EditLevelLayer::closeTextInputs(void) ; +0xaa, 0x3b815a\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0xae, 0x3b815e\nADD.W           R3, R5, #0x144                                         ; +0xb2, 0x3b8162\nSTR.W           R3, [R0,#0x218]                                        ; +0xb6, 0x3b8166\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0xba, 0x3b816a\nLDR.W           R1, [R5,#0x154]                                        ; +0xbe, 0x3b816e\nADD.W           R1, R1, #0x11C                                         ; +0xc2, 0x3b8172\nLDR.W           R3, [R1,#-0x10]                                        ; +0xc6, 0x3b8176\nLDR.W           R6, [R1,#-0xC]                                         ; +0xca, 0x3b817a\nSUBS            R6, R3, R6                                             ; +0xce, 0x3b817e\nMOV             R8, R0                                                 ; +0xd0, 0x3b8180\nMOV             R0, R4                                                 ; +0xd2, 0x3b8182\nBL              sub_775C20                                             ; +0xd4, 0x3b8184\nMOV             R0, R8                                                 ; +0xd8, 0x3b8188\nMOV             R1, R6                                                 ; +0xda, 0x3b818a\nMOV             R2, R4                                                 ; +0xdc, 0x3b818c\nBL              _ZN16GameLevelManager17updateDescriptionEiSs; GameLevelManager::updateDescription(int,std::string) ; +0xde, 0x3b818e\nB               loc_3B81A0                                             ; +0xe2, 0x3b8192\nB               loc_3B8196                                             ; +0xe4, 0x3b8194\nMOV             R0, R4                                                 ; +0xe6, 0x3b8196\nBL              sub_774008                                             ; +0xe8, 0x3b8198\nBL              __cxa_end_cleanup                                      ; +0xec, 0x3b819c\nMOV             R6, R0                                                 ; +0xf0, 0x3b81a0\nMOV             R0, R4                                                 ; +0xf2, 0x3b81a2\nBL              sub_774008                                             ; +0xf4, 0x3b81a4\nCBZ             R6, loc_3B81F0                                         ; +0xf8, 0x3b81a8\nLDR.W           R2, [R5,#0x16C]                                        ; +0xfa, 0x3b81aa\nCBZ             R2, loc_3B81BA                                         ; +0xfe, 0x3b81ae\nMOVS            R3, #0                                                 ; +0x100, 0x3b81b0\nSTR.W           R3, [R2,#0x1F0]                                        ; +0x102, 0x3b81b2\nSTR.W           R3, [R5,#0x16C]                                        ; +0x106, 0x3b81b6\nLDR             R1, =(aUpdatingDescri - 0x3B81C4); \"Updating description...\" ; +0x10a, 0x3b81ba\nMOV             R0, R4; int                                            ; +0x10c, 0x3b81bc\nADD             R2, SP, #0x10+var_C                                    ; +0x10e, 0x3b81be\nADD             R1, PC; \"Updating description...\"                      ; +0x110, 0x3b81c0\nBL              sub_776584                                             ; +0x112, 0x3b81c2\nADD.W           R0, R5, #0x148                                         ; +0x116, 0x3b81c6\nMOV             R1, R4                                                 ; +0x11a, 0x3b81ca\nBL              _ZN17UploadActionPopup6createEP19UploadPopupDelegateSs; UploadActionPopup::create(UploadPopupDelegate *,std::string) ; +0x11c, 0x3b81cc\nSTR.W           R0, [R5,#0x16C]                                        ; +0x120, 0x3b81d0\nMOV             R0, R4                                                 ; +0x124, 0x3b81d4\nBL              sub_774008                                             ; +0x126, 0x3b81d6\nLDR.W           R0, [R5,#0x16C]                                        ; +0x12a, 0x3b81da\nLDR             R3, [R0]                                               ; +0x12e, 0x3b81de\nLDR.W           R3, [R3,#0x284]                                        ; +0x130, 0x3b81e0\nBLX             R3                                                     ; +0x134, 0x3b81e4\nB               loc_3B81F0                                             ; +0x136, 0x3b81e6\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x138, 0x3b81e8\nBL              _ZN11GameManager15openEditorGuideEv; GameManager::openEditorGuide(void) ; +0x13c, 0x3b81ec\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x140, 0x3b81f0\nLDR             R3, [R7]                                               ; +0x142, 0x3b81f2\nCMP             R2, R3                                                 ; +0x144, 0x3b81f4\nBEQ             loc_3B81FC                                             ; +0x146, 0x3b81f6\nBLX             __stack_chk_fail                                       ; +0x148, 0x3b81f8\nADD             SP, SP, #0x10                                          ; +0x14c, 0x3b81fc\nPOP.W           {R4-R8,PC}                                             ; +0x14e, 0x3b81fe", "xrefs": ["`non-virtual thunk to'EditLevelLayer::FLAlert_Clicked @ 0x3b8210"], "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"}