{"type": "func", "start": 5040336, "end": 5040558, "name": "ColorSelectLiveOverlay::updateColorLabel", "pseudocode": "// \n// ColorSelectLiveOverlay::updateColorLabel from 0x4ce8d0 to 0x4ce9ae (222 bytes)\n// \n// 2 xrefs:\n// > sub_4CE9C0 @ 0x4cf3c0\n// > ColorSelectLiveOverlay::onSelectTab @ 0x4cf60e\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  ColorAction *m_detailColorAction; // r7\n  const char *m_colorID; // r4\n  EffectGameObject *m_effectGameObject; // r3\n  cocos2d::CCString *v5; // r0\n  char *CString; // r0\n  unsigned int v7; // r4\n  ColorSelectLiveOverlay *v8; // r0\n  bool v9; // r1\n  const unsigned __int8 *v10; // [sp+8h] [bp-8h] BYREF\n\n  m_detailColorAction = a1->m_detailColorAction;\n  if ( !a1->m_detailColorSelected )\n    m_detailColorAction = a1->m_baseColorAction;\n  if ( m_detailColorAction )\n  {\n    m_colorID = (const char *)m_detailColorAction->m_colorID;\n  }\n  else\n  {\n    m_effectGameObject = a1->m_effectGameObject;\n    if ( !m_effectGameObject )\n    {\nLABEL_19:\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *, ColorAction *, void (__fastcall *)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *), ColorSelectLiveOverlay *))a1->m_colorLabel->setString)(\n        a1->m_colorLabel,\n        \" \",\n        a1->m_baseColorAction,\n        a1->m_colorLabel->setString,\n        a1);\n      return;\n    }\n    m_colorID = (const char *)m_effectGameObject->m_targetColor;\n  }\n  if ( (int)m_colorID <= 0 )\n    goto LABEL_19;\n  sub_776584((int)&v10, (char *)&unk_939830);\n  if ( (int)m_colorID >= 1000 )\n  {\n    CString = (char *)GJSpecialColorSelect::textForColorIdx((int)m_colorID);\n  }\n  else\n  {\n    v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", m_colorID);\n    CString = (char *)cocos2d::CCString::getCString(v5);\n  }\n  sub_7753D4((int)&v10, CString);\n  a1->m_colorLabel->setString(a1->m_colorLabel, v10);\n  if ( m_detailColorAction )\n  {\n    if ( (int)m_colorID <= 1004 || (v7 = (unsigned int)(m_colorID - 1009), v7 <= 5) && ((1 << v7) & 0x31) != 0 )\n    {\n      v8 = a1;\n      v9 = 1;\n    }\n    else\n    {\n      v8 = a1;\n      v9 = 0;\n    }\n    ColorSelectLiveOverlay::toggleControls(v8, v9);\n  }\n  sub_774008(&v10);\n}", "assembly": "; \n; ColorSelectLiveOverlay::updateColorLabel from 0x4ce8d0 to 0x4ce9ae (222 bytes)\n; \n; 2 xrefs:\n; > sub_4CE9C0 @ 0x4cf3c0\n; > ColorSelectLiveOverlay::onSelectTab @ 0x4cf60e\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.W          {R0-R8,LR}                                             ; +0x0, 0x4ce8d0\nMOV             R5, R0                                                 ; +0x4, 0x4ce8d4\nLDR             R3, =(__stack_chk_guard_ptr - 0x4CE8E0)                ; +0x6, 0x4ce8d6\nLDR.W           R7, [R0,#0x200]                                        ; +0x8, 0x4ce8d8\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0xc, 0x4ce8dc\nLDR             R3, [R3]; __stack_chk_guard                            ; +0xe, 0x4ce8de\nLDRB.W          R1, [R0,#0x26C]                                        ; +0x10, 0x4ce8e0\nLDR             R2, [R3]                                               ; +0x14, 0x4ce8e4\nMOV             R8, R3                                                 ; +0x16, 0x4ce8e6\nSTR             R2, [SP,#0x10+var_4]                                   ; +0x18, 0x4ce8e8\nLDR.W           R2, [R0,#0x1FC]                                        ; +0x1a, 0x4ce8ea\nCMP             R1, #0                                                 ; +0x1e, 0x4ce8ee\nIT EQ                                                                  ; +0x20, 0x4ce8f0\nMOVEQ           R7, R2                                                 ; +0x22, 0x4ce8f2\nCBZ             R7, loc_4CE8FA                                         ; +0x24, 0x4ce8f4\nLDR             R4, [R7,#0x58]                                         ; +0x26, 0x4ce8f6\nB               loc_4CE906                                             ; +0x28, 0x4ce8f8\nLDR.W           R3, [R0,#0x1F0]                                        ; +0x2a, 0x4ce8fa\nCMP             R3, #0                                                 ; +0x2e, 0x4ce8fe\nBEQ             loc_4CE978                                             ; +0x30, 0x4ce900\nLDR.W           R4, [R3,#0x370]                                        ; +0x32, 0x4ce902\nCMP             R4, #0                                                 ; +0x36, 0x4ce906\nBLE             loc_4CE978                                             ; +0x38, 0x4ce908\nADD             R6, SP, #0x10+var_8                                    ; +0x3a, 0x4ce90a\nLDR             R1, =(unk_939830 - 0x4CE916)                           ; +0x3c, 0x4ce90c\nADD             R2, SP, #0x10+var_C                                    ; +0x3e, 0x4ce90e\nMOV             R0, R6; int                                            ; +0x40, 0x4ce910\nADD             R1, PC; unk_939830 ; char *                            ; +0x42, 0x4ce912\nBL              sub_776584                                             ; +0x44, 0x4ce914\nCMP.W           R4, #0x3E8                                             ; +0x48, 0x4ce918\nBGE             loc_4CE944                                             ; +0x4c, 0x4ce91c\nLDR             R0, =(aI - 0x4CE926); \"%i\"                             ; +0x4e, 0x4ce91e\nMOV             R1, R4; char *                                         ; +0x50, 0x4ce920\nADD             R0, PC; \"%i\"                                           ; +0x52, 0x4ce922\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x54, 0x4ce924\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x58, 0x4ce928\nMOV             R1, R0; char *                                         ; +0x5c, 0x4ce92c\nMOV             R0, R6; int                                            ; +0x5e, 0x4ce92e\nBL              sub_7753D4                                             ; +0x60, 0x4ce930\nLDR.W           R0, [R5,#0x268]                                        ; +0x64, 0x4ce934\nLDR             R1, [SP,#0x10+var_8]                                   ; +0x68, 0x4ce938\nLDR             R3, [R0]                                               ; +0x6a, 0x4ce93a\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x6c, 0x4ce93c\nBLX             R3                                                     ; +0x70, 0x4ce940\nB               loc_4CE94C                                             ; +0x72, 0x4ce942\nMOV             R0, R4; this                                           ; +0x74, 0x4ce944\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0x76, 0x4ce946\nB               loc_4CE92C                                             ; +0x7a, 0x4ce94a\nCBZ             R7, loc_4CE970                                         ; +0x7c, 0x4ce94c\nCMP.W           R4, #0x3EC                                             ; +0x7e, 0x4ce94e\nBLE             loc_4CE994                                             ; +0x82, 0x4ce952\nMOV             R3, #0xFFFFFC0F                                        ; +0x84, 0x4ce954\nADD             R4, R3                                                 ; +0x88, 0x4ce958\nCMP             R4, #5                                                 ; +0x8a, 0x4ce95a\nBHI             loc_4CE968                                             ; +0x8c, 0x4ce95c\nMOVS            R3, #1                                                 ; +0x8e, 0x4ce95e\nLSLS            R3, R4                                                 ; +0x90, 0x4ce960\nTST.W           R3, #0x31                                              ; +0x92, 0x4ce962\nBNE             loc_4CE994                                             ; +0x96, 0x4ce966\nMOV             R0, R5; this                                           ; +0x98, 0x4ce968\nMOVS            R1, #0; bool                                           ; +0x9a, 0x4ce96a\nBL              _ZN22ColorSelectLiveOverlay14toggleControlsEb; ColorSelectLiveOverlay::toggleControls(bool) ; +0x9c, 0x4ce96c\nMOV             R0, R6                                                 ; +0xa0, 0x4ce970\nBL              sub_774008                                             ; +0xa2, 0x4ce972\nB               loc_4CE99A                                             ; +0xa6, 0x4ce976\nLDR.W           R0, [R5,#0x268]                                        ; +0xa8, 0x4ce978\nLDR             R1, =(asc_943A02 - 0x4CE984); \" \"                      ; +0xac, 0x4ce97c\nLDR             R3, [R0]                                               ; +0xae, 0x4ce97e\nADD             R1, PC; \" \"                                            ; +0xb0, 0x4ce980\nLDR.W           R3, [R3,#0x1C8]                                        ; +0xb2, 0x4ce982\nBLX             R3                                                     ; +0xb6, 0x4ce986\nB               loc_4CE99A                                             ; +0xb8, 0x4ce988\nMOV             R0, R6                                                 ; +0xba, 0x4ce98a\nBL              sub_774008                                             ; +0xbc, 0x4ce98c\nBL              __cxa_end_cleanup                                      ; +0xc0, 0x4ce990\nMOV             R0, R5                                                 ; +0xc4, 0x4ce994\nMOVS            R1, #1                                                 ; +0xc6, 0x4ce996\nB               loc_4CE96C                                             ; +0xc8, 0x4ce998\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xca, 0x4ce99a\nLDR.W           R3, [R8]                                               ; +0xcc, 0x4ce99c\nCMP             R2, R3                                                 ; +0xd0, 0x4ce9a0\nBEQ             loc_4CE9A8                                             ; +0xd2, 0x4ce9a2\nBLX             __stack_chk_fail                                       ; +0xd4, 0x4ce9a4\nADD             SP, SP, #0x10                                          ; +0xd8, 0x4ce9a8\nPOP.W           {R4-R8,PC}                                             ; +0xda, 0x4ce9aa", "xrefs": ["sub_4CE9C0 @ 0x4cf3c0", "ColorSelectLiveOverlay::onSelectTab @ 0x4cf60e"], "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"}