{"type": "func", "start": 5372259936, "end": 5372260378, "name": "ColorChannelSprite::updateCopyLabel", "pseudocode": "// \n// ColorChannelSprite::updateCopyLabel from 0x140362e60 to 0x14036301a (442 bytes)\n// \n// 6 xrefs:\n// > CustomizeObjectLayer::updateColorSprite @ 0x1401426ac\n// > GJColorSetupLayer::updateSpriteColor @ 0x14035f59c\n// > LevelSettingsLayer::updateColorSprite @ 0x14045ad57\n// > <???> @ 0x1408ba7a0\n// > <???> @ 0x1408ba7dc\n// > <???> @ 0x1409214c4\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:30:53 +0000\n// \n\nvoid __fastcall ColorChannelSprite::updateCopyLabel(cocos2d::CCLabelBMFont **a1, int a2, char a3)\n{\n  struct cocos2d::CCLabelBMFont *v6; // rax\n  cocos2d::CCLabelBMFont *v7; // rcx\n  float *v8; // rbx\n  cocos2d::CCLabelBMFont *v9; // rsi\n  __int64 v10; // rdi\n  __int64 v11; // rax\n  __int64 v12; // rax\n  cocos2d::CCString *v13; // rax\n  const char *CString; // rax\n  __int64 v15; // rdx\n  __int16 *v16; // rdx\n  char v17; // [rsp+68h] [rbp+20h] BYREF\n\n  if ( a2 )\n  {\n    if ( !a1[75] )\n    {\n      v6 = cocos2d::CCLabelBMFont::create(\" \", (const char *)&qword_140704F78);\n      v7 = *a1;\n      a1[75] = v6;\n      (*((void (__fastcall **)(cocos2d::CCLabelBMFont **, struct cocos2d::CCLabelBMFont *, __int64))v7 + 57))(a1, v6, 1);\n      v8 = (float *)(*((__int64 (__fastcall **)(cocos2d::CCLabelBMFont **))*a1 + 40))(a1);\n      v9 = a1[75];\n      v10 = *(_QWORD *)v9;\n      v11 = (*((__int64 (__fastcall **)(cocos2d::CCLabelBMFont **))*a1 + 40))(a1);\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, *v8 * 0.5, (float)(*(float *)(v11 + 4) * 0.5) + 3.0);\n      (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(v10 + 184))(v9, v12);\n      (*(void (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_QWORD *)a1[75] + 160LL))(a1[75]);\n    }\n    if ( a2 >= 1000 )\n    {\n      CString = (const char *)GJSpecialColorSelect::textForColorIdx((unsigned int)a2);\n    }\n    else\n    {\n      v13 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)a2);\n      CString = cocos2d::CCString::getCString(v13);\n    }\n    (**((void (__fastcall ***)(__int64, const char *))a1[75] + 45))((__int64)a1[75] + 360, CString);\n    cocos2d::CCLabelBMFont::limitLabelWidth(a1[75], 28.0, 0.5, 0.0);\n    LOBYTE(v15) = 1;\n    (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)a1[75] + 336LL))(a1[75], v15);\n    v16 = &word_140703460;\n    if ( a3 )\n      v16 = (__int16 *)&unk_140703458;\n    (**((void (__fastcall ***)(__int64, __int16 *))a1[75] + 46))((__int64)a1[75] + 368, v16);\n  }\n  else if ( a1[75] )\n  {\n    (*(void (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_QWORD *)a1[75] + 336LL))(a1[75]);\n  }\n}", "assembly": "; \n; ColorChannelSprite::updateCopyLabel from 0x140362e60 to 0x14036301a (442 bytes)\n; \n; 6 xrefs:\n; > CustomizeObjectLayer::updateColorSprite @ 0x1401426ac\n; > GJColorSetupLayer::updateSpriteColor @ 0x14035f59c\n; > LevelSettingsLayer::updateColorSprite @ 0x14045ad57\n; > <???> @ 0x1408ba7a0\n; > <???> @ 0x1408ba7dc\n; > <???> @ 0x1409214c4\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:30:53 +0000\n; \npush    rbp                                                            ; +0x0, 0x140362e60\npush    r14                                                            ; +0x2, 0x140362e62\npush    r15                                                            ; +0x4, 0x140362e64\nsub     rsp, 30h                                                       ; +0x6, 0x140362e66\nmovzx   r15d, r8b                                                      ; +0xa, 0x140362e6a\nmov     ebp, edx                                                       ; +0xe, 0x140362e6e\nmov     r14, rcx                                                       ; +0x10, 0x140362e70\ntest    edx, edx                                                       ; +0x13, 0x140362e73\njnz     short loc_140362E9F                                            ; +0x15, 0x140362e75\ncmp     qword ptr [rcx+258h], 0                                        ; +0x17, 0x140362e77\njz      loc_140363010                                                  ; +0x1f, 0x140362e7f\nmov     rcx, [rcx+258h]                                                ; +0x25, 0x140362e85\nmov     rax, [rcx]                                                     ; +0x2c, 0x140362e8c\nadd     rsp, 30h                                                       ; +0x2f, 0x140362e8f\npop     r15                                                            ; +0x33, 0x140362e93\npop     r14                                                            ; +0x35, 0x140362e95\npop     rbp                                                            ; +0x37, 0x140362e97\njmp     qword ptr [rax+150h]                                           ; +0x38, 0x140362e98\ncmp     qword ptr [rcx+258h], 0                                        ; +0x3f, 0x140362e9f\nmovaps  [rsp+48h+var_28], xmm6                                         ; +0x47, 0x140362ea7\nmovss   xmm6, cs:dword_140834F20                                       ; +0x4c, 0x140362eac\njnz     loc_140362F77                                                  ; +0x54, 0x140362eb4\nmov     [rsp+48h+arg_0], rbx                                           ; +0x5a, 0x140362eba\nlea     rdx, qword_140704F78                                           ; +0x5f, 0x140362ebf\nmov     [rsp+48h+arg_8], rsi                                           ; +0x66, 0x140362ec6\nlea     rcx, asc_1406ED6E4; \" \"                                        ; +0x6b, 0x140362ecb\nmov     [rsp+48h+arg_10], rdi                                          ; +0x72, 0x140362ed2\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x77, 0x140362ed7\nmov     rcx, [r14]                                                     ; +0x7d, 0x140362edd\nmov     r8d, 1                                                         ; +0x80, 0x140362ee0\nmov     rdx, rax                                                       ; +0x86, 0x140362ee6\nmov     [r14+258h], rax                                                ; +0x89, 0x140362ee9\nmov     r9, [rcx+1C8h]                                                 ; +0x90, 0x140362ef0\nmov     rcx, r14                                                       ; +0x97, 0x140362ef7\ncall    r9                                                             ; +0x9a, 0x140362efa\nmov     rax, [r14]                                                     ; +0x9d, 0x140362efd\nmov     rcx, r14                                                       ; +0xa0, 0x140362f00\ncall    qword ptr [rax+140h]                                           ; +0xa3, 0x140362f03\nmov     rcx, [r14]                                                     ; +0xa9, 0x140362f09\nmov     rbx, rax                                                       ; +0xac, 0x140362f0c\nmov     rsi, [r14+258h]                                                ; +0xaf, 0x140362f0f\nmov     rdx, [rcx+140h]                                                ; +0xb6, 0x140362f16\nmov     rcx, r14                                                       ; +0xbd, 0x140362f1d\nmov     rdi, [rsi]                                                     ; +0xc0, 0x140362f20\ncall    rdx                                                            ; +0xc3, 0x140362f23\nmovss   xmm1, dword ptr [rbx]                                          ; +0xc5, 0x140362f25\nlea     rcx, [rsp+48h+arg_18]                                          ; +0xc9, 0x140362f29\nmulss   xmm1, xmm6                                                     ; +0xce, 0x140362f2e\nmovss   xmm2, dword ptr [rax+4]                                        ; +0xd2, 0x140362f32\nmulss   xmm2, xmm6                                                     ; +0xd7, 0x140362f37\naddss   xmm2, cs:flt_140835388                                         ; +0xdb, 0x140362f3b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xe3, 0x140362f43\nmov     rdx, rax                                                       ; +0xe9, 0x140362f49\nmov     rcx, rsi                                                       ; +0xec, 0x140362f4c\ncall    qword ptr [rdi+0B8h]                                           ; +0xef, 0x140362f4f\nmov     rcx, [r14+258h]                                                ; +0xf5, 0x140362f55\nmovaps  xmm1, xmm6                                                     ; +0xfc, 0x140362f5c\nmov     rax, [rcx]                                                     ; +0xff, 0x140362f5f\ncall    qword ptr [rax+0A0h]                                           ; +0x102, 0x140362f62\nmov     rdi, [rsp+48h+arg_10]                                          ; +0x108, 0x140362f68\nmov     rsi, [rsp+48h+arg_8]                                           ; +0x10d, 0x140362f6d\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x112, 0x140362f72\ncmp     ebp, 3E8h                                                      ; +0x117, 0x140362f77\njge     short loc_140362F99                                            ; +0x11d, 0x140362f7d\nmov     edx, ebp                                                       ; +0x11f, 0x140362f7f\nlea     rcx, word_1406ED6F8                                            ; +0x121, 0x140362f81\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x128, 0x140362f88\nmov     rcx, rax                                                       ; +0x12e, 0x140362f8e\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x131, 0x140362f91\njmp     short loc_140362FA0                                            ; +0x137, 0x140362f97\nmov     ecx, ebp                                                       ; +0x139, 0x140362f99\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x13b, 0x140362f9b\nmov     rcx, [r14+258h]                                                ; +0x140, 0x140362fa0\nmov     rdx, rax                                                       ; +0x147, 0x140362fa7\nadd     rcx, 168h                                                      ; +0x14a, 0x140362faa\nmov     rax, [rcx]                                                     ; +0x151, 0x140362fb1\ncall    qword ptr [rax]                                                ; +0x154, 0x140362fb4\nmovss   xmm1, cs:dword_140835610                                       ; +0x156, 0x140362fb6\nxorps   xmm3, xmm3                                                     ; +0x15e, 0x140362fbe\nmov     rcx, [r14+258h]                                                ; +0x161, 0x140362fc1\nmovaps  xmm2, xmm6                                                     ; +0x168, 0x140362fc8\ncall    cs:?limitLabelWidth@CCLabelBMFont@cocos2d@@QEAAXMMM@Z; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0x16b, 0x140362fcb\nmov     rcx, [r14+258h]                                                ; +0x171, 0x140362fd1\nmov     dl, 1                                                          ; +0x178, 0x140362fd8\nmov     rax, [rcx]                                                     ; +0x17a, 0x140362fda\ncall    qword ptr [rax+150h]                                           ; +0x17d, 0x140362fdd\nmov     rcx, [r14+258h]                                                ; +0x183, 0x140362fe3\nlea     rax, unk_140703458                                             ; +0x18a, 0x140362fea\nadd     rcx, 170h                                                      ; +0x191, 0x140362ff1\nlea     rdx, word_140703460                                            ; +0x198, 0x140362ff8\ntest    r15b, r15b                                                     ; +0x19f, 0x140362fff\ncmovnz  rdx, rax                                                       ; +0x1a2, 0x140363002\nmov     rax, [rcx]                                                     ; +0x1a6, 0x140363006\ncall    qword ptr [rax]                                                ; +0x1a9, 0x140363009\nmovaps  xmm6, [rsp+48h+var_28]                                         ; +0x1ab, 0x14036300b\nadd     rsp, 30h                                                       ; +0x1b0, 0x140363010\npop     r15                                                            ; +0x1b4, 0x140363014\npop     r14                                                            ; +0x1b6, 0x140363016\npop     rbp                                                            ; +0x1b8, 0x140363018\nretn                                                                   ; +0x1b9, 0x140363019", "xrefs": ["CustomizeObjectLayer::updateColorSprite @ 0x1401426ac", "GJColorSetupLayer::updateSpriteColor @ 0x14035f59c", "LevelSettingsLayer::updateColorSprite @ 0x14045ad57", "<???> @ 0x1408ba7a0", "<???> @ 0x1408ba7dc", "<???> @ 0x1409214c4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}