{"type": "func", "start": 9482472, "end": 9483016, "name": "ColorSelectLiveOverlay::updateColorLabel", "pseudocode": "// \n// ColorSelectLiveOverlay::updateColorLabel from 0x90b0e8 to 0x90b308 (544 bytes)\n// \n// 3 xrefs:\n// > ColorSelectLiveOverlay::init @ 0x90c058\n// > ColorSelectLiveOverlay::onSelectTab @ 0x90c3b0\n// > <???> @ 0x9e280\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 ColorSelectLiveOverlay::updateColorLabel(ColorSelectLiveOverlay *a1)\n{\n  _BOOL4 m_detailColorSelected; // w2\n  ColorAction *m_baseColorAction; // x0\n  ColorAction *m_detailColorAction; // x20\n  int m_colorID; // w22\n  const char *CString; // x0\n  size_t v7; // x0\n  long double v8; // q0\n  void *v9; // x0\n  cocos2d::CCString *v10; // x0\n  EffectGameObject *m_effectGameObject; // x0\n  unsigned int *v12; // x2\n  int v13; // w1\n  const char *v14; // [xsp+48h] [xbp+48h]\n  __int64 v15; // [xsp+60h] [xbp+60h] BYREF\n\n  m_detailColorSelected = a1->m_detailColorSelected;\n  m_baseColorAction = a1->m_baseColorAction;\n  m_detailColorAction = a1->m_detailColorAction;\n  if ( !m_detailColorSelected )\n    m_detailColorAction = m_baseColorAction;\n  if ( m_detailColorAction )\n  {\n    m_colorID = m_detailColorAction->m_colorID;\n  }\n  else\n  {\n    m_effectGameObject = a1->m_effectGameObject;\n    if ( !m_effectGameObject )\n      goto LABEL_18;\n    m_colorID = m_effectGameObject->m_targetColor;\n  }\n  if ( m_colorID <= 0 )\n  {\nLABEL_18:\n    a1->m_colorLabel->setString(a1->m_colorLabel, (const unsigned __int8 *)\" \");\n    return;\n  }\n  sub_D153B8((int)&v15, &byte_F288A0);\n  if ( m_colorID <= 999 )\n  {\n    v10 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                 (cocos2d::CCString *)\"%i\",\n                                 (const char *)(unsigned int)m_colorID);\n    CString = cocos2d::CCString::getCString(v10);\n  }\n  else\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(m_colorID);\n  }\n  v14 = CString;\n  v7 = strlen(CString);\n  *(__n128 *)&v8 = sub_D1798C(&v15, v14, v7);\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64, long double))a1->m_colorLabel->setString)(\n    a1->m_colorLabel,\n    v15,\n    v8);\n  if ( m_detailColorAction )\n  {\n    if ( m_colorID <= 1004 || m_colorID == 1009 || m_colorID >= 1009 && (unsigned int)(m_colorID - 1013) <= 1 )\n      ColorSelectLiveOverlay::toggleControls(a1, 1);\n    else\n      ColorSelectLiveOverlay::toggleControls(a1, 0);\n  }\n  v9 = (void *)(v15 - 24);\n  if ( (__int64 *)(v15 - 24) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v12 = (unsigned int *)(v15 - 8);\n      do\n        v13 = __ldaxr(v12);\n      while ( __stlxr(v13 - 1, v12) );\n    }\n    else\n    {\n      v13 = *(_DWORD *)(v15 - 8);\n      *(_DWORD *)(v15 - 8) = v13 - 1;\n    }\n    if ( v13 <= 0 )\n      operator delete(v9);\n  }\n}", "assembly": "; \n; ColorSelectLiveOverlay::updateColorLabel from 0x90b0e8 to 0x90b308 (544 bytes)\n; \n; 3 xrefs:\n; > ColorSelectLiveOverlay::init @ 0x90c058\n; > ColorSelectLiveOverlay::onSelectTab @ 0x90c3b0\n; > <???> @ 0x9e280\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\nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x90b0e8\nMOV             X29, SP                                                ; +0x4, 0x90b0ec\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x8, 0x90b0f0\nADRP            X21, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x90b0f4\nLDRB            W2, [X0,#0x338]                                        ; +0x10, 0x90b0f8\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x14, 0x90b0fc\nMOV             X19, X0                                                ; +0x18, 0x90b100\nLDR             X0, [X0,#0x290]                                        ; +0x1c, 0x90b104\nLDR             X1, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x90b108\nCMP             W2, WZR                                                ; +0x24, 0x90b10c\nSTP             X23, X24, [SP,#0x70+var_40]                            ; +0x28, 0x90b110\nLDR             X20, [X19,#0x298]                                      ; +0x2c, 0x90b114\nLDR             X1, [X1]                                               ; +0x30, 0x90b118\nSTR             X1, [X29,#0x70+var_8]                                  ; +0x34, 0x90b11c\nCSEL            X20, X20, X0, NE                                       ; +0x38, 0x90b120\nCBZ             X20, loc_90B248                                        ; +0x3c, 0x90b124\nLDR             W22, [X20,#0x5C]                                       ; +0x40, 0x90b128\nCMP             W22, WZR                                               ; +0x44, 0x90b12c\nB.LE            loc_90B228                                             ; +0x48, 0x90b130\nADD             X23, X29, #0x70+var_10                                 ; +0x4c, 0x90b134\nADD             X24, X29, #0x70+var_18                                 ; +0x50, 0x90b138\nADRP            X1, #byte_F288A0@PAGE                                  ; +0x54, 0x90b13c\nMOV             X0, X23; int                                           ; +0x58, 0x90b140\nADD             X1, X1, #byte_F288A0@PAGEOFF; char *                   ; +0x5c, 0x90b144\nMOV             X2, X24                                                ; +0x60, 0x90b148\nBL              sub_D153B8                                             ; +0x64, 0x90b14c\nCMP             W22, #0x3E7                                            ; +0x68, 0x90b150\nB.LE            loc_90B200                                             ; +0x6c, 0x90b154\nMOV             W0, W22; this                                          ; +0x70, 0x90b158\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0x74, 0x90b15c\nSTR             X0, [X29,#0x70+var_28]                                 ; +0x78, 0x90b160\nBL              .strlen                                                ; +0x7c, 0x90b164\nLDR             X1, [X29,#0x70+var_28]                                 ; +0x80, 0x90b168\nMOV             X2, X0                                                 ; +0x84, 0x90b16c\nMOV             X0, X23                                                ; +0x88, 0x90b170\nBL              sub_D1798C                                             ; +0x8c, 0x90b174\nLDR             X2, [X19,#0x330]                                       ; +0x90, 0x90b178\nLDR             X1, [X29,#0x70+var_10]                                 ; +0x94, 0x90b17c\nMOV             X0, X2                                                 ; +0x98, 0x90b180\nLDR             X2, [X2]                                               ; +0x9c, 0x90b184\nLDR             X2, [X2,#0x390]                                        ; +0xa0, 0x90b188\nBLR             X2                                                     ; +0xa4, 0x90b18c\nCBZ             X20, loc_90B1C0                                        ; +0xa8, 0x90b190\nCMP             W22, #0x3EC                                            ; +0xac, 0x90b194\nB.LE            loc_90B218                                             ; +0xb0, 0x90b198\nCMP             W22, #0x3F1                                            ; +0xb4, 0x90b19c\nB.EQ            loc_90B218                                             ; +0xb8, 0x90b1a0\nB.LT            loc_90B1B4                                             ; +0xbc, 0x90b1a4\nSUB             W22, W22, #0x3F5                                       ; +0xc0, 0x90b1a8\nCMP             W22, #1                                                ; +0xc4, 0x90b1ac\nB.LS            loc_90B218                                             ; +0xc8, 0x90b1b0\nMOV             X0, X19; this                                          ; +0xcc, 0x90b1b4\nMOV             W1, #0; bool                                           ; +0xd0, 0x90b1b8\nBL              _ZN22ColorSelectLiveOverlay14toggleControlsEb; ColorSelectLiveOverlay::toggleControls(bool) ; +0xd4, 0x90b1bc\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xd8, 0x90b1c0\nLDR             X2, [X29,#0x70+var_10]                                 ; +0xdc, 0x90b1c4\nSUB             X0, X2, #0x18; p                                       ; +0xe0, 0x90b1c8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xe4, 0x90b1cc\nCMP             X0, X1                                                 ; +0xe8, 0x90b1d0\nB.NE            loc_90B258                                             ; +0xec, 0x90b1d4\nLDR             X21, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xf0, 0x90b1d8\nLDR             X1, [X29,#0x70+var_8]                                  ; +0xf4, 0x90b1dc\nLDR             X0, [X21]                                              ; +0xf8, 0x90b1e0\nCMP             X1, X0                                                 ; +0xfc, 0x90b1e4\nB.NE            loc_90B29C                                             ; +0x100, 0x90b1e8\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x104, 0x90b1ec\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x108, 0x90b1f0\nLDP             X23, X24, [SP,#0x70+var_40]                            ; +0x10c, 0x90b1f4\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x110, 0x90b1f8\nRET                                                                    ; +0x114, 0x90b1fc\nADRP            X0, #(aSongidI+8)@PAGE; \"%i\"                           ; +0x118, 0x90b200\nMOV             W1, W22; char *                                        ; +0x11c, 0x90b204\nADD             X0, X0, #(aSongidI+8)@PAGEOFF; this                    ; +0x120, 0x90b208\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x124, 0x90b20c\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x128, 0x90b210\nB               loc_90B160                                             ; +0x12c, 0x90b214\nMOV             X0, X19; this                                          ; +0x130, 0x90b218\nMOV             W1, #1; bool                                           ; +0x134, 0x90b21c\nBL              _ZN22ColorSelectLiveOverlay14toggleControlsEb; ColorSelectLiveOverlay::toggleControls(bool) ; +0x138, 0x90b220\nB               loc_90B1C0                                             ; +0x13c, 0x90b224\nLDR             X2, [X19,#0x330]                                       ; +0x140, 0x90b228\nADRL            X1, (aWarning_0+8); \" \"                                ; +0x144, 0x90b22c\nMOV             X0, X2                                                 ; +0x14c, 0x90b234\nLDR             X2, [X2]                                               ; +0x150, 0x90b238\nLDR             X2, [X2,#0x390]                                        ; +0x154, 0x90b23c\nBLR             X2                                                     ; +0x158, 0x90b240\nB               loc_90B1D8                                             ; +0x15c, 0x90b244\nLDR             X0, [X19,#0x278]                                       ; +0x160, 0x90b248\nCBZ             X0, loc_90B228                                         ; +0x164, 0x90b24c\nLDR             W22, [X0,#0x3F0]                                       ; +0x168, 0x90b250\nB               loc_90B12C                                             ; +0x16c, 0x90b254\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x170, 0x90b258\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x174, 0x90b25c\nCBZ             X1, loc_90B28C                                         ; +0x178, 0x90b260\nSUB             X2, X2, #8                                             ; +0x17c, 0x90b264\nLDAXR           W1, [X2]                                               ; +0x180, 0x90b268\nSUB             W3, W1, #1                                             ; +0x184, 0x90b26c\nSTLXR           W4, W3, [X2]                                           ; +0x188, 0x90b270\nCBNZ            W4, loc_90B268                                         ; +0x18c, 0x90b274\nCMP             W1, WZR                                                ; +0x190, 0x90b278\nB.GT            loc_90B1D8                                             ; +0x194, 0x90b27c\nMOV             X1, X24                                                ; +0x198, 0x90b280\nBL              j__ZdlPv; operator delete(void *)                      ; +0x19c, 0x90b284\nB               loc_90B1D8                                             ; +0x1a0, 0x90b288\nLDUR            W1, [X2,#-8]                                           ; +0x1a4, 0x90b28c\nSUB             W3, W1, #1                                             ; +0x1a8, 0x90b290\nSTUR            W3, [X2,#-8]                                           ; +0x1ac, 0x90b294\nB               loc_90B278                                             ; +0x1b0, 0x90b298\nBL              .__stack_chk_fail                                      ; +0x1b4, 0x90b29c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x1b8, 0x90b2a0\nLDR             X2, [X29,#0x70+var_10]                                 ; +0x1bc, 0x90b2a4\nMOV             X19, X0                                                ; +0x1c0, 0x90b2a8\nSUB             X0, X2, #0x18; p                                       ; +0x1c4, 0x90b2ac\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x1c8, 0x90b2b0\nCMP             X0, X1                                                 ; +0x1cc, 0x90b2b4\nB.NE            loc_90B2C4                                             ; +0x1d0, 0x90b2b8\nMOV             X0, X19                                                ; +0x1d4, 0x90b2bc\nBL              _Unwind_Resume                                         ; +0x1d8, 0x90b2c0\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x1dc, 0x90b2c4\nADD             X3, X0, #0x10                                          ; +0x1e0, 0x90b2c8\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x1e4, 0x90b2cc\nCBZ             X1, loc_90B2F8                                         ; +0x1e8, 0x90b2d0\nLDAXR           W1, [X3]                                               ; +0x1ec, 0x90b2d4\nSUB             W2, W1, #1                                             ; +0x1f0, 0x90b2d8\nSTLXR           W4, W2, [X3]                                           ; +0x1f4, 0x90b2dc\nCBNZ            W4, loc_90B2D4                                         ; +0x1f8, 0x90b2e0\nCMP             W1, WZR                                                ; +0x1fc, 0x90b2e4\nB.GT            loc_90B2BC                                             ; +0x200, 0x90b2e8\nMOV             X1, X24                                                ; +0x204, 0x90b2ec\nBL              j__ZdlPv; operator delete(void *)                      ; +0x208, 0x90b2f0\nB               loc_90B2BC                                             ; +0x20c, 0x90b2f4\nLDUR            W1, [X2,#-8]                                           ; +0x210, 0x90b2f8\nSUB             W3, W1, #1                                             ; +0x214, 0x90b2fc\nSTUR            W3, [X2,#-8]                                           ; +0x218, 0x90b300\nB               loc_90B2E4                                             ; +0x21c, 0x90b304", "xrefs": ["ColorSelectLiveOverlay::init @ 0x90c058", "ColorSelectLiveOverlay::onSelectTab @ 0x90c3b0", "<???> @ 0x9e280"], "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"}