{"type": "func", "start": 4300644288, "end": 4300644723, "name": "ColorSelectLiveOverlay::updateColorLabel", "pseudocode": "// \n// ColorSelectLiveOverlay::updateColorLabel from 0x100569fc0 to 0x10056a173 (435 bytes)\n// \n// 2 xrefs:\n// > ColorSelectLiveOverlay::init @ 0x100569781\n// > ColorSelectLiveOverlay::onSelectTab @ 0x100569fb0\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 __fastcall ColorSelectLiveOverlay::updateColorLabel(ColorSelectLiveOverlay *a1)\n{\n  __int64 v2; // r15\n  int m_targetColor; // r14d\n  EffectGameObject *m_effectGameObject; // rax\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  cocos2d::CCLabelBMFont *m_colorLabel; // 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->m_baseColorAction + a1->m_detailColorSelected);\n  if ( v2 )\n  {\n    m_targetColor = *(_DWORD *)(v2 + 92);\n    if ( m_targetColor <= 0 )\n    {\nLABEL_8:\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const std::string::value_type *))a1->m_colorLabel->setString)(\n        a1->m_colorLabel,\n        \" \");\n      return;\n    }\n  }\n  else\n  {\n    m_effectGameObject = a1->m_effectGameObject;\n    if ( !m_effectGameObject )\n      goto LABEL_8;\n    m_targetColor = m_effectGameObject->m_targetColor;\n    if ( m_targetColor <= 0 )\n      goto LABEL_8;\n  }\n  *(_WORD *)&v15.__r_.__value_.__l.0 = 0;\n  if ( (unsigned int)m_targetColor > 0x3E7 )\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(m_targetColor);\n  }\n  else\n  {\n    v5 = (cocos2d::CCString *)sub_1007AB580(\"%i\", *(_BYTE *)&v15.__r_.__value_.__l.0);\n    CString = cocos2d::CCString::getCString(v5);\n  }\n  std::string::assign(&v15, CString);\n  m_colorLabel = a1->m_colorLabel;\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 *)(cocos2d::CCLabelBMFont *, std::string::pointer))m_colorLabel->setString)(m_colorLabel, data);\n  if ( v2 )\n  {\n    if ( (unsigned int)m_targetColor < 0x3ED || (v9 = m_targetColor - 1009, v9 <= 5) && (v10 = 49, _bittest(&v10, v9)) )\n    {\n      if ( (unsigned int)sub_100720070(a1->m_barSprites) )\n      {\n        v11 = 0;\n        do\n        {\n          v12 = sub_1007200C0(a1->m_barSprites, v11);\n          (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 328LL))(v12, 1);\n          ++v11;\n        }\n        while ( v11 < (unsigned int)sub_100720070(a1->m_barSprites) );\n      }\n    }\n    else if ( (unsigned int)sub_100720070(a1->m_barSprites) )\n    {\n      v13 = 0;\n      do\n      {\n        v14 = sub_1007200C0(a1->m_barSprites, v13);\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 328LL))(v14, 0);\n        ++v13;\n      }\n      while ( v13 < (unsigned int)sub_100720070(a1->m_barSprites) );\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 0x100569fc0 to 0x10056a173 (435 bytes)\n; \n; 2 xrefs:\n; > ColorSelectLiveOverlay::init @ 0x100569781\n; > ColorSelectLiveOverlay::onSelectTab @ 0x100569fb0\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    rbp                                                            ; +0x0, 0x100569fc0\nmov     rbp, rsp                                                       ; +0x1, 0x100569fc1\npush    r15                                                            ; +0x4, 0x100569fc4\npush    r14                                                            ; +0x6, 0x100569fc6\npush    rbx                                                            ; +0x8, 0x100569fc8\nsub     rsp, 18h                                                       ; +0x9, 0x100569fc9\nmov     rbx, rdi                                                       ; +0xd, 0x100569fcd\nmovzx   eax, byte ptr [rdi+338h]                                       ; +0x10, 0x100569fd0\nmov     r15, [rdi+rax*8+290h]                                          ; +0x17, 0x100569fd7\ntest    r15, r15                                                       ; +0x1f, 0x100569fdf\njz      short loc_100569FF2                                            ; +0x22, 0x100569fe2\nlea     rax, [r15+5Ch]                                                 ; +0x24, 0x100569fe4\nmov     r14d, [rax]                                                    ; +0x28, 0x100569fe8\ntest    r14d, r14d                                                     ; +0x2b, 0x100569feb\njg      short loc_10056A00C                                            ; +0x2e, 0x100569fee\njmp     short loc_10056A036                                            ; +0x30, 0x100569ff0\nmov     rax, [rbx+278h]                                                ; +0x32, 0x100569ff2\ntest    rax, rax                                                       ; +0x39, 0x100569ff9\njz      short loc_10056A036                                            ; +0x3c, 0x100569ffc\nadd     rax, 400h                                                      ; +0x3e, 0x100569ffe\nmov     r14d, [rax]                                                    ; +0x44, 0x10056a004\ntest    r14d, r14d                                                     ; +0x47, 0x10056a007\njle     short loc_10056A036                                            ; +0x4a, 0x10056a00a\nmov     word ptr [rbp+var_30.__r_.__value_], 0                         ; +0x4c, 0x10056a00c\ncmp     r14d, 3E7h                                                     ; +0x52, 0x10056a012\nja      short loc_10056A05A                                            ; +0x59, 0x10056a019\nlea     rdi, aI; \"%i\"                                                  ; +0x5b, 0x10056a01b\nmov     esi, r14d                                                      ; +0x62, 0x10056a022\nxor     eax, eax                                                       ; +0x65, 0x10056a025\ncall    sub_1007AB580                                                  ; +0x67, 0x10056a027\nmov     rdi, rax                                                       ; +0x6c, 0x10056a02c\ncall    cocos2d__CCString__getCString                                  ; +0x6f, 0x10056a02f\njmp     short loc_10056A062                                            ; +0x74, 0x10056a034\nmov     rdi, [rbx+330h]                                                ; +0x76, 0x10056a036\nmov     rax, [rdi]                                                     ; +0x7d, 0x10056a03d\nmov     rax, [rax+390h]                                                ; +0x80, 0x10056a040\nlea     rsi, asc_100823F54; \" \"                                        ; +0x87, 0x10056a047\nadd     rsp, 18h                                                       ; +0x8e, 0x10056a04e\npop     rbx                                                            ; +0x92, 0x10056a052\npop     r14                                                            ; +0x93, 0x10056a053\npop     r15                                                            ; +0x95, 0x10056a055\npop     rbp                                                            ; +0x97, 0x10056a057\njmp     rax                                                            ; +0x98, 0x10056a058\nmov     edi, r14d                                                      ; +0x9a, 0x10056a05a\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x9d, 0x10056a05d\nlea     rdi, [rbp+var_30]; this                                        ; +0xa2, 0x10056a062\nmov     rsi, rax; __s                                                  ; +0xa6, 0x10056a066\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xa9, 0x10056a069\nmov     rdi, [rbx+330h]                                                ; +0xae, 0x10056a06e\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0xb5, 0x10056a075\njz      short loc_10056A081                                            ; +0xb9, 0x10056a079\nmov     rsi, qword ptr [rbp+var_30.__r_.__value_+10h]                  ; +0xbb, 0x10056a07b\njmp     short loc_10056A085                                            ; +0xbf, 0x10056a07f\nlea     rsi, [rbp+var_30.__r_.__value_+1]                              ; +0xc1, 0x10056a081\nmov     rax, [rdi]                                                     ; +0xc5, 0x10056a085\ncall    qword ptr [rax+390h]                                           ; +0xc8, 0x10056a088\ntest    r15, r15                                                       ; +0xce, 0x10056a08e\njz      short loc_10056A104                                            ; +0xd1, 0x10056a091\ncmp     r14d, 3EDh                                                     ; +0xd3, 0x10056a093\njb      short loc_10056A0B4                                            ; +0xda, 0x10056a09a\nadd     r14d, 0FFFFFC0Fh                                               ; +0xdc, 0x10056a09c\ncmp     r14d, 5                                                        ; +0xe3, 0x10056a0a3\nja      short loc_10056A11E                                            ; +0xe7, 0x10056a0a7\nmov     eax, 31h ; '1'                                                 ; +0xe9, 0x10056a0a9\nbt      eax, r14d                                                      ; +0xee, 0x10056a0ae\njnb     short loc_10056A11E                                            ; +0xf2, 0x10056a0b2\nmov     rdi, [rbx+280h]                                                ; +0xf4, 0x10056a0b4\ncall    sub_100720070                                                  ; +0xfb, 0x10056a0bb\ntest    eax, eax                                                       ; +0x100, 0x10056a0c0\njz      short loc_10056A104                                            ; +0x102, 0x10056a0c2\nxor     r14d, r14d                                                     ; +0x104, 0x10056a0c4\nnop     word ptr [rax+rax+00000000h]                                   ; +0x107, 0x10056a0c7\nmov     rdi, [rbx+280h]                                                ; +0x110, 0x10056a0d0\nmov     esi, r14d                                                      ; +0x117, 0x10056a0d7\ncall    sub_1007200C0                                                  ; +0x11a, 0x10056a0da\nmov     rcx, [rax]                                                     ; +0x11f, 0x10056a0df\nmov     rdi, rax                                                       ; +0x122, 0x10056a0e2\nmov     esi, 1                                                         ; +0x125, 0x10056a0e5\ncall    qword ptr [rcx+148h]                                           ; +0x12a, 0x10056a0ea\nmov     rdi, [rbx+280h]                                                ; +0x130, 0x10056a0f0\ncall    sub_100720070                                                  ; +0x137, 0x10056a0f7\ninc     r14d                                                           ; +0x13c, 0x10056a0fc\ncmp     r14d, eax                                                      ; +0x13f, 0x10056a0ff\njb      short loc_10056A0D0                                            ; +0x142, 0x10056a102\ntest    byte ptr [rbp+var_30.__r_.__value_], 1                         ; +0x144, 0x10056a104\njz      short loc_10056A113                                            ; +0x148, 0x10056a108\nmov     rdi, qword ptr [rbp+var_30.__r_.__value_+10h]; __p             ; +0x14a, 0x10056a10a\ncall    __ZdlPv; operator delete(void *)                               ; +0x14e, 0x10056a10e\nadd     rsp, 18h                                                       ; +0x153, 0x10056a113\npop     rbx                                                            ; +0x157, 0x10056a117\npop     r14                                                            ; +0x158, 0x10056a118\npop     r15                                                            ; +0x15a, 0x10056a11a\npop     rbp                                                            ; +0x15c, 0x10056a11c\nretn                                                                   ; +0x15d, 0x10056a11d\nmov     rdi, [rbx+280h]                                                ; +0x15e, 0x10056a11e\ncall    sub_100720070                                                  ; +0x165, 0x10056a125\ntest    eax, eax                                                       ; +0x16a, 0x10056a12a\njz      short loc_10056A104                                            ; +0x16c, 0x10056a12c\nxor     r14d, r14d                                                     ; +0x16e, 0x10056a12e\nnop     word ptr [rax+rax+00000000h]                                   ; +0x171, 0x10056a131\nmov     rdi, [rbx+280h]                                                ; +0x180, 0x10056a140\nmov     esi, r14d                                                      ; +0x187, 0x10056a147\ncall    sub_1007200C0                                                  ; +0x18a, 0x10056a14a\nmov     rcx, [rax]                                                     ; +0x18f, 0x10056a14f\nmov     rdi, rax                                                       ; +0x192, 0x10056a152\nxor     esi, esi                                                       ; +0x195, 0x10056a155\ncall    qword ptr [rcx+148h]                                           ; +0x197, 0x10056a157\nmov     rdi, [rbx+280h]                                                ; +0x19d, 0x10056a15d\ncall    sub_100720070                                                  ; +0x1a4, 0x10056a164\ninc     r14d                                                           ; +0x1a9, 0x10056a169\ncmp     r14d, eax                                                      ; +0x1ac, 0x10056a16c\njb      short loc_10056A140                                            ; +0x1af, 0x10056a16f\njmp     short loc_10056A104                                            ; +0x1b1, 0x10056a171", "xrefs": ["ColorSelectLiveOverlay::init @ 0x100569781", "ColorSelectLiveOverlay::onSelectTab @ 0x100569fb0"], "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"}