{"type": "func", "start": 4295975920, "end": 4295976248, "name": "ColorSelectLiveOverlay::updateColorLabel", "pseudocode": "// \n// ColorSelectLiveOverlay::updateColorLabel from 0x1000f63f0 to 0x1000f6538 (328 bytes)\n// \n// 2 xrefs:\n// > ColorSelectLiveOverlay::init @ 0x1000f5dac\n// > ColorSelectLiveOverlay::onSelectTab @ 0x1000f63ec\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; // x8\n  __int64 v3; // x21\n  unsigned int *p_m_targetColor; // x8\n  EffectGameObject *m_effectGameObject; // x8\n  unsigned int v6; // w20\n  cocos2d::CCString *v7; // x0\n  const char *CString; // x1\n  std::string *v9; // x1\n  unsigned int v10; // w8\n  std::string v11; // [xsp+8h] [xbp-38h] BYREF\n\n  v2 = 656;\n  if ( a1->m_detailColorSelected )\n    v2 = 664;\n  v3 = *(__int64 *)((char *)&a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n                  + v2);\n  if ( v3 )\n  {\n    p_m_targetColor = (unsigned int *)(v3 + 92);\n  }\n  else\n  {\n    m_effectGameObject = a1->m_effectGameObject;\n    if ( !m_effectGameObject )\n    {\nLABEL_10:\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_colorLabel->setString)(a1->m_colorLabel, \" \");\n      return;\n    }\n    p_m_targetColor = (unsigned int *)&m_effectGameObject->m_targetColor;\n  }\n  v6 = *p_m_targetColor;\n  if ( (int)*p_m_targetColor < 1 )\n    goto LABEL_10;\n  sub_100009900(&v11, \"\");\n  if ( v6 > 0x3E7 )\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(v6);\n  }\n  else\n  {\n    v7 = (cocos2d::CCString *)sub_100268F4C(\"%i\", v6);\n    CString = cocos2d::CCString::getCString(v7);\n  }\n  std::string::assign(&v11, CString);\n  if ( (v11.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n    v9 = &v11;\n  else\n    v9 = (std::string *)v11.__r_.__value_.__r.__words[0];\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))a1->m_colorLabel->setString)(a1->m_colorLabel, v9);\n  if ( v3 )\n  {\n    if ( v6 < 0x3ED )\n    {\n      LOBYTE(v10) = 1;\n    }\n    else if ( v6 - 1009 >= 6 )\n    {\n      LOBYTE(v10) = 0;\n    }\n    else\n    {\n      v10 = 0x31u >> (v6 + 15);\n    }\n    ColorSelectLiveOverlay::toggleControls(a1, v10 & 1);\n  }\n  if ( SHIBYTE(v11.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(v11.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; ColorSelectLiveOverlay::updateColorLabel from 0x1000f63f0 to 0x1000f6538 (328 bytes)\n; \n; 2 xrefs:\n; > ColorSelectLiveOverlay::init @ 0x1000f5dac\n; > ColorSelectLiveOverlay::onSelectTab @ 0x1000f63ec\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x1000f63f0\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x1000f63f4\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x1000f63f8\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x1000f63fc\nADD             X29, SP, #0x40                                         ; +0x10, 0x1000f6400\nMOV             X19, X0                                                ; +0x14, 0x1000f6404\nLDRB            W8, [X0,#0x338]                                        ; +0x18, 0x1000f6408\nCMP             W8, #0                                                 ; +0x1c, 0x1000f640c\nMOV             W8, #0x290                                             ; +0x20, 0x1000f6410\nMOV             W9, #0x298                                             ; +0x24, 0x1000f6414\nCSEL            X8, X9, X8, NE                                         ; +0x28, 0x1000f6418\nLDR             X21, [X0,X8]                                           ; +0x2c, 0x1000f641c\nCBZ             X21, loc_1000F642C                                     ; +0x30, 0x1000f6420\nADD             X8, X21, #0x5C ; '\\'                                   ; +0x34, 0x1000f6424\nB               loc_1000F6438                                          ; +0x38, 0x1000f6428\nLDR             X8, [X19,#0x278]                                       ; +0x3c, 0x1000f642c\nCBZ             X8, loc_1000F6478                                      ; +0x40, 0x1000f6430\nADD             X8, X8, #0x400                                         ; +0x44, 0x1000f6434\nLDR             W20, [X8]                                              ; +0x48, 0x1000f6438\nCMP             W20, #1                                                ; +0x4c, 0x1000f643c\nB.LT            loc_1000F6478                                          ; +0x50, 0x1000f6440\nADRL            X1, asc_100746688; \"\"                                  ; +0x54, 0x1000f6444\nADD             X0, SP, #0x40+var_38; int                              ; +0x5c, 0x1000f644c\nBL              sub_100009900                                          ; +0x60, 0x1000f6450\nCMP             W20, #0x3E7                                            ; +0x64, 0x1000f6454\nB.HI            loc_1000F64A0                                          ; +0x68, 0x1000f6458\nSTR             X20, [SP,#0x40+var_40]                                 ; +0x6c, 0x1000f645c\nADRL            X0, aI; \"%i\"                                           ; +0x70, 0x1000f6460\nBL              sub_100268F4C                                          ; +0x78, 0x1000f6468\nBL              cocos2d__CCString__getCString                          ; +0x7c, 0x1000f646c\nMOV             X1, X0                                                 ; +0x80, 0x1000f6470\nB               loc_1000F64AC                                          ; +0x84, 0x1000f6474\nLDR             X0, [X19,#0x330]                                       ; +0x88, 0x1000f6478\nLDR             X8, [X0]                                               ; +0x8c, 0x1000f647c\nLDR             X2, [X8,#0x390]                                        ; +0x90, 0x1000f6480\nADRL            X1, asc_1006B11F7; \" \"                                 ; +0x94, 0x1000f6484\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x9c, 0x1000f648c\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0xa0, 0x1000f6490\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0xa4, 0x1000f6494\nADD             SP, SP, #0x50 ; 'P'                                    ; +0xa8, 0x1000f6498\nBR              X2                                                     ; +0xac, 0x1000f649c\nMOV             X0, X20                                                ; +0xb0, 0x1000f64a0\nBL              GJSpecialColorSelect__textForColorIdx                  ; +0xb4, 0x1000f64a4\nMOV             X1, X0; __s                                            ; +0xb8, 0x1000f64a8\nADD             X22, SP, #0x40+var_38                                  ; +0xbc, 0x1000f64ac\nADD             X0, SP, #0x40+var_38; this                             ; +0xc0, 0x1000f64b0\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xc4, 0x1000f64b4\nLDR             X0, [X19,#0x330]                                       ; +0xc8, 0x1000f64b8\nLDRSB           W8, [SP,#0x40+var_38.__r_.__value_+0x17]               ; +0xcc, 0x1000f64bc\nLDR             X9, [SP,#0x40+var_38]                                  ; +0xd0, 0x1000f64c0\nCMP             W8, #0                                                 ; +0xd4, 0x1000f64c4\nCSEL            X1, X9, X22, LT                                        ; +0xd8, 0x1000f64c8\nLDR             X8, [X0]                                               ; +0xdc, 0x1000f64cc\nLDR             X8, [X8,#0x390]                                        ; +0xe0, 0x1000f64d0\nBLR             X8                                                     ; +0xe4, 0x1000f64d4\nCBZ             X21, loc_1000F6514                                     ; +0xe8, 0x1000f64d8\nCMP             W20, #0x3ED                                            ; +0xec, 0x1000f64dc\nB.CC            loc_1000F64FC                                          ; +0xf0, 0x1000f64e0\nSUB             W8, W20, #0x3F1                                        ; +0xf4, 0x1000f64e4\nCMP             W8, #6                                                 ; +0xf8, 0x1000f64e8\nB.CS            loc_1000F6504                                          ; +0xfc, 0x1000f64ec\nMOV             W9, #0x31 ; '1'                                        ; +0x100, 0x1000f64f0\nLSR             W8, W9, W8                                             ; +0x104, 0x1000f64f4\nB               loc_1000F6508                                          ; +0x108, 0x1000f64f8\nMOV             W8, #1                                                 ; +0x10c, 0x1000f64fc\nB               loc_1000F6508                                          ; +0x110, 0x1000f6500\nMOV             W8, #0                                                 ; +0x114, 0x1000f6504\nAND             W1, W8, #1                                             ; +0x118, 0x1000f6508\nMOV             X0, X19                                                ; +0x11c, 0x1000f650c\nBL              ColorSelectLiveOverlay__toggleControls                 ; +0x120, 0x1000f6510\nLDRSB           W8, [SP,#0x40+var_38.__r_.__value_+0x17]               ; +0x124, 0x1000f6514\nTBZ             W8, #0x1F, loc_1000F6524                               ; +0x128, 0x1000f6518\nLDR             X0, [SP,#0x40+var_38]; __p                             ; +0x12c, 0x1000f651c\nBL              __ZdlPv; operator delete(void *)                       ; +0x130, 0x1000f6520\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x134, 0x1000f6524\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x138, 0x1000f6528\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x13c, 0x1000f652c\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x140, 0x1000f6530\nRET                                                                    ; +0x144, 0x1000f6534", "xrefs": ["ColorSelectLiveOverlay::init @ 0x1000f5dac", "ColorSelectLiveOverlay::onSelectTab @ 0x1000f63ec"], "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"}