{"type": "func", "start": 3813136, "end": 3813376, "name": "EditorUI::setIDPopupClosed", "pseudocode": "// \n// EditorUI::setIDPopupClosed from 0x3a2f10 to 0x3a3000 (240 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'EditorUI::setIDPopupClosed @ 0x3a3018\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 EditorUI::setIDPopupClosed(EditorUI *a1, SetIDPopup *a2, int a3)\n{\n  GameManager *v6; // r0\n  ButtonSprite *m_deleteGroupSprite; // r4\n  cocos2d::CCString *v8; // r0\n  const char *CString; // r0\n  GameManager *v10; // r0\n  char *v11; // r0\n  char *v12; // [sp+4h] [bp-Ch] BYREF\n  int v13; // [sp+8h] [bp-8h] BYREF\n\n  v12 = (char *)a2;\n  v13 = a3;\n  if ( a2->getTag(a2) == 1 )\n  {\n    v6 = GameManager::sharedState();\n    GameManager::setIntGameVariable(v6, \"0133\", a3);\n    m_deleteGroupSprite = a1->m_deleteGroupSprite;\n    v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", (const char *)a3);\n    CString = cocos2d::CCString::getCString(v8);\n    ButtonSprite::setString(m_deleteGroupSprite, CString);\n  }\n  else if ( a2->getTag(a2) == 2 )\n  {\n    v10 = GameManager::sharedState();\n    GameManager::setIntGameVariable(v10, \"0139\", a3);\n    sub_776584((int)&v12, (char *)&unk_939830);\n    if ( a3 < 1000 )\n    {\n      GameToolbox::intToString((GameToolbox *)&v13, a3);\n      sub_774794(&v12, &v13);\n      sub_774008(&v13);\n    }\n    else\n    {\n      v11 = (char *)GJSpecialColorSelect::textForColorIdx(a3);\n      sub_7753D4((int)&v12, v11);\n    }\n    ButtonSprite::setString(a1->m_deleteColorSprite, v12);\n    sub_774008(&v12);\n  }\n  else if ( a2->getTag(a2) == 3 )\n  {\n    EditorUI::findAndSelectObject(\n      a1,\n      a3,\n      (bool)a2[1].FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable);\n  }\n}", "assembly": "; \n; EditorUI::setIDPopupClosed from 0x3a2f10 to 0x3a3000 (240 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'EditorUI::setIDPopupClosed @ 0x3a3018\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, 0x3a2f10\nMOV             R8, R0                                                 ; +0x4, 0x3a2f14\nLDR             R7, =(__stack_chk_guard_ptr - 0x3A2F22)                ; +0x6, 0x3a2f16\nMOV             R0, R1                                                 ; +0x8, 0x3a2f18\nMOV             R4, R1                                                 ; +0xa, 0x3a2f1a\nMOV             R5, R2                                                 ; +0xc, 0x3a2f1c\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3a2f1e\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x3a2f20\nLDR             R3, [R7]                                               ; +0x12, 0x3a2f22\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x14, 0x3a2f24\nLDR             R3, [R1]                                               ; +0x16, 0x3a2f26\nLDR             R3, [R3,#0x20]                                         ; +0x18, 0x3a2f28\nBLX             R3                                                     ; +0x1a, 0x3a2f2a\nCMP             R0, #1                                                 ; +0x1c, 0x3a2f2c\nBNE             loc_3A2F5A                                             ; +0x1e, 0x3a2f2e\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x20, 0x3a2f30\nLDR             R1, =(a0133 - 0x3A2F3C); \"0133\"                        ; +0x24, 0x3a2f34\nMOV             R2, R5; int                                            ; +0x26, 0x3a2f36\nADD             R1, PC; \"0133\"                                         ; +0x28, 0x3a2f38\nBL              _ZN11GameManager18setIntGameVariableEPKci; GameManager::setIntGameVariable(char const*,int) ; +0x2a, 0x3a2f3a\nLDR             R0, =(aI - 0x3A2F4A); \"%i\"                             ; +0x2e, 0x3a2f3e\nMOV             R1, R5; char *                                         ; +0x30, 0x3a2f40\nLDR.W           R4, [R8,#0x31C]                                        ; +0x32, 0x3a2f42\nADD             R0, PC; \"%i\"                                           ; +0x36, 0x3a2f46\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x38, 0x3a2f48\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x3c, 0x3a2f4c\nMOV             R1, R0; char *                                         ; +0x40, 0x3a2f50\nMOV             R0, R4; this                                           ; +0x42, 0x3a2f52\nBL              _ZN12ButtonSprite9setStringEPKc; ButtonSprite::setString(char const*) ; +0x44, 0x3a2f54\nB               loc_3A2FEE                                             ; +0x48, 0x3a2f58\nLDR             R3, [R4]                                               ; +0x4a, 0x3a2f5a\nMOV             R0, R4                                                 ; +0x4c, 0x3a2f5c\nLDR             R3, [R3,#0x20]                                         ; +0x4e, 0x3a2f5e\nBLX             R3                                                     ; +0x50, 0x3a2f60\nCMP             R0, #2                                                 ; +0x52, 0x3a2f62\nBNE             loc_3A2FC2                                             ; +0x54, 0x3a2f64\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x56, 0x3a2f66\nLDR             R1, =(a0139 - 0x3A2F74); \"0139\"                        ; +0x5a, 0x3a2f6a\nMOV             R2, R5; int                                            ; +0x5c, 0x3a2f6c\nADD             R4, SP, #0x10+var_C                                    ; +0x5e, 0x3a2f6e\nADD             R1, PC; \"0139\"                                         ; +0x60, 0x3a2f70\nADD             R6, SP, #0x10+var_8                                    ; +0x62, 0x3a2f72\nBL              _ZN11GameManager18setIntGameVariableEPKci; GameManager::setIntGameVariable(char const*,int) ; +0x64, 0x3a2f74\nLDR             R1, =(unk_939830 - 0x3A2F82)                           ; +0x68, 0x3a2f78\nMOV             R0, R4; int                                            ; +0x6a, 0x3a2f7a\nMOV             R2, R6                                                 ; +0x6c, 0x3a2f7c\nADD             R1, PC; unk_939830 ; char *                            ; +0x6e, 0x3a2f7e\nBL              sub_776584                                             ; +0x70, 0x3a2f80\nCMP.W           R5, #0x3E8                                             ; +0x74, 0x3a2f84\nBLT             loc_3A2F9A                                             ; +0x78, 0x3a2f88\nMOV             R0, R5; this                                           ; +0x7a, 0x3a2f8a\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0x7c, 0x3a2f8c\nMOV             R1, R0; char *                                         ; +0x80, 0x3a2f90\nMOV             R0, R4; int                                            ; +0x82, 0x3a2f92\nBL              sub_7753D4                                             ; +0x84, 0x3a2f94\nB               loc_3A2FB0                                             ; +0x88, 0x3a2f98\nMOV             R0, R6; this                                           ; +0x8a, 0x3a2f9a\nMOV             R1, R5; int                                            ; +0x8c, 0x3a2f9c\nBL              _ZN11GameToolbox11intToStringEi; GameToolbox::intToString(int) ; +0x8e, 0x3a2f9e\nMOV             R0, R4                                                 ; +0x92, 0x3a2fa2\nMOV             R1, R6                                                 ; +0x94, 0x3a2fa4\nBL              sub_774794                                             ; +0x96, 0x3a2fa6\nMOV             R0, R6                                                 ; +0x9a, 0x3a2faa\nBL              sub_774008                                             ; +0x9c, 0x3a2fac\nLDR.W           R0, [R8,#0x320]; this                                  ; +0xa0, 0x3a2fb0\nLDR             R1, [SP,#0x10+var_C]; char *                           ; +0xa4, 0x3a2fb4\nBL              _ZN12ButtonSprite9setStringEPKc; ButtonSprite::setString(char const*) ; +0xa6, 0x3a2fb6\nMOV             R0, R4                                                 ; +0xaa, 0x3a2fba\nBL              sub_774008                                             ; +0xac, 0x3a2fbc\nB               loc_3A2FEE                                             ; +0xb0, 0x3a2fc0\nLDR             R3, [R4]                                               ; +0xb2, 0x3a2fc2\nMOV             R0, R4                                                 ; +0xb4, 0x3a2fc4\nLDR             R3, [R3,#0x20]                                         ; +0xb6, 0x3a2fc6\nBLX             R3                                                     ; +0xb8, 0x3a2fc8\nCMP             R0, #3                                                 ; +0xba, 0x3a2fca\nBNE             loc_3A2FEE                                             ; +0xbc, 0x3a2fcc\nMOV             R0, R8; this                                           ; +0xbe, 0x3a2fce\nMOV             R1, R5; int                                            ; +0xc0, 0x3a2fd0\nLDRB.W          R2, [R4,#0x210]; bool                                  ; +0xc2, 0x3a2fd2\nBL              _ZN8EditorUI19findAndSelectObjectEib; EditorUI::findAndSelectObject(int,bool) ; +0xc6, 0x3a2fd6\nB               loc_3A2FEE                                             ; +0xca, 0x3a2fda\nMOV             R0, R6                                                 ; +0xcc, 0x3a2fdc\nBL              sub_774008                                             ; +0xce, 0x3a2fde\nB               loc_3A2FE4                                             ; +0xd2, 0x3a2fe2\nMOV             R0, R4                                                 ; +0xd4, 0x3a2fe4\nBL              sub_774008                                             ; +0xd6, 0x3a2fe6\nBL              __cxa_end_cleanup                                      ; +0xda, 0x3a2fea\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xde, 0x3a2fee\nLDR             R3, [R7]                                               ; +0xe0, 0x3a2ff0\nCMP             R2, R3                                                 ; +0xe2, 0x3a2ff2\nBEQ             loc_3A2FFA                                             ; +0xe4, 0x3a2ff4\nBLX             __stack_chk_fail                                       ; +0xe6, 0x3a2ff6\nADD             SP, SP, #0x10                                          ; +0xea, 0x3a2ffa\nPOP.W           {R4-R8,PC}                                             ; +0xec, 0x3a2ffc", "xrefs": ["`non-virtual thunk to'EditorUI::setIDPopupClosed @ 0x3a3018"], "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"}