{"type": "func", "start": 5369288000, "end": 5369288434, "name": "ColorSelectLiveOverlay::updateColorLabel", "pseudocode": "// \n// ColorSelectLiveOverlay::updateColorLabel from 0x14008d540 to 0x14008d6f2 (434 bytes)\n// \n// 3 xrefs:\n// > ColorSelectLiveOverlay::init @ 0x14008cda0\n// > ColorSelectLiveOverlay::onSelectTab @ 0x14008d25c\n// > <???> @ 0x1406c6e88\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\n// Hidden C++ exception states: #wind=1\nvoid ColorSelectLiveOverlay::updateColorLabel(ColorSelectLiveOverlay *a1)\n{\n  ColorAction *m_detailColorAction; // rsi\n  int m_colorID; // ebx\n  EffectGameObject *m_effectGameObject; // rbx\n  cocos2d::CCString *v5; // rax\n  char *CString; // rax\n  size_t v7; // r8\n  void **v8; // rdx\n  int v9; // ebx\n  bool v10; // dl\n  void *v11; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int64 v13; // [rsp+30h] [rbp-28h]\n  unsigned __int64 v14; // [rsp+38h] [rbp-20h]\n\n  if ( a1->m_detailColorSelected )\n    m_detailColorAction = a1->m_detailColorAction;\n  else\n    m_detailColorAction = a1->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    {\nLABEL_29:\n      a1->m_colorLabel->setString(&a1->m_colorLabel->cocos2d::CCLabelProtocol, \" \");\n      return;\n    }\n    m_colorID = m_effectGameObject->m_targetColor;\n  }\n  if ( m_colorID <= 0 )\n    goto LABEL_29;\n  *(_OWORD *)Block = 0;\n  v13 = 0;\n  v14 = 15;\n  LOBYTE(Block[0]) = 0;\n  if ( m_colorID >= 1000 )\n  {\n    CString = (char *)GJSpecialColorSelect::textForColorIdx(m_colorID);\n    v7 = -1;\n    do\n      ++v7;\n    while ( CString[v7] );\n  }\n  else\n  {\n    v5 = cocos2d::CCString::createWithFormat(\"%i\", m_colorID);\n    CString = (char *)cocos2d::CCString::getCString(v5);\n    v7 = -1;\n    do\n      ++v7;\n    while ( CString[v7] );\n  }\n  sub_14003CCE0(Block, CString, v7);\n  v8 = Block;\n  if ( v14 > 0xF )\n    v8 = (void **)Block[0];\n  a1->m_colorLabel->setString(&a1->m_colorLabel->cocos2d::CCLabelProtocol, (const char *)v8);\n  if ( m_detailColorAction )\n  {\n    v10 = true;\n    if ( m_colorID >= 1005 )\n    {\n      v9 = m_colorID - 1009;\n      if ( v9 )\n      {\n        if ( (unsigned int)(v9 - 4) >= 2 )\n          v10 = false;\n      }\n    }\n    ColorSelectLiveOverlay::toggleControls(a1, v10);\n  }\n  if ( v14 > 0xF )\n  {\n    v11 = Block[0];\n    if ( v14 + 1 >= 0x1000 )\n    {\n      v11 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v11);\n  }\n}", "assembly": "; \n; ColorSelectLiveOverlay::updateColorLabel from 0x14008d540 to 0x14008d6f2 (434 bytes)\n; \n; 3 xrefs:\n; > ColorSelectLiveOverlay::init @ 0x14008cda0\n; > ColorSelectLiveOverlay::onSelectTab @ 0x14008d25c\n; > <???> @ 0x1406c6e88\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14008d540\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x14008d545\npush    rdi                                                            ; +0xa, 0x14008d54a\nsub     rsp, 50h                                                       ; +0xb, 0x14008d54b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x14008d54f\nxor     rax, rsp                                                       ; +0x16, 0x14008d556\nmov     [rsp+58h+var_18], rax                                          ; +0x19, 0x14008d559\nmov     rdi, rcx                                                       ; +0x1e, 0x14008d55e\ncmp     byte ptr [rcx+338h], 0                                         ; +0x21, 0x14008d561\njz      short loc_14008D573                                            ; +0x28, 0x14008d568\nmov     rsi, [rcx+298h]                                                ; +0x2a, 0x14008d56a\njmp     short loc_14008D57A                                            ; +0x31, 0x14008d571\nmov     rsi, [rcx+290h]                                                ; +0x33, 0x14008d573\ntest    rsi, rsi                                                       ; +0x3a, 0x14008d57a\njz      short loc_14008D584                                            ; +0x3d, 0x14008d57d\nmov     ebx, [rsi+5Ch]                                                 ; +0x3f, 0x14008d57f\njmp     short loc_14008D59A                                            ; +0x42, 0x14008d582\nmov     rbx, [rcx+278h]                                                ; +0x44, 0x14008d584\ntest    rbx, rbx                                                       ; +0x4b, 0x14008d58b\njz      loc_14008D6BB                                                  ; +0x4e, 0x14008d58e\nmov     ebx, [rbx+408h]                                                ; +0x54, 0x14008d594\ntest    ebx, ebx                                                       ; +0x5a, 0x14008d59a\njle     loc_14008D6BB                                                  ; +0x5c, 0x14008d59c\nxorps   xmm0, xmm0                                                     ; +0x62, 0x14008d5a2\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x65, 0x14008d5a5\nmov     [rsp+58h+var_28], 0                                            ; +0x6a, 0x14008d5aa\nmov     [rsp+58h+var_20], 0Fh                                          ; +0x73, 0x14008d5b3\nmov     byte ptr [rsp+58h+Block], 0                                    ; +0x7c, 0x14008d5bc\ncmp     ebx, 3E8h                                                      ; +0x81, 0x14008d5c1\njge     short loc_14008D5FC                                            ; +0x87, 0x14008d5c7\nmov     edx, ebx                                                       ; +0x89, 0x14008d5c9\nlea     rcx, aI_11; \"%i\"                                               ; +0x8b, 0x14008d5cb\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x92, 0x14008d5d2\nmov     rcx, rax                                                       ; +0x98, 0x14008d5d8\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x9b, 0x14008d5db\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xa1, 0x14008d5e1\nnop     dword ptr [rax+rax+00000000h]                                  ; +0xa8, 0x14008d5e8\ninc     r8                                                             ; +0xb0, 0x14008d5f0\ncmp     byte ptr [rax+r8], 0                                           ; +0xb3, 0x14008d5f3\njnz     short loc_14008D5F0                                            ; +0xb8, 0x14008d5f8\njmp     short loc_14008D61A                                            ; +0xba, 0x14008d5fa\nmov     ecx, ebx                                                       ; +0xbc, 0x14008d5fc\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0xbe, 0x14008d5fe\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xc3, 0x14008d603\nnop     word ptr [rax+rax+00h]                                         ; +0xca, 0x14008d60a\ninc     r8; Size                                                       ; +0xd0, 0x14008d610\ncmp     byte ptr [rax+r8], 0                                           ; +0xd3, 0x14008d613\njnz     short loc_14008D610                                            ; +0xd8, 0x14008d618\nmov     rdx, rax; Src                                                  ; +0xda, 0x14008d61a\nlea     rcx, [rsp+58h+Block]; void *                                   ; +0xdd, 0x14008d61d\ncall    sub_14003CCE0                                                  ; +0xe2, 0x14008d622\nlea     rdx, [rsp+58h+Block]                                           ; +0xe7, 0x14008d627\ncmp     [rsp+58h+var_20], 0Fh                                          ; +0xec, 0x14008d62c\ncmova   rdx, [rsp+58h+Block]                                           ; +0xf2, 0x14008d632\nmov     rcx, [rdi+330h]                                                ; +0xf8, 0x14008d638\nadd     rcx, 168h                                                      ; +0xff, 0x14008d63f\nmov     rax, [rcx]                                                     ; +0x106, 0x14008d646\ncall    qword ptr [rax]                                                ; +0x109, 0x14008d649\ntest    rsi, rsi                                                       ; +0x10b, 0x14008d64b\njz      short loc_14008D679                                            ; +0x10e, 0x14008d64e\ncmp     ebx, 3EDh                                                      ; +0x110, 0x14008d650\njl      short loc_14008D66E                                            ; +0x116, 0x14008d656\nsub     ebx, 3F1h                                                      ; +0x118, 0x14008d658\njz      short loc_14008D66E                                            ; +0x11e, 0x14008d65e\nsub     ebx, 4                                                         ; +0x120, 0x14008d660\njz      short loc_14008D66E                                            ; +0x123, 0x14008d663\ncmp     ebx, 1                                                         ; +0x125, 0x14008d665\njz      short loc_14008D66E                                            ; +0x128, 0x14008d668\nxor     edx, edx                                                       ; +0x12a, 0x14008d66a\njmp     short loc_14008D670                                            ; +0x12c, 0x14008d66c\nmov     dl, 1                                                          ; +0x12e, 0x14008d66e\nmov     rcx, rdi                                                       ; +0x130, 0x14008d670\ncall    ColorSelectLiveOverlay__toggleControls                         ; +0x133, 0x14008d673\nnop                                                                    ; +0x138, 0x14008d678\nmov     rdx, [rsp+58h+var_20]                                          ; +0x139, 0x14008d679\ncmp     rdx, 0Fh                                                       ; +0x13e, 0x14008d67e\njbe     short loc_14008D6D5                                            ; +0x142, 0x14008d682\ninc     rdx                                                            ; +0x144, 0x14008d684\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x147, 0x14008d687\nmov     rax, rcx                                                       ; +0x14c, 0x14008d68c\ncmp     rdx, 1000h                                                     ; +0x14f, 0x14008d68f\njb      short loc_14008D6B4                                            ; +0x156, 0x14008d696\nadd     rdx, 27h ; '''                                                 ; +0x158, 0x14008d698\nmov     rcx, [rcx-8]                                                   ; +0x15c, 0x14008d69c\nsub     rax, rcx                                                       ; +0x160, 0x14008d6a0\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x163, 0x14008d6a3\ncmp     rax, 1Fh                                                       ; +0x167, 0x14008d6a7\njbe     short loc_14008D6B4                                            ; +0x16b, 0x14008d6ab\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x16d, 0x14008d6ad\nalign 4                                                                ; +0x173, 0x14008d6b3\ncall    j_j_free                                                       ; +0x174, 0x14008d6b4\njmp     short loc_14008D6D5                                            ; +0x179, 0x14008d6b9\nmov     rcx, [rcx+330h]                                                ; +0x17b, 0x14008d6bb\nadd     rcx, 168h                                                      ; +0x182, 0x14008d6c2\nmov     rax, [rcx]                                                     ; +0x189, 0x14008d6c9\nlea     rdx, asc_140518984; \" \"                                        ; +0x18c, 0x14008d6cc\ncall    qword ptr [rax]                                                ; +0x193, 0x14008d6d3\nmov     rcx, [rsp+58h+var_18]                                          ; +0x195, 0x14008d6d5\nxor     rcx, rsp; StackCookie                                          ; +0x19a, 0x14008d6da\ncall    __security_check_cookie                                        ; +0x19d, 0x14008d6dd\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x1a2, 0x14008d6e2\nmov     rsi, [rsp+58h+arg_10]                                          ; +0x1a7, 0x14008d6e7\nadd     rsp, 50h                                                       ; +0x1ac, 0x14008d6ec\npop     rdi                                                            ; +0x1b0, 0x14008d6f0\nretn                                                                   ; +0x1b1, 0x14008d6f1", "xrefs": ["ColorSelectLiveOverlay::init @ 0x14008cda0", "ColorSelectLiveOverlay::onSelectTab @ 0x14008d25c", "<???> @ 0x1406c6e88"], "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"}