{"type": "func", "start": 8174276, "end": 8174716, "name": "EditorUI::setIDPopupClosed", "pseudocode": "// \n// EditorUI::setIDPopupClosed from 0x7cbac4 to 0x7cbc7c (440 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'EditorUI::setIDPopupClosed @ 0x7cbc80\n// > <???> @ 0xa1e00\n// > <???> @ 0x14371f8\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 12:54:11 +0000\n// \n\n__int64 __fastcall EditorUI::setIDPopupClosed(EditorUI *this, SetIDPopup *a2, unsigned int a3)\n{\n  GameManager *v5; // x0\n  GameManager *v6; // x0\n  GameManager *v8; // x0\n  ButtonSprite *v9; // x21\n  cocos2d::CCString *v10; // x0\n  const char *CString; // x0\n  GameManager *v12; // x0\n  int v13; // w1\n  size_t v14; // x0\n  char *v15; // x1\n  const char *v17; // [xsp+38h] [xbp+38h]\n  unsigned __int64 v18; // [xsp+48h] [xbp+48h] BYREF\n  unsigned __int64 v19; // [xsp+50h] [xbp+50h]\n  char *v20; // [xsp+58h] [xbp+58h]\n  unsigned __int64 v21[3]; // [xsp+60h] [xbp+60h] BYREF\n\n  v5 = (GameManager *)(*(__int64 (__fastcall **)(SetIDPopup *))(*(_QWORD *)a2 + 64LL))(a2);\n  if ( (_DWORD)v5 == 1 )\n  {\n    v8 = (GameManager *)GameManager::sharedState(v5);\n    GameManager::setIntGameVariable(v8, \"0133\", a3);\n    v9 = *((ButtonSprite **)this + 164);\n    v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", (const char *)a3);\n    CString = (const char *)cocos2d::CCString::getCString(v10);\n    ButtonSprite::setString(v9, CString);\n  }\n  else\n  {\n    v6 = (GameManager *)(*(__int64 (__fastcall **)(SetIDPopup *))(*(_QWORD *)a2 + 64LL))(a2);\n    if ( (_DWORD)v6 == 2 )\n    {\n      v12 = (GameManager *)GameManager::sharedState(v6);\n      GameManager::setIntGameVariable(v12, \"0139\", a3);\n      v18 = 0;\n      v19 = 0;\n      v20 = nullptr;\n      std::string::__init((__int64 *)&v18, &byte_11B8890, 0);\n      if ( (int)a3 <= 999 )\n      {\n        GameToolbox::intToString(v21, (GameToolbox *)a3);\n        if ( (v18 & 1) != 0 )\n        {\n          *v20 = 0;\n          v19 = 0;\n        }\n        else\n        {\n          LOWORD(v18) = 0;\n        }\n        std::string::reserve((__int64 *)&v18, 0);\n        v20 = (char *)v21[2];\n        v18 = v21[0];\n        v19 = v21[1];\n      }\n      else\n      {\n        v17 = (const char *)GJSpecialColorSelect::textForColorIdx((GJSpecialColorSelect *)a3, v13);\n        v14 = strlen(v17);\n        std::string::assign((__int64 *)&v18, v17, v14);\n      }\n      v15 = (char *)&v18 + 1;\n      if ( (v18 & 1) != 0 )\n        v15 = v20;\n      ButtonSprite::setString(*((ButtonSprite **)this + 165), v15);\n      if ( (v18 & 1) != 0 )\n        operator delete(v20);\n    }\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; EditorUI::setIDPopupClosed from 0x7cbac4 to 0x7cbc7c (440 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'EditorUI::setIDPopupClosed @ 0x7cbc80\n; > <???> @ 0xa1e00\n; > <???> @ 0x14371f8\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 12:54:11 +0000\n; \nSTP             X29, X30, [SP,#var_80]!                                ; +0x0, 0x7cbac4\nMOV             X29, SP                                                ; +0x4, 0x7cbac8\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x8, 0x7cbacc\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x7cbad0\nMOV             W20, W2                                                ; +0x10, 0x7cbad4\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x14, 0x7cbad8\nSTR             X1, [X29,#0x80+var_48]                                 ; +0x18, 0x7cbadc\nMOV             X21, X0                                                ; +0x1c, 0x7cbae0\nLDR             X2, [X1]                                               ; +0x20, 0x7cbae4\nMOV             X0, X1                                                 ; +0x24, 0x7cbae8\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x28, 0x7cbaec\nLDR             X2, [X2,#0x40]                                         ; +0x2c, 0x7cbaf0\nLDR             X3, [X3]                                               ; +0x30, 0x7cbaf4\nSTR             X3, [X29,#0x80+var_8]                                  ; +0x34, 0x7cbaf8\nBLR             X2                                                     ; +0x38, 0x7cbafc\nCMP             W0, #1                                                 ; +0x3c, 0x7cbb00\nLDR             X1, [X29,#0x80+var_48]                                 ; +0x40, 0x7cbb04\nB.EQ            loc_7CBB48                                             ; +0x44, 0x7cbb08\nLDR             X2, [X1]                                               ; +0x48, 0x7cbb0c\nMOV             X0, X1                                                 ; +0x4c, 0x7cbb10\nLDR             X1, [X2,#0x40]                                         ; +0x50, 0x7cbb14\nBLR             X1                                                     ; +0x54, 0x7cbb18\nCMP             W0, #2                                                 ; +0x58, 0x7cbb1c\nB.EQ            loc_7CBB84                                             ; +0x5c, 0x7cbb20\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x60, 0x7cbb24\nLDR             X1, [X29,#0x80+var_8]                                  ; +0x64, 0x7cbb28\nLDR             X0, [X19]                                              ; +0x68, 0x7cbb2c\nCMP             X1, X0                                                 ; +0x6c, 0x7cbb30\nB.NE            loc_7CBC5C                                             ; +0x70, 0x7cbb34\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x74, 0x7cbb38\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0x78, 0x7cbb3c\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x7c, 0x7cbb40\nRET                                                                    ; +0x80, 0x7cbb44\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x84, 0x7cbb48\nADRP            X1, #a0133@PAGE; \"0133\"                                ; +0x88, 0x7cbb4c\nMOV             W2, W20; int                                           ; +0x8c, 0x7cbb50\nADD             X1, X1, #a0133@PAGEOFF; \"0133\"                         ; +0x90, 0x7cbb54\nBL              _ZN11GameManager18setIntGameVariableEPKci; GameManager::setIntGameVariable(char const*,int) ; +0x94, 0x7cbb58\nLDR             X21, [X21,#0x520]                                      ; +0x98, 0x7cbb5c\nADRP            X0, #(aSongidI+8)@PAGE; \"%i\"                           ; +0x9c, 0x7cbb60\nMOV             W1, W20; char *                                        ; +0xa0, 0x7cbb64\nADD             X0, X0, #(aSongidI+8)@PAGEOFF; this                    ; +0xa4, 0x7cbb68\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xa8, 0x7cbb6c\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xac, 0x7cbb70\nMOV             X1, X0; char *                                         ; +0xb0, 0x7cbb74\nMOV             X0, X21; this                                          ; +0xb4, 0x7cbb78\nBL              _ZN12ButtonSprite9setStringEPKc; ButtonSprite::setString(char const*) ; +0xb8, 0x7cbb7c\nB               loc_7CBB24                                             ; +0xbc, 0x7cbb80\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0xc0, 0x7cbb84\nADD             X22, X29, #0x80+var_38                                 ; +0xc4, 0x7cbb88\nADRP            X1, #a0139@PAGE; \"0139\"                                ; +0xc8, 0x7cbb8c\nMOV             W2, W20; int                                           ; +0xcc, 0x7cbb90\nADD             X1, X1, #a0139@PAGEOFF; \"0139\"                         ; +0xd0, 0x7cbb94\nBL              _ZN11GameManager18setIntGameVariableEPKci; GameManager::setIntGameVariable(char const*,int) ; +0xd4, 0x7cbb98\nSTR             XZR, [X29,#0x80+var_38]                                ; +0xd8, 0x7cbb9c\nADRP            X1, #byte_11B8890@PAGE                                 ; +0xdc, 0x7cbba0\nMOV             X0, X22                                                ; +0xe0, 0x7cbba4\nADD             X1, X1, #byte_11B8890@PAGEOFF                          ; +0xe4, 0x7cbba8\nMOV             X2, #0                                                 ; +0xe8, 0x7cbbac\nSTR             XZR, [X29,#0x80+var_30]                                ; +0xec, 0x7cbbb0\nSTR             XZR, [X29,#0x80+var_28]                                ; +0xf0, 0x7cbbb4\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm; std::string::__init(char const*,ulong) ; +0xf4, 0x7cbbb8\nCMP             W20, #0x3E7                                            ; +0xf8, 0x7cbbbc\nB.LE            loc_7CBC10                                             ; +0xfc, 0x7cbbc0\nMOV             W0, W20; this                                          ; +0x100, 0x7cbbc4\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0x104, 0x7cbbc8\nSTR             X0, [X29,#0x80+var_48]                                 ; +0x108, 0x7cbbcc\nBL              .strlen                                                ; +0x10c, 0x7cbbd0\nLDR             X1, [X29,#0x80+var_48]; int                            ; +0x110, 0x7cbbd4\nMOV             X2, X0; size_t                                         ; +0x114, 0x7cbbd8\nMOV             X0, X22; int                                           ; +0x118, 0x7cbbdc\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm; std::string::assign(char const*,ulong) ; +0x11c, 0x7cbbe0\nLDRB            W2, [X29,#0x80+var_38]                                 ; +0x120, 0x7cbbe4\nADD             X1, X22, #1                                            ; +0x124, 0x7cbbe8\nLDR             X0, [X21,#0x528]; this                                 ; +0x128, 0x7cbbec\nTBZ             W2, #0, loc_7CBBF8                                     ; +0x12c, 0x7cbbf0\nLDR             X1, [X29,#0x80+var_28]; char *                         ; +0x130, 0x7cbbf4\nBL              _ZN12ButtonSprite9setStringEPKc; ButtonSprite::setString(char const*) ; +0x134, 0x7cbbf8\nLDRB            W0, [X29,#0x80+var_38]                                 ; +0x138, 0x7cbbfc\nTBZ             W0, #0, loc_7CBB24                                     ; +0x13c, 0x7cbc00\nLDR             X0, [X29,#0x80+var_28]; void *                         ; +0x140, 0x7cbc04\nBL              _ZdlPv; operator delete(void *)                        ; +0x144, 0x7cbc08\nB               loc_7CBB24                                             ; +0x148, 0x7cbc0c\nADD             X8, X29, #0x80+var_20                                  ; +0x14c, 0x7cbc10\nMOV             W0, W20; this                                          ; +0x150, 0x7cbc14\nBL              _ZN11GameToolbox11intToStringEi; GameToolbox::intToString(int) ; +0x154, 0x7cbc18\nLDRB            W0, [X29,#0x80+var_38]                                 ; +0x158, 0x7cbc1c\nTBNZ            W0, #0, loc_7CBC4C                                     ; +0x15c, 0x7cbc20\nSTRB            WZR, [X29,#0x80+var_38+1]                              ; +0x160, 0x7cbc24\nSTRB            WZR, [X29,#0x80+var_38]                                ; +0x164, 0x7cbc28\nMOV             X0, X22                                                ; +0x168, 0x7cbc2c\nMOV             X1, #0                                                 ; +0x16c, 0x7cbc30\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7reserveEm; std::string::reserve(ulong) ; +0x170, 0x7cbc34\nLDR             X0, [X29,#0x80+var_10]                                 ; +0x174, 0x7cbc38\nSTR             X0, [X29,#0x80+var_28]                                 ; +0x178, 0x7cbc3c\nLDP             X0, X1, [X29,#0x80+var_20]                             ; +0x17c, 0x7cbc40\nSTP             X0, X1, [X22]                                          ; +0x180, 0x7cbc44\nB               loc_7CBBE4                                             ; +0x184, 0x7cbc48\nLDR             X0, [X29,#0x80+var_28]                                 ; +0x188, 0x7cbc4c\nSTRB            WZR, [X0]                                              ; +0x18c, 0x7cbc50\nSTR             XZR, [X29,#0x80+var_30]                                ; +0x190, 0x7cbc54\nB               loc_7CBC2C                                             ; +0x194, 0x7cbc58\nBL              .__stack_chk_fail                                      ; +0x198, 0x7cbc5c\nLDRB            W1, [X29,#0x80+var_38]                                 ; +0x19c, 0x7cbc60\nMOV             X19, X0                                                ; +0x1a0, 0x7cbc64\nTBZ             W1, #0, loc_7CBC74                                     ; +0x1a4, 0x7cbc68\nLDR             X0, [X29,#0x80+var_28]; void *                         ; +0x1a8, 0x7cbc6c\nBL              _ZdlPv; operator delete(void *)                        ; +0x1ac, 0x7cbc70\nMOV             X0, X19                                                ; +0x1b0, 0x7cbc74\nBL              _Unwind_Resume                                         ; +0x1b4, 0x7cbc78", "xrefs": ["`non-virtual thunk to'EditorUI::setIDPopupClosed @ 0x7cbc80", "<???> @ 0xa1e00", "<???> @ 0x14371f8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}