{"type": "func", "start": 5371169296, "end": 5371169743, "name": "ColorChannelSprite::updateCopyLabel", "pseudocode": "// \n// ColorChannelSprite::updateCopyLabel from 0x140258a10 to 0x140258bcf (447 bytes)\n// \n// 6 xrefs:\n// > CustomizeObjectLayer::updateColorSprite @ 0x1400a85f9\n// > GJColorSetupLayer::updateSpriteColor @ 0x140256aac\n// > LevelSettingsLayer::updateColorSprite @ 0x140321b17\n// > <???> @ 0x1406846c8\n// > <???> @ 0x140684700\n// > <???> @ 0x1406cfb58\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 ColorChannelSprite::updateCopyLabel(ColorChannelSprite *a1, int a2, bool a3)\n{\n  float v3; // xmm0_4\n  cocos2d::CCLabelBMFont *v7; // rax\n  ColorChannelSprite_vtbl *v8; // r9\n  cocos2d::CCLabelBMFont_vtbl *v9; // rbx\n  const cocos2d::CCSize *v10; // rax\n  const cocos2d::CCPoint *v11; // rax\n  cocos2d::CCString *v12; // rax\n  const char *CString; // rax\n  _BOOL8 v14; // rdx\n  const cocos2d::ccColor3B *v15; // rdx\n\n  if ( a2 )\n  {\n    if ( !a1->m_copyLabel )\n    {\n      v7 = cocos2d::CCLabelBMFont::create(\" \", (const char *)&qword_14052A4D8);\n      v8 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      a1->m_copyLabel = v7;\n      v8->addChild_0(a1, v7, 1);\n      v9 = a1->m_copyLabel->__vftable;\n      a1->getContentSize(a1);\n      v10 = a1->getContentSize(a1);\n      cocos2d::CCPoint::CCPoint(v3, v10->width * 0.5);\n      v9->setPosition_0(a1->m_copyLabel, v11);\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_copyLabel->setScale_0)(a1->m_copyLabel);\n    }\n    if ( a2 >= 1000 )\n    {\n      CString = GJSpecialColorSelect::textForColorIdx(a2);\n    }\n    else\n    {\n      v12 = cocos2d::CCString::createWithFormat(\"%i\", a2);\n      CString = cocos2d::CCString::getCString(v12);\n    }\n    a1->m_copyLabel->setString(&a1->m_copyLabel->cocos2d::CCLabelProtocol, CString);\n    cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_copyLabel, 28.0, 0.5, 0.0);\n    LOBYTE(v14) = 1;\n    a1->m_copyLabel->setVisible(a1->m_copyLabel, v14);\n    v15 = (const cocos2d::ccColor3B *)&word_140529AB0;\n    if ( a3 )\n      v15 = (const cocos2d::ccColor3B *)&unk_140529AA8;\n    a1->m_copyLabel->setColor(&a1->m_copyLabel->cocos2d::CCRGBAProtocol, v15);\n  }\n  else if ( a1->m_copyLabel )\n  {\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_copyLabel->setVisible)(a1->m_copyLabel);\n  }\n}", "assembly": "; \n; ColorChannelSprite::updateCopyLabel from 0x140258a10 to 0x140258bcf (447 bytes)\n; \n; 6 xrefs:\n; > CustomizeObjectLayer::updateColorSprite @ 0x1400a85f9\n; > GJColorSetupLayer::updateSpriteColor @ 0x140256aac\n; > LevelSettingsLayer::updateColorSprite @ 0x140321b17\n; > <???> @ 0x1406846c8\n; > <???> @ 0x140684700\n; > <???> @ 0x1406cfb58\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], rbp                                               ; +0x0, 0x140258a10\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140258a15\npush    rdi                                                            ; +0xa, 0x140258a1a\nsub     rsp, 40h                                                       ; +0xb, 0x140258a1b\nmovzx   ebp, r8b                                                       ; +0xf, 0x140258a1f\nmov     esi, edx                                                       ; +0x13, 0x140258a23\nmov     rdi, rcx                                                       ; +0x15, 0x140258a25\ntest    edx, edx                                                       ; +0x18, 0x140258a28\njnz     short loc_140258A5A                                            ; +0x1a, 0x140258a2a\ncmp     qword ptr [rcx+258h], 0                                        ; +0x1c, 0x140258a2c\njz      loc_140258BBF                                                  ; +0x24, 0x140258a34\nmov     rcx, [rcx+258h]                                                ; +0x2a, 0x140258a3a\nmov     rax, [rcx]                                                     ; +0x31, 0x140258a41\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x34, 0x140258a44\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x39, 0x140258a49\nadd     rsp, 40h                                                       ; +0x3e, 0x140258a4e\npop     rdi                                                            ; +0x42, 0x140258a52\njmp     qword ptr [rax+140h]                                           ; +0x43, 0x140258a53\ncmp     qword ptr [rcx+258h], 0                                        ; +0x4a, 0x140258a5a\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0x52, 0x140258a62\nmovss   xmm7, cs:dword_140622B08                                       ; +0x57, 0x140258a67\njnz     loc_140258B26                                                  ; +0x5f, 0x140258a6f\nmov     [rsp+48h+arg_0], rbx                                           ; +0x65, 0x140258a75\nlea     rdx, qword_14052A4D8                                           ; +0x6a, 0x140258a7a\nlea     rcx, asc_140518984; \" \"                                        ; +0x71, 0x140258a81\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x78, 0x140258a88\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x7d, 0x140258a8d\nmov     r9, [rdi]                                                      ; +0x83, 0x140258a93\nmov     r8d, 1                                                         ; +0x86, 0x140258a96\nmov     rdx, rax                                                       ; +0x8c, 0x140258a9c\nmov     [rdi+258h], rax                                                ; +0x8f, 0x140258a9f\nmov     rcx, rdi                                                       ; +0x96, 0x140258aa6\ncall    qword ptr [r9+1B8h]                                            ; +0x99, 0x140258aa9\nmov     rax, [rdi+258h]                                                ; +0xa0, 0x140258ab0\nmov     rcx, rdi                                                       ; +0xa7, 0x140258ab7\nmov     rbx, [rax]                                                     ; +0xaa, 0x140258aba\nmov     rax, [rdi]                                                     ; +0xad, 0x140258abd\ncall    qword ptr [rax+130h]                                           ; +0xb0, 0x140258ac0\nmov     rcx, rdi                                                       ; +0xb6, 0x140258ac6\nmovss   xmm6, dword ptr [rax+4]                                        ; +0xb9, 0x140258ac9\nmov     rax, [rdi]                                                     ; +0xbe, 0x140258ace\ncall    qword ptr [rax+130h]                                           ; +0xc1, 0x140258ad1\nmulss   xmm6, xmm7                                                     ; +0xc7, 0x140258ad7\nlea     rcx, [rsp+48h+arg_18]                                          ; +0xcb, 0x140258adb\nmovss   xmm1, dword ptr [rax]                                          ; +0xd0, 0x140258ae0\naddss   xmm6, cs:flt_140622F28                                         ; +0xd4, 0x140258ae4\nmulss   xmm1, xmm7                                                     ; +0xdc, 0x140258aec\nmovaps  xmm2, xmm6                                                     ; +0xe0, 0x140258af0\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xe3, 0x140258af3\nmov     rcx, [rdi+258h]                                                ; +0xe9, 0x140258af9\nmov     rdx, rax                                                       ; +0xf0, 0x140258b00\ncall    qword ptr [rbx+0B8h]                                           ; +0xf3, 0x140258b03\nmov     rcx, [rdi+258h]                                                ; +0xf9, 0x140258b09\nmovaps  xmm1, xmm7                                                     ; +0x100, 0x140258b10\nmov     rax, [rcx]                                                     ; +0x103, 0x140258b13\ncall    qword ptr [rax+0A0h]                                           ; +0x106, 0x140258b16\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x10c, 0x140258b1c\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x111, 0x140258b21\ncmp     esi, 3E8h                                                      ; +0x116, 0x140258b26\njge     short loc_140258B48                                            ; +0x11c, 0x140258b2c\nmov     edx, esi                                                       ; +0x11e, 0x140258b2e\nlea     rcx, aI_11; \"%i\"                                               ; +0x120, 0x140258b30\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x127, 0x140258b37\nmov     rcx, rax                                                       ; +0x12d, 0x140258b3d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x130, 0x140258b40\njmp     short loc_140258B4F                                            ; +0x136, 0x140258b46\nmov     ecx, esi                                                       ; +0x138, 0x140258b48\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x13a, 0x140258b4a\nmov     rcx, [rdi+258h]                                                ; +0x13f, 0x140258b4f\nmov     rdx, rax                                                       ; +0x146, 0x140258b56\nadd     rcx, 168h                                                      ; +0x149, 0x140258b59\nmov     rax, [rcx]                                                     ; +0x150, 0x140258b60\ncall    qword ptr [rax]                                                ; +0x153, 0x140258b63\nmovss   xmm1, cs:dword_140623154                                       ; +0x155, 0x140258b65\nxorps   xmm3, xmm3                                                     ; +0x15d, 0x140258b6d\nmov     rcx, [rdi+258h]                                                ; +0x160, 0x140258b70\nmovaps  xmm2, xmm7                                                     ; +0x167, 0x140258b77\ncall    cs:?limitLabelWidth@CCLabelBMFont@cocos2d@@QEAAXMMM@Z; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0x16a, 0x140258b7a\nmov     rcx, [rdi+258h]                                                ; +0x170, 0x140258b80\nmov     dl, 1                                                          ; +0x177, 0x140258b87\nmov     rax, [rcx]                                                     ; +0x179, 0x140258b89\ncall    qword ptr [rax+140h]                                           ; +0x17c, 0x140258b8c\nmov     rcx, [rdi+258h]                                                ; +0x182, 0x140258b92\nlea     r8, unk_140529AA8                                              ; +0x189, 0x140258b99\nadd     rcx, 170h                                                      ; +0x190, 0x140258ba0\nlea     rdx, word_140529AB0                                            ; +0x197, 0x140258ba7\ntest    bpl, bpl                                                       ; +0x19e, 0x140258bae\ncmovnz  rdx, r8                                                        ; +0x1a1, 0x140258bb1\nmov     rax, [rcx]                                                     ; +0x1a5, 0x140258bb5\ncall    qword ptr [rax]                                                ; +0x1a8, 0x140258bb8\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x1aa, 0x140258bba\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x1af, 0x140258bbf\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x1b4, 0x140258bc4\nadd     rsp, 40h                                                       ; +0x1b9, 0x140258bc9\npop     rdi                                                            ; +0x1bd, 0x140258bcd\nretn                                                                   ; +0x1be, 0x140258bce", "xrefs": ["CustomizeObjectLayer::updateColorSprite @ 0x1400a85f9", "GJColorSetupLayer::updateSpriteColor @ 0x140256aac", "LevelSettingsLayer::updateColorSprite @ 0x140321b17", "<???> @ 0x1406846c8", "<???> @ 0x140684700", "<???> @ 0x1406cfb58"], "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"}