{"type": "func", "start": 4295033456, "end": 4295033754, "name": "EditorUI::setIDPopupClosed", "pseudocode": "// \n// EditorUI::setIDPopupClosed from 0x100010270 to 0x10001039a (298 bytes)\n// \n// 2 xrefs:\n// > sub_1000103C0 @ 0x1000103cc\n// > <???> @ 0x100ab50a8\n// \n// This function is hookable on this platform (idp: pc, 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:18:52 +0000\n// \n\nvoid __fastcall EditorUI::setIDPopupClosed(__int64 a1, __int64 a2, unsigned int a3, double a4)\n{\n  __int64 v5; // rdx\n  __int64 v6; // rax\n  __int64 v7; // rbx\n  __int64 v8; // rax\n  __int64 CString; // rax\n  __int64 v10; // rdx\n  __int64 v11; // rax\n  const std::string::value_type *v12; // rax\n  __int64 v13; // rdi\n  std::string::pointer data; // rsi\n  char v15; // [rsp+0h] [rbp-50h]\n  std::string v16; // [rsp+8h] [rbp-48h] BYREF\n  std::string v17; // [rsp+20h] [rbp-30h] BYREF\n\n  if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 1 )\n  {\n    v6 = GameManager::sharedState(a2, a2, v5);\n    *(float *)&a4 = GameManager::setIntGameVariable(v6, \"0133\", a3);\n    v7 = *(_QWORD *)(a1 + 1312);\n    v8 = sub_10088E820(\"%i\", v15);\n    CString = cocos2d::CCString::getCString(v8);\n    ButtonSprite::setString(v7, CString, a4);\n    return;\n  }\n  if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 2 )\n  {\n    v11 = GameManager::sharedState(a2, a2, v10);\n    *(float *)&a4 = GameManager::setIntGameVariable(v11, \"0139\", a3);\n    *(_WORD *)&v17.__r_.__value_.__l.0 = 0;\n    if ( (int)a3 < 1000 )\n    {\n      GameToolbox::intToString(&v16, a3);\n      if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )\n        operator delete(v17.__r_.__value_.__l.__data_);\n      v17 = v16;\n      a4 = *(double *)v16.__r_.__value_.__r.__words;\n      v13 = *(_QWORD *)(a1 + 1320);\n      if ( (*(_BYTE *)&v16.__r_.__value_.__s.0 & 1) != 0 )\n        goto LABEL_6;\n    }\n    else\n    {\n      v12 = (const std::string::value_type *)GJSpecialColorSelect::textForColorIdx(a3);\n      std::string::assign(&v17, v12);\n      v13 = *(_QWORD *)(a1 + 1320);\n      if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )\n      {\nLABEL_6:\n        data = v17.__r_.__value_.__l.__data_;\n        goto LABEL_11;\n      }\n    }\n    data = v17.__r_.__value_.__s.__data_;\nLABEL_11:\n    ButtonSprite::setString(v13, data, a4);\n    if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )\n      operator delete(v17.__r_.__value_.__l.__data_);\n  }\n}", "assembly": "; \n; EditorUI::setIDPopupClosed from 0x100010270 to 0x10001039a (298 bytes)\n; \n; 2 xrefs:\n; > sub_1000103C0 @ 0x1000103cc\n; > <???> @ 0x100ab50a8\n; \n; This function is hookable on this platform (idp: pc, 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:18:52 +0000\n; \npush    rbp                                                            ; +0x0, 0x100010270\nmov     rbp, rsp                                                       ; +0x1, 0x100010271\npush    r15                                                            ; +0x4, 0x100010274\npush    r14                                                            ; +0x6, 0x100010276\npush    rbx                                                            ; +0x8, 0x100010278\nsub     rsp, 38h                                                       ; +0x9, 0x100010279\nmov     r14d, edx                                                      ; +0xd, 0x10001027d\nmov     r15, rsi                                                       ; +0x10, 0x100010280\nmov     rbx, rdi                                                       ; +0x13, 0x100010283\nmov     rax, [rsi]                                                     ; +0x16, 0x100010286\nmov     rdi, rsi                                                       ; +0x19, 0x100010289\ncall    qword ptr [rax+40h]                                            ; +0x1c, 0x10001028c\ncmp     eax, 1                                                         ; +0x1f, 0x10001028f\njnz     short loc_1000102E0                                            ; +0x22, 0x100010292\ncall    GameManager__sharedState                                       ; +0x24, 0x100010294\nlea     rsi, a0133; \"0133\"                                             ; +0x29, 0x100010299\nmov     rdi, rax                                                       ; +0x30, 0x1000102a0\nmov     edx, r14d                                                      ; +0x33, 0x1000102a3\ncall    GameManager__setIntGameVariable                                ; +0x36, 0x1000102a6\nmov     rbx, [rbx+520h]                                                ; +0x3b, 0x1000102ab\nlea     rdi, aI_14; \"%i\"                                               ; +0x42, 0x1000102b2\nmov     esi, r14d                                                      ; +0x49, 0x1000102b9\nxor     eax, eax                                                       ; +0x4c, 0x1000102bc\ncall    sub_10088E820                                                  ; +0x4e, 0x1000102be\nmov     rdi, rax                                                       ; +0x53, 0x1000102c3\ncall    cocos2d__CCString__getCString                                  ; +0x56, 0x1000102c6\nmov     rdi, rbx                                                       ; +0x5b, 0x1000102cb\nmov     rsi, rax                                                       ; +0x5e, 0x1000102ce\nadd     rsp, 38h                                                       ; +0x61, 0x1000102d1\npop     rbx                                                            ; +0x65, 0x1000102d5\npop     r14                                                            ; +0x66, 0x1000102d6\npop     r15                                                            ; +0x68, 0x1000102d8\npop     rbp                                                            ; +0x6a, 0x1000102da\njmp     ButtonSprite__setString                                        ; +0x6b, 0x1000102db\nmov     rax, [r15]                                                     ; +0x70, 0x1000102e0\nmov     rdi, r15                                                       ; +0x73, 0x1000102e3\ncall    qword ptr [rax+40h]                                            ; +0x76, 0x1000102e6\ncmp     eax, 2                                                         ; +0x79, 0x1000102e9\njnz     loc_10001038F                                                  ; +0x7c, 0x1000102ec\ncall    GameManager__sharedState                                       ; +0x82, 0x1000102f2\nlea     rsi, a0139; \"0139\"                                             ; +0x87, 0x1000102f7\nmov     rdi, rax                                                       ; +0x8e, 0x1000102fe\nmov     edx, r14d                                                      ; +0x91, 0x100010301\ncall    GameManager__setIntGameVariable                                ; +0x94, 0x100010304\nmov     word ptr [rbp+var_30.__r_.__value_], 0                         ; +0x99, 0x100010309\ncmp     r14d, 3E8h                                                     ; +0x9f, 0x10001030f\njl      short loc_10001033F                                            ; +0xa6, 0x100010316\nmov     edi, r14d                                                      ; +0xa8, 0x100010318\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0xab, 0x10001031b\nlea     rdi, [rbp+var_30]; this                                        ; +0xb0, 0x100010320\nmov     rsi, rax; __s                                                  ; +0xb4, 0x100010324\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xb7, 0x100010327\nmov     rdi, [rbx+528h]                                                ; +0xbc, 0x10001032c\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0xc3, 0x100010333\njz      short loc_100010377                                            ; +0xc7, 0x100010337\nmov     rsi, qword ptr [rbp+var_30.__r_.__value_+10h]                  ; +0xc9, 0x100010339\njmp     short loc_10001037B                                            ; +0xcd, 0x10001033d\nlea     rdi, [rbp+var_48]                                              ; +0xcf, 0x10001033f\nmov     esi, r14d                                                      ; +0xd3, 0x100010343\ncall    GameToolbox__intToString                                       ; +0xd6, 0x100010346\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0xdb, 0x10001034b\njz      short loc_10001035A                                            ; +0xdf, 0x10001034f\nmov     rdi, qword ptr [rbp+var_30.__r_.__value_+10h]; __p             ; +0xe1, 0x100010351\ncall    __ZdlPv; operator delete(void *)                               ; +0xe5, 0x100010355\nmov     rax, [rbp+var_38]                                              ; +0xea, 0x10001035a\nmov     qword ptr [rbp+var_30.__r_.__value_+10h], rax                  ; +0xee, 0x10001035e\nmovups  xmm0, [rbp+var_48]                                             ; +0xf2, 0x100010362\nmovaps  xmmword ptr [rbp+var_30.__r_.__value_], xmm0                   ; +0xf6, 0x100010366\nmov     rdi, [rbx+528h]                                                ; +0xfa, 0x10001036a\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0x101, 0x100010371\njnz     short loc_100010339                                            ; +0x105, 0x100010375\nlea     rsi, [rbp+var_30.__r_.__value_+1]                              ; +0x107, 0x100010377\ncall    ButtonSprite__setString                                        ; +0x10b, 0x10001037b\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0x110, 0x100010380\njz      short loc_10001038F                                            ; +0x114, 0x100010384\nmov     rdi, qword ptr [rbp+var_30.__r_.__value_+10h]; __p             ; +0x116, 0x100010386\ncall    __ZdlPv; operator delete(void *)                               ; +0x11a, 0x10001038a\nadd     rsp, 38h                                                       ; +0x11f, 0x10001038f\npop     rbx                                                            ; +0x123, 0x100010393\npop     r14                                                            ; +0x124, 0x100010394\npop     r15                                                            ; +0x126, 0x100010396\npop     rbp                                                            ; +0x128, 0x100010398\nretn                                                                   ; +0x129, 0x100010399", "xrefs": ["sub_1000103C0 @ 0x1000103cc", "<???> @ 0x100ab50a8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}