{"type": "func", "start": 4299646752, "end": 4299647080, "name": "EditorUI::setIDPopupClosed", "pseudocode": "// \n// EditorUI::setIDPopupClosed from 0x100476720 to 0x100476868 (328 bytes)\n// \n// 2 xrefs:\n// > sub_100476888 @ 0x10047688c\n// > <???> @ 0x10096d2f8\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 11:05:41 +0000\n// \n\nvoid __fastcall EditorUI::setIDPopupClosed(__int64 a1, __int64 a2, __int64 a3)\n{\n  __int64 v6; // x0\n  __int64 v7; // x19\n  void *v8; // x0\n  const std::string::value_type *CString; // x0\n  __int64 v10; // x0\n  const char *v11; // x0\n  std::string *v12; // x1\n  std::string v13; // [xsp+8h] [xbp-58h] BYREF\n  std::string v14; // [xsp+20h] [xbp-40h] BYREF\n\n  if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1 )\n  {\n    v6 = GameManager::sharedState();\n    GameManager::setIntGameVariable(v6, \"0133\", a3);\n    v7 = *(_QWORD *)(a1 + 1312);\n    v8 = sub_1003065B0(\"%i\", a3);\n    CString = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v8);\n    ButtonSprite::setString(v7, CString);\n  }\n  else if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 2 )\n  {\n    v10 = GameManager::sharedState();\n    GameManager::setIntGameVariable(v10, \"0139\", a3);\n    sub_100009900(&v14, \"\");\n    if ( (int)a3 < 1000 )\n    {\n      GameToolbox::intToString(a3, &v13);\n      if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )\n        operator delete(v14.__r_.__value_.__l.__data_);\n      v14 = v13;\n    }\n    else\n    {\n      v11 = GJSpecialColorSelect::textForColorIdx(a3);\n      std::string::assign(&v14, v11);\n    }\n    if ( (v14.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n      v12 = &v14;\n    else\n      v12 = (std::string *)v14.__r_.__value_.__r.__words[0];\n    ButtonSprite::setString(*(_QWORD *)(a1 + 1320), (const std::string::value_type *)v12);\n    if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )\n      operator delete(v14.__r_.__value_.__l.__data_);\n  }\n}", "assembly": "; \n; EditorUI::setIDPopupClosed from 0x100476720 to 0x100476868 (328 bytes)\n; \n; 2 xrefs:\n; > sub_100476888 @ 0x10047688c\n; > <???> @ 0x10096d2f8\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 11:05:41 +0000\n; \nSUB             SP, SP, #0x70                                          ; +0x0, 0x100476720\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x4, 0x100476724\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x8, 0x100476728\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0xc, 0x10047672c\nADD             X29, SP, #0x60                                         ; +0x10, 0x100476730\nMOV             X20, X2                                                ; +0x14, 0x100476734\nMOV             X21, X1                                                ; +0x18, 0x100476738\nMOV             X19, X0                                                ; +0x1c, 0x10047673c\nLDR             X8, [X1]                                               ; +0x20, 0x100476740\nLDR             X8, [X8,#0x40]                                         ; +0x24, 0x100476744\nMOV             X0, X1                                                 ; +0x28, 0x100476748\nBLR             X8                                                     ; +0x2c, 0x10047674c\nCMP             W0, #1                                                 ; +0x30, 0x100476750\nB.NE            loc_1004767A0                                          ; +0x34, 0x100476754\nBL              GameManager__sharedState                               ; +0x38, 0x100476758\nADRL            X1, a0133; \"0133\"                                      ; +0x3c, 0x10047675c\nMOV             X2, X20                                                ; +0x44, 0x100476764\nBL              GameManager__setIntGameVariable                        ; +0x48, 0x100476768\nLDR             X19, [X19,#0x520]                                      ; +0x4c, 0x10047676c\nSTR             X20, [SP,#0x60+var_60]                                 ; +0x50, 0x100476770\nADRL            X0, aI; \"%i\"                                           ; +0x54, 0x100476774\nBL              sub_1003065B0                                          ; +0x5c, 0x10047677c\nBL              cocos2d__CCString__getCString                          ; +0x60, 0x100476780\nMOV             X1, X0                                                 ; +0x64, 0x100476784\nMOV             X0, X19                                                ; +0x68, 0x100476788\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x6c, 0x10047678c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x70, 0x100476790\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x74, 0x100476794\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x78, 0x100476798\nB               ButtonSprite__setString                                ; +0x7c, 0x10047679c\nLDR             X8, [X21]                                              ; +0x80, 0x1004767a0\nLDR             X8, [X8,#0x40]                                         ; +0x84, 0x1004767a4\nMOV             X0, X21                                                ; +0x88, 0x1004767a8\nBLR             X8                                                     ; +0x8c, 0x1004767ac\nCMP             W0, #2                                                 ; +0x90, 0x1004767b0\nB.NE            loc_100476854                                          ; +0x94, 0x1004767b4\nBL              GameManager__sharedState                               ; +0x98, 0x1004767b8\nADRL            X1, a0139; \"0139\"                                      ; +0x9c, 0x1004767bc\nMOV             X2, X20                                                ; +0xa4, 0x1004767c4\nBL              GameManager__setIntGameVariable                        ; +0xa8, 0x1004767c8\nADRL            X1, asc_10088BE68; \"\"                                  ; +0xac, 0x1004767cc\nADD             X0, SP, #0x60+var_40; int                              ; +0xb4, 0x1004767d4\nBL              sub_100009900                                          ; +0xb8, 0x1004767d8\nCMP             W20, #0x3E8                                            ; +0xbc, 0x1004767dc\nB.LT            loc_1004767FC                                          ; +0xc0, 0x1004767e0\nMOV             X0, X20                                                ; +0xc4, 0x1004767e4\nBL              GJSpecialColorSelect__textForColorIdx                  ; +0xc8, 0x1004767e8\nMOV             X1, X0; __s                                            ; +0xcc, 0x1004767ec\nADD             X0, SP, #0x60+var_40; this                             ; +0xd0, 0x1004767f0\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xd4, 0x1004767f4\nB               loc_100476828                                          ; +0xd8, 0x1004767f8\nADD             X8, SP, #0x60+var_58                                   ; +0xdc, 0x1004767fc\nMOV             X0, X20                                                ; +0xe0, 0x100476800\nBL              GameToolbox__intToString                               ; +0xe4, 0x100476804\nLDRSB           W8, [SP,#0x60+var_40.__r_.__value_+0x17]               ; +0xe8, 0x100476808\nTBZ             W8, #0x1F, loc_100476818                               ; +0xec, 0x10047680c\nLDR             X0, [SP,#0x60+var_40]; __p                             ; +0xf0, 0x100476810\nBL              __ZdlPv; operator delete(void *)                       ; +0xf4, 0x100476814\nLDUR            Q0, [SP,#0x60+var_58]                                  ; +0xf8, 0x100476818\nSTR             Q0, [SP,#0x60+var_40]                                  ; +0xfc, 0x10047681c\nLDR             X8, [SP,#0x60+var_48]                                  ; +0x100, 0x100476820\nSTR             X8, [SP,#0x30]                                         ; +0x104, 0x100476824\nLDR             X0, [X19,#0x528]                                       ; +0x108, 0x100476828\nLDRSB           W8, [SP,#0x60+var_40.__r_.__value_+0x17]               ; +0x10c, 0x10047682c\nLDR             X9, [SP,#0x60+var_40]                                  ; +0x110, 0x100476830\nCMP             W8, #0                                                 ; +0x114, 0x100476834\nADD             X8, SP, #0x60+var_40                                   ; +0x118, 0x100476838\nCSEL            X1, X9, X8, LT                                         ; +0x11c, 0x10047683c\nBL              ButtonSprite__setString                                ; +0x120, 0x100476840\nLDRSB           W8, [SP,#0x60+var_40.__r_.__value_+0x17]               ; +0x124, 0x100476844\nTBZ             W8, #0x1F, loc_100476854                               ; +0x128, 0x100476848\nLDR             X0, [SP,#0x60+var_40]; __p                             ; +0x12c, 0x10047684c\nBL              __ZdlPv; operator delete(void *)                       ; +0x130, 0x100476850\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x134, 0x100476854\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x138, 0x100476858\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x13c, 0x10047685c\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x140, 0x100476860\nRET                                                                    ; +0x144, 0x100476864", "xrefs": ["sub_100476888 @ 0x10047688c", "<???> @ 0x10096d2f8"], "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"}