{"type": "func", "start": 4300828224, "end": 4300828659, "name": "ColorSelectLiveOverlay::updateColorLabel", "pseudocode": "// \n// ColorSelectLiveOverlay::updateColorLabel from 0x100596e40 to 0x100596ff3 (435 bytes)\n// \n// 2 xrefs:\n// > ColorSelectLiveOverlay::init @ 0x100596601\n// > ColorSelectLiveOverlay::onSelectTab @ 0x100596e30\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:32:29 +0000\n// \n\nvoid __fastcall ColorSelectLiveOverlay::updateColorLabel(__int64 a1)\n{\n  __int64 v2; // r15\n  int v3; // r14d\n  __int64 v4; // rax\n  __int64 v5; // rax\n  const std::string::value_type *CString; // rax\n  __int64 v7; // rdi\n  std::string::pointer data; // rsi\n  unsigned int v9; // r14d\n  int v10; // eax\n  unsigned int v11; // r14d\n  __int64 v12; // rax\n  unsigned int v13; // r14d\n  __int64 v14; // rax\n  std::string v15; // [rsp+0h] [rbp-30h] BYREF\n\n  v2 = *(_QWORD *)(a1 + 8LL * *(unsigned __int8 *)(a1 + 856) + 688);\n  if ( v2 )\n  {\n    v3 = *(_DWORD *)(v2 + 92);\n    if ( v3 <= 0 )\n    {\nLABEL_8:\n      (*(void (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 848) + 928LL))(\n        *(_QWORD *)(a1 + 848),\n        \" \");\n      return;\n    }\n  }\n  else\n  {\n    v4 = *(_QWORD *)(a1 + 664);\n    if ( !v4 )\n      goto LABEL_8;\n    v3 = *(_DWORD *)(v4 + 1024);\n    if ( v3 <= 0 )\n      goto LABEL_8;\n  }\n  *(_WORD *)&v15.__r_.__value_.__l.0 = 0;\n  if ( (unsigned int)v3 > 0x3E7 )\n  {\n    CString = (const std::string::value_type *)GJSpecialColorSelect::textForColorIdx((unsigned int)v3);\n  }\n  else\n  {\n    v5 = sub_10088E820(\"%i\", *(_BYTE *)&v15.__r_.__value_.__l.0);\n    CString = (const std::string::value_type *)cocos2d::CCString::getCString(v5);\n  }\n  std::string::assign(&v15, CString);\n  v7 = *(_QWORD *)(a1 + 848);\n  if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) != 0 )\n    data = v15.__r_.__value_.__l.__data_;\n  else\n    data = v15.__r_.__value_.__s.__data_;\n  (*(void (__fastcall **)(__int64, std::string::pointer))(*(_QWORD *)v7 + 928LL))(v7, data);\n  if ( v2 )\n  {\n    if ( (unsigned int)v3 < 0x3ED || (v9 = v3 - 1009, v9 <= 5) && (v10 = 49, _bittest(&v10, v9)) )\n    {\n      if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 672)) )\n      {\n        v11 = 0;\n        do\n        {\n          v12 = sub_1007FEFE0(*(_QWORD *)(a1 + 672), v11);\n          (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 344LL))(v12, 1);\n          ++v11;\n        }\n        while ( v11 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 672)) );\n      }\n    }\n    else if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 672)) )\n    {\n      v13 = 0;\n      do\n      {\n        v14 = sub_1007FEFE0(*(_QWORD *)(a1 + 672), v13);\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 344LL))(v14, 0);\n        ++v13;\n      }\n      while ( v13 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 672)) );\n    }\n  }\n  if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) != 0 )\n    operator delete(v15.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; ColorSelectLiveOverlay::updateColorLabel from 0x100596e40 to 0x100596ff3 (435 bytes)\n; \n; 2 xrefs:\n; > ColorSelectLiveOverlay::init @ 0x100596601\n; > ColorSelectLiveOverlay::onSelectTab @ 0x100596e30\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:32:29 +0000\n; \npush    rbp                                                            ; +0x0, 0x100596e40\nmov     rbp, rsp                                                       ; +0x1, 0x100596e41\npush    r15                                                            ; +0x4, 0x100596e44\npush    r14                                                            ; +0x6, 0x100596e46\npush    rbx                                                            ; +0x8, 0x100596e48\nsub     rsp, 18h                                                       ; +0x9, 0x100596e49\nmov     rbx, rdi                                                       ; +0xd, 0x100596e4d\nmovzx   eax, byte ptr [rdi+358h]                                       ; +0x10, 0x100596e50\nmov     r15, [rdi+rax*8+2B0h]                                          ; +0x17, 0x100596e57\ntest    r15, r15                                                       ; +0x1f, 0x100596e5f\njz      short loc_100596E72                                            ; +0x22, 0x100596e62\nlea     rax, [r15+5Ch]                                                 ; +0x24, 0x100596e64\nmov     r14d, [rax]                                                    ; +0x28, 0x100596e68\ntest    r14d, r14d                                                     ; +0x2b, 0x100596e6b\njg      short loc_100596E8C                                            ; +0x2e, 0x100596e6e\njmp     short loc_100596EB6                                            ; +0x30, 0x100596e70\nmov     rax, [rbx+298h]                                                ; +0x32, 0x100596e72\ntest    rax, rax                                                       ; +0x39, 0x100596e79\njz      short loc_100596EB6                                            ; +0x3c, 0x100596e7c\nadd     rax, 400h                                                      ; +0x3e, 0x100596e7e\nmov     r14d, [rax]                                                    ; +0x44, 0x100596e84\ntest    r14d, r14d                                                     ; +0x47, 0x100596e87\njle     short loc_100596EB6                                            ; +0x4a, 0x100596e8a\nmov     word ptr [rbp+var_30.__r_.__value_], 0                         ; +0x4c, 0x100596e8c\ncmp     r14d, 3E7h                                                     ; +0x52, 0x100596e92\nja      short loc_100596EDA                                            ; +0x59, 0x100596e99\nlea     rdi, aI_14; \"%i\"                                               ; +0x5b, 0x100596e9b\nmov     esi, r14d                                                      ; +0x62, 0x100596ea2\nxor     eax, eax                                                       ; +0x65, 0x100596ea5\ncall    sub_10088E820                                                  ; +0x67, 0x100596ea7\nmov     rdi, rax                                                       ; +0x6c, 0x100596eac\ncall    cocos2d__CCString__getCString                                  ; +0x6f, 0x100596eaf\njmp     short loc_100596EE2                                            ; +0x74, 0x100596eb4\nmov     rdi, [rbx+350h]                                                ; +0x76, 0x100596eb6\nmov     rax, [rdi]                                                     ; +0x7d, 0x100596ebd\nmov     rax, [rax+3A0h]                                                ; +0x80, 0x100596ec0\nlea     rsi, asc_100A41844; \" \"                                        ; +0x87, 0x100596ec7\nadd     rsp, 18h                                                       ; +0x8e, 0x100596ece\npop     rbx                                                            ; +0x92, 0x100596ed2\npop     r14                                                            ; +0x93, 0x100596ed3\npop     r15                                                            ; +0x95, 0x100596ed5\npop     rbp                                                            ; +0x97, 0x100596ed7\njmp     rax                                                            ; +0x98, 0x100596ed8\nmov     edi, r14d                                                      ; +0x9a, 0x100596eda\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x9d, 0x100596edd\nlea     rdi, [rbp+var_30]; this                                        ; +0xa2, 0x100596ee2\nmov     rsi, rax; __s                                                  ; +0xa6, 0x100596ee6\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xa9, 0x100596ee9\nmov     rdi, [rbx+350h]                                                ; +0xae, 0x100596eee\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0xb5, 0x100596ef5\njz      short loc_100596F01                                            ; +0xb9, 0x100596ef9\nmov     rsi, qword ptr [rbp+var_30.__r_.__value_+10h]                  ; +0xbb, 0x100596efb\njmp     short loc_100596F05                                            ; +0xbf, 0x100596eff\nlea     rsi, [rbp+var_30.__r_.__value_+1]                              ; +0xc1, 0x100596f01\nmov     rax, [rdi]                                                     ; +0xc5, 0x100596f05\ncall    qword ptr [rax+3A0h]                                           ; +0xc8, 0x100596f08\ntest    r15, r15                                                       ; +0xce, 0x100596f0e\njz      short loc_100596F84                                            ; +0xd1, 0x100596f11\ncmp     r14d, 3EDh                                                     ; +0xd3, 0x100596f13\njb      short loc_100596F34                                            ; +0xda, 0x100596f1a\nadd     r14d, 0FFFFFC0Fh                                               ; +0xdc, 0x100596f1c\ncmp     r14d, 5                                                        ; +0xe3, 0x100596f23\nja      short loc_100596F9E                                            ; +0xe7, 0x100596f27\nmov     eax, 31h ; '1'                                                 ; +0xe9, 0x100596f29\nbt      eax, r14d                                                      ; +0xee, 0x100596f2e\njnb     short loc_100596F9E                                            ; +0xf2, 0x100596f32\nmov     rdi, [rbx+2A0h]                                                ; +0xf4, 0x100596f34\ncall    sub_1007FEF90                                                  ; +0xfb, 0x100596f3b\ntest    eax, eax                                                       ; +0x100, 0x100596f40\njz      short loc_100596F84                                            ; +0x102, 0x100596f42\nxor     r14d, r14d                                                     ; +0x104, 0x100596f44\nnop     word ptr [rax+rax+00000000h]                                   ; +0x107, 0x100596f47\nmov     rdi, [rbx+2A0h]                                                ; +0x110, 0x100596f50\nmov     esi, r14d                                                      ; +0x117, 0x100596f57\ncall    sub_1007FEFE0                                                  ; +0x11a, 0x100596f5a\nmov     rcx, [rax]                                                     ; +0x11f, 0x100596f5f\nmov     rdi, rax                                                       ; +0x122, 0x100596f62\nmov     esi, 1                                                         ; +0x125, 0x100596f65\ncall    qword ptr [rcx+158h]                                           ; +0x12a, 0x100596f6a\nmov     rdi, [rbx+2A0h]                                                ; +0x130, 0x100596f70\ncall    sub_1007FEF90                                                  ; +0x137, 0x100596f77\ninc     r14d                                                           ; +0x13c, 0x100596f7c\ncmp     r14d, eax                                                      ; +0x13f, 0x100596f7f\njb      short loc_100596F50                                            ; +0x142, 0x100596f82\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0x144, 0x100596f84\njz      short loc_100596F93                                            ; +0x148, 0x100596f88\nmov     rdi, qword ptr [rbp+var_30.__r_.__value_+10h]; __p             ; +0x14a, 0x100596f8a\ncall    __ZdlPv; operator delete(void *)                               ; +0x14e, 0x100596f8e\nadd     rsp, 18h                                                       ; +0x153, 0x100596f93\npop     rbx                                                            ; +0x157, 0x100596f97\npop     r14                                                            ; +0x158, 0x100596f98\npop     r15                                                            ; +0x15a, 0x100596f9a\npop     rbp                                                            ; +0x15c, 0x100596f9c\nretn                                                                   ; +0x15d, 0x100596f9d\nmov     rdi, [rbx+2A0h]                                                ; +0x15e, 0x100596f9e\ncall    sub_1007FEF90                                                  ; +0x165, 0x100596fa5\ntest    eax, eax                                                       ; +0x16a, 0x100596faa\njz      short loc_100596F84                                            ; +0x16c, 0x100596fac\nxor     r14d, r14d                                                     ; +0x16e, 0x100596fae\nnop     word ptr [rax+rax+00000000h]                                   ; +0x171, 0x100596fb1\nmov     rdi, [rbx+2A0h]                                                ; +0x180, 0x100596fc0\nmov     esi, r14d                                                      ; +0x187, 0x100596fc7\ncall    sub_1007FEFE0                                                  ; +0x18a, 0x100596fca\nmov     rcx, [rax]                                                     ; +0x18f, 0x100596fcf\nmov     rdi, rax                                                       ; +0x192, 0x100596fd2\nxor     esi, esi                                                       ; +0x195, 0x100596fd5\ncall    qword ptr [rcx+158h]                                           ; +0x197, 0x100596fd7\nmov     rdi, [rbx+2A0h]                                                ; +0x19d, 0x100596fdd\ncall    sub_1007FEF90                                                  ; +0x1a4, 0x100596fe4\ninc     r14d                                                           ; +0x1a9, 0x100596fe9\ncmp     r14d, eax                                                      ; +0x1ac, 0x100596fec\njb      short loc_100596FC0                                            ; +0x1af, 0x100596fef\njmp     short loc_100596F84                                            ; +0x1b1, 0x100596ff1", "xrefs": ["ColorSelectLiveOverlay::init @ 0x100596601", "ColorSelectLiveOverlay::onSelectTab @ 0x100596e30"], "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"}