{"type": "func", "start": 6298060, "end": 6298324, "name": "ColorSelectLiveOverlay::updateColorLabel", "pseudocode": "// \n// ColorSelectLiveOverlay::updateColorLabel from 0x6019cc to 0x601ad4 (264 bytes)\n// \n// 2 xrefs:\n// > sub_601AE0 @ 0x6024e0\n// > ColorSelectLiveOverlay::onSelectTab @ 0x6027b2\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:54:41 +0000\n// \n\nvoid __fastcall ColorSelectLiveOverlay::updateColorLabel(ColorSelectLiveOverlay *this)\n{\n  int v1; // r6\n  int v3; // r1\n  GJSpecialColorSelect *v4; // r4\n  int v5; // r3\n  cocos2d::CCString *v6; // r0\n  const char *CString; // r0\n  const char *v8; // r9\n  size_t v9; // r0\n  char *v10; // r1\n  unsigned int v11; // r4\n  cocos2d::CCArray **v12; // r0\n  int v13; // r1\n  _DWORD v14[2]; // [sp+0h] [bp-14h] BYREF\n  void *v15; // [sp+8h] [bp-Ch]\n\n  v1 = *((_DWORD *)this + 134);\n  v3 = *((unsigned __int8 *)this + 644);\n  if ( !*((_BYTE *)this + 644) )\n    v1 = *((_DWORD *)this + 133);\n  if ( v1 )\n  {\n    v4 = *(GJSpecialColorSelect **)(v1 + 88);\n  }\n  else\n  {\n    v5 = *((_DWORD *)this + 130);\n    if ( !v5 )\n    {\nLABEL_22:\n      (*(void (__fastcall **)(_DWORD, const char *))(**((_DWORD **)this + 160) + 464))(*((_DWORD *)this + 160), \" \");\n      return;\n    }\n    v4 = *(GJSpecialColorSelect **)(v5 + 888);\n  }\n  if ( (int)v4 <= 0 )\n    goto LABEL_22;\n  v14[1] = 0;\n  v15 = nullptr;\n  v14[0] = 0;\n  if ( (int)v4 >= 1000 )\n  {\n    CString = GJSpecialColorSelect::textForColorIdx(v4, v3);\n  }\n  else\n  {\n    v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", (const char *)v4);\n    CString = (const char *)cocos2d::CCString::getCString(v6);\n  }\n  v8 = CString;\n  v9 = strlen(CString);\n  std::string::assign(v14, v8, v9);\n  if ( (v14[0] & 1) != 0 )\n    v10 = (char *)v15;\n  else\n    v10 = (char *)v14 + 1;\n  (*(void (__fastcall **)(_DWORD, char *, int))(**((_DWORD **)this + 160) + 464))(\n    *((_DWORD *)this + 160),\n    v10,\n    LOBYTE(v14[0]) << 31);\n  if ( v1 )\n  {\n    if ( (int)v4 <= 1004 || (v11 = (unsigned int)v4 - 1009, v11 <= 5) && ((1 << v11) & 0x31) != 0 )\n    {\n      v12 = (cocos2d::CCArray **)this;\n      v13 = 1;\n    }\n    else\n    {\n      v12 = (cocos2d::CCArray **)this;\n      v13 = 0;\n    }\n    ColorSelectLiveOverlay::toggleControls(v12, v13);\n  }\n  if ( (v14[0] & 1) != 0 )\n    operator delete(v15);\n}", "assembly": "; \n; ColorSelectLiveOverlay::updateColorLabel from 0x6019cc to 0x601ad4 (264 bytes)\n; \n; 2 xrefs:\n; > sub_601AE0 @ 0x6024e0\n; > ColorSelectLiveOverlay::onSelectTab @ 0x6027b2\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:54:41 +0000\n; \nLDR             R2, =(__stack_chk_guard_ptr - 0x6019D6)                ; +0x0, 0x6019cc\nPUSH.W          {R4-R9,LR}                                             ; +0x2, 0x6019ce\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0x6, 0x6019d2\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x8, 0x6019d4\nSUB             SP, SP, #0x14                                          ; +0xa, 0x6019d6\nLDR.W           R6, [R0,#0x218]                                        ; +0xc, 0x6019d8\nLDR             R3, [R2]                                               ; +0x10, 0x6019dc\nMOV             R5, R0                                                 ; +0x12, 0x6019de\nLDRB.W          R1, [R0,#0x284]; int                                   ; +0x14, 0x6019e0\nMOV             R7, R2                                                 ; +0x18, 0x6019e4\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x1a, 0x6019e6\nLDR.W           R3, [R0,#0x214]                                        ; +0x1c, 0x6019e8\nCMP             R1, #0                                                 ; +0x20, 0x6019ec\nIT EQ                                                                  ; +0x22, 0x6019ee\nMOVEQ           R6, R3                                                 ; +0x24, 0x6019f0\nCBZ             R6, loc_6019F8                                         ; +0x26, 0x6019f2\nLDR             R4, [R6,#0x58]                                         ; +0x28, 0x6019f4\nB               loc_601A04                                             ; +0x2a, 0x6019f6\nLDR.W           R3, [R0,#0x208]                                        ; +0x2c, 0x6019f8\nCMP             R3, #0                                                 ; +0x30, 0x6019fc\nBEQ             loc_601A98                                             ; +0x32, 0x6019fe\nLDR.W           R4, [R3,#0x378]                                        ; +0x34, 0x601a00\nCMP             R4, #0                                                 ; +0x38, 0x601a04\nBLE             loc_601A98                                             ; +0x3a, 0x601a06\nCMP.W           R4, #0x3E8                                             ; +0x3c, 0x601a08\nMOV.W           R3, #0                                                 ; +0x40, 0x601a0c\nMOV             R8, SP                                                 ; +0x44, 0x601a10\nSTR             R3, [SP,#0x14+var_14]                                  ; +0x46, 0x601a12\nSTR             R3, [SP,#0x14+var_10]                                  ; +0x48, 0x601a14\nSTR             R3, [SP,#0x14+var_C]                                   ; +0x4a, 0x601a16\nSTRB.W          R3, [SP,#0x14+var_14]                                  ; +0x4c, 0x601a18\nSTRB.W          R3, [SP,#0x14+var_14+1]                                ; +0x50, 0x601a1c\nBGE             loc_601A58                                             ; +0x54, 0x601a20\nLDR             R0, =(aI - 0x601A2A); \"%i\"                             ; +0x56, 0x601a22\nMOV             R1, R4; char *                                         ; +0x58, 0x601a24\nADD             R0, PC; \"%i\"                                           ; +0x5a, 0x601a26\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x5c, 0x601a28\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x60, 0x601a2c\nMOV             R9, R0                                                 ; +0x64, 0x601a30\nBLX             strlen                                                 ; +0x66, 0x601a32\nMOV             R1, R9; int                                            ; +0x6a, 0x601a36\nMOV             R2, R0; size_t                                         ; +0x6c, 0x601a38\nMOV             R0, R8; int                                            ; +0x6e, 0x601a3a\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcj; std::string::assign(char const*,uint) ; +0x70, 0x601a3c\nLDR.W           R0, [R5,#0x280]                                        ; +0x74, 0x601a40\nLDRB.W          R2, [SP,#0x14+var_14]                                  ; +0x78, 0x601a44\nLDR             R3, [R0]                                               ; +0x7c, 0x601a48\nLSLS            R2, R2, #0x1F                                          ; +0x7e, 0x601a4a\nLDR.W           R3, [R3,#0x1D0]                                        ; +0x80, 0x601a4c\nBMI             loc_601A60                                             ; +0x84, 0x601a50\nADD.W           R1, SP, #0x14+var_14+1                                 ; +0x86, 0x601a52\nB               loc_601A62                                             ; +0x8a, 0x601a56\nMOV             R0, R4; this                                           ; +0x8c, 0x601a58\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0x8e, 0x601a5a\nB               loc_601A30                                             ; +0x92, 0x601a5e\nLDR             R1, [SP,#0x14+var_C]                                   ; +0x94, 0x601a60\nBLX             R3                                                     ; +0x96, 0x601a62\nCBZ             R6, loc_601A88                                         ; +0x98, 0x601a64\nCMP.W           R4, #0x3EC                                             ; +0x9a, 0x601a66\nBLE             loc_601ABC                                             ; +0x9e, 0x601a6a\nMOV             R1, #0xFFFFFC0F                                        ; +0xa0, 0x601a6c\nADD             R4, R1                                                 ; +0xa4, 0x601a70\nCMP             R4, #5                                                 ; +0xa6, 0x601a72\nBHI             loc_601A80                                             ; +0xa8, 0x601a74\nMOVS            R3, #1                                                 ; +0xaa, 0x601a76\nLSLS            R3, R4                                                 ; +0xac, 0x601a78\nTST.W           R3, #0x31                                              ; +0xae, 0x601a7a\nBNE             loc_601ABC                                             ; +0xb2, 0x601a7e\nMOV             R0, R5; this                                           ; +0xb4, 0x601a80\nMOVS            R1, #0; bool                                           ; +0xb6, 0x601a82\nBL              _ZN22ColorSelectLiveOverlay14toggleControlsEb; ColorSelectLiveOverlay::toggleControls(bool) ; +0xb8, 0x601a84\nLDRB.W          R3, [SP,#0x14+var_14]                                  ; +0xbc, 0x601a88\nLSLS            R2, R3, #0x1F                                          ; +0xc0, 0x601a8c\nBPL             loc_601AC2                                             ; +0xc2, 0x601a8e\nLDR             R0, [SP,#0x14+var_C]; void *                           ; +0xc4, 0x601a90\nBL              _ZdlPv; operator delete(void *)                        ; +0xc6, 0x601a92\nB               loc_601AC2                                             ; +0xca, 0x601a96\nLDR.W           R0, [R5,#0x280]                                        ; +0xcc, 0x601a98\nLDR             R1, =(asc_B7533B - 0x601AA4); \" \"                      ; +0xd0, 0x601a9c\nLDR             R3, [R0]                                               ; +0xd2, 0x601a9e\nADD             R1, PC; \" \"                                            ; +0xd4, 0x601aa0\nLDR.W           R3, [R3,#0x1D0]                                        ; +0xd6, 0x601aa2\nBLX             R3                                                     ; +0xda, 0x601aa6\nB               loc_601AC2                                             ; +0xdc, 0x601aa8\nLDRB.W          R3, [SP,#0x14+var_14]                                  ; +0xde, 0x601aaa\nLSLS            R3, R3, #0x1F                                          ; +0xe2, 0x601aae\nBPL             loc_601AB8                                             ; +0xe4, 0x601ab0\nLDR             R0, [SP,#0x14+var_C]; void *                           ; +0xe6, 0x601ab2\nBL              _ZdlPv; operator delete(void *)                        ; +0xe8, 0x601ab4\nBL              __cxa_end_cleanup                                      ; +0xec, 0x601ab8\nMOV             R0, R5                                                 ; +0xf0, 0x601abc\nMOVS            R1, #1                                                 ; +0xf2, 0x601abe\nB               loc_601A84                                             ; +0xf4, 0x601ac0\nLDR             R2, [SP,#0x14+var_8]                                   ; +0xf6, 0x601ac2\nLDR             R3, [R7]                                               ; +0xf8, 0x601ac4\nCMP             R2, R3                                                 ; +0xfa, 0x601ac6\nBEQ             loc_601ACE                                             ; +0xfc, 0x601ac8\nBLX             __stack_chk_fail                                       ; +0xfe, 0x601aca\nADD             SP, SP, #0x14                                          ; +0x102, 0x601ace\nPOP.W           {R4-R9,PC}                                             ; +0x104, 0x601ad0", "xrefs": ["sub_601AE0 @ 0x6024e0", "ColorSelectLiveOverlay::onSelectTab @ 0x6027b2"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}