{"type": "func", "start": 4820892, "end": 4821198, "name": "ColorChannelSprite::updateCopyLabel", "pseudocode": "// \n// ColorChannelSprite::updateCopyLabel from 0x498f9c to 0x4990ce (306 bytes)\n// \n// 2 xrefs:\n// > ColorChannelSprite::updateValues @ 0x4992fa\n// > ColorChannelSprite::updateValues @ 0x499354\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  _BOOL4 v3; // r8\n  cocos2d::CCLabelBMFont *m_copyLabel; // r3\n  cocos2d::CCLabelBMFont *v7; // r0\n  ColorChannelSprite_vtbl *v8; // r3\n  cocos2d::CCLabelBMFont *v9; // r9\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10\n  float width; // s17\n  const cocos2d::CCSize *v12; // r0\n  cocos2d::CCString *v13; // r0\n  const unsigned __int8 *CString; // r0\n  const cocos2d::ccColor3B *v15; // r1\n  cocos2d::CCPoint v16; // [sp+4h] [bp-Ch] BYREF\n\n  v3 = a3;\n  m_copyLabel = a1->m_copyLabel;\n  if ( a2 || m_copyLabel )\n  {\n    if ( !m_copyLabel )\n    {\n      v7 = cocos2d::CCLabelBMFont::create();\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;\n      setPosition = v9->setPosition;\n      width = a1->getContentSize(a1)->width;\n      v12 = a1->getContentSize(a1);\n      cocos2d::CCPoint::CCPoint(&v16, width * 0.5, (float)(v12->height * 0.5) + 3.0);\n      setPosition(v9, &v16);\n      ((void (__fastcall *)(_DWORD, _DWORD))a1->m_copyLabel->setScale)(a1->m_copyLabel, 0.5);\n    }\n    if ( a2 )\n    {\n      if ( a2 >= 1000 )\n      {\n        CString = (const unsigned __int8 *)GJSpecialColorSelect::textForColorIdx(a2);\n      }\n      else\n      {\n        v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", (const char *)a2);\n        CString = (const unsigned __int8 *)cocos2d::CCString::getCString(v13);\n      }\n      a1->m_copyLabel->setString(a1->m_copyLabel, CString);\n      cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_copyLabel, 28.0, 0.5, 0.0);\n      a1->m_copyLabel->setVisible(a1->m_copyLabel, 1);\n      if ( v3 )\n        v15 = (const cocos2d::ccColor3B *)&unk_9AC080;\n      else\n        v15 = (const cocos2d::ccColor3B *)&word_9AC083;\n      a1->m_copyLabel->setColor(a1->m_copyLabel, v15);\n    }\n    else\n    {\n      a1->m_copyLabel->setVisible(a1->m_copyLabel, 0);\n    }\n  }\n}", "assembly": "; \n; ColorChannelSprite::updateCopyLabel from 0x498f9c to 0x4990ce (306 bytes)\n; \n; 2 xrefs:\n; > ColorChannelSprite::updateValues @ 0x4992fa\n; > ColorChannelSprite::updateValues @ 0x499354\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x498FA6)                ; +0x0, 0x498f9c\nPUSH.W          {R4-R10,LR}                                            ; +0x2, 0x498f9e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x498fa2\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x498fa4\nVPUSH           {D8}                                                   ; +0xa, 0x498fa6\nMOV             R8, R2                                                 ; +0xe, 0x498faa\nLDR             R2, [R3]; char *                                       ; +0x10, 0x498fac\nMOV             R7, R3                                                 ; +0x12, 0x498fae\nMOV             R4, R0                                                 ; +0x14, 0x498fb0\nMOV             R5, R1                                                 ; +0x16, 0x498fb2\nLDR.W           R3, [R0,#0x1FC]                                        ; +0x18, 0x498fb4\nSUB             SP, SP, #0x10                                          ; +0x1c, 0x498fb8\nSTR             R2, [SP,#0x10+var_4]                                   ; +0x1e, 0x498fba\nCBNZ            R1, loc_498FC2                                         ; +0x20, 0x498fbc\nCMP             R3, #0                                                 ; +0x22, 0x498fbe\nBEQ             loc_4990B8                                             ; +0x24, 0x498fc0\nCMP             R3, #0                                                 ; +0x26, 0x498fc2\nBNE             loc_499040                                             ; +0x28, 0x498fc4\nLDR             R0, =(asc_943A02 - 0x498FD4); \" \"                      ; +0x2a, 0x498fc6\nVMOV.F32        S16, #0.5                                              ; +0x2c, 0x498fc8\nLDR             R1, =(aBigfontFnt - 0x498FD6); \"bigFont.fnt\"           ; +0x30, 0x498fcc\nADD             R6, SP, #0x10+var_C                                    ; +0x32, 0x498fce\nADD             R0, PC; \" \"                                            ; +0x34, 0x498fd0\nADD             R1, PC; \"bigFont.fnt\"                                  ; +0x36, 0x498fd2\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0x38, 0x498fd4\nLDR             R3, [R4]                                               ; +0x3c, 0x498fd8\nMOVS            R2, #1                                                 ; +0x3e, 0x498fda\nMOV             R1, R0                                                 ; +0x40, 0x498fdc\nSTR.W           R0, [R4,#0x1FC]                                        ; +0x42, 0x498fde\nMOV             R0, R4                                                 ; +0x46, 0x498fe2\nLDR.W           R3, [R3,#0xE0]                                         ; +0x48, 0x498fe4\nBLX             R3                                                     ; +0x4c, 0x498fe8\nLDR.W           R9, [R4,#0x1FC]                                        ; +0x4e, 0x498fea\nMOV             R0, R4                                                 ; +0x52, 0x498fee\nLDR.W           R3, [R9]                                               ; +0x54, 0x498ff0\nLDR.W           R10, [R3,#0x5C]                                        ; +0x58, 0x498ff4\nLDR             R3, [R4]                                               ; +0x5c, 0x498ff8\nLDR.W           R3, [R3,#0x9C]                                         ; +0x5e, 0x498ffa\nBLX             R3                                                     ; +0x62, 0x498ffe\nLDR             R3, [R4]                                               ; +0x64, 0x499000\nLDR.W           R3, [R3,#0x9C]                                         ; +0x66, 0x499002\nVLDR            S17, [R0]                                              ; +0x6a, 0x499006\nMOV             R0, R4                                                 ; +0x6e, 0x49900a\nBLX             R3                                                     ; +0x70, 0x49900c\nVMOV.F32        S15, #3.0                                              ; +0x72, 0x49900e\nVMUL.F32        S17, S17, S16                                          ; +0x76, 0x499012\nVMOV            R1, S17; float                                         ; +0x7a, 0x499016\nVLDR            S14, [R0,#4]                                           ; +0x7e, 0x49901a\nMOV             R0, R6; this                                           ; +0x82, 0x49901e\nVMLA.F32        S15, S14, S16                                          ; +0x84, 0x499020\nVMOV            R2, S15; float                                         ; +0x88, 0x499024\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x8c, 0x499028\nMOV             R0, R9                                                 ; +0x90, 0x49902c\nMOV             R1, R6                                                 ; +0x92, 0x49902e\nBLX             R10                                                    ; +0x94, 0x499030\nLDR.W           R0, [R4,#0x1FC]                                        ; +0x96, 0x499032\nVMOV            R1, S16                                                ; +0x9a, 0x499036\nLDR             R3, [R0]                                               ; +0x9e, 0x49903a\nLDR             R3, [R3,#0x50]                                         ; +0xa0, 0x49903c\nBLX             R3                                                     ; +0xa2, 0x49903e\nCBNZ            R5, loc_499052                                         ; +0xa4, 0x499040\nLDR.W           R0, [R4,#0x1FC]                                        ; +0xa6, 0x499042\nMOV             R1, R5                                                 ; +0xaa, 0x499046\nLDR             R3, [R0]                                               ; +0xac, 0x499048\nLDR.W           R3, [R3,#0xA4]                                         ; +0xae, 0x49904a\nBLX             R3                                                     ; +0xb2, 0x49904e\nB               loc_4990B8                                             ; +0xb4, 0x499050\nCMP.W           R5, #0x3E8                                             ; +0xb6, 0x499052\nBGE             loc_499068                                             ; +0xba, 0x499056\nLDR             R0, =(aI - 0x499060); \"%i\"                             ; +0xbc, 0x499058\nMOV             R1, R5; char *                                         ; +0xbe, 0x49905a\nADD             R0, PC; \"%i\"                                           ; +0xc0, 0x49905c\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xc2, 0x49905e\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xc6, 0x499062\nB               loc_49906E                                             ; +0xca, 0x499066\nMOV             R0, R5; this                                           ; +0xcc, 0x499068\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0xce, 0x49906a\nMOV             R1, R0                                                 ; +0xd2, 0x49906e\nLDR.W           R0, [R4,#0x1FC]                                        ; +0xd4, 0x499070\nLDR             R3, [R0]                                               ; +0xd8, 0x499074\nLDR.W           R3, [R3,#0x1C8]                                        ; +0xda, 0x499076\nBLX             R3                                                     ; +0xde, 0x49907a\nLDR.W           R0, [R4,#0x1FC]; this                                  ; +0xe0, 0x49907c\nLDR             R1, flt_4990D0; float                                  ; +0xe4, 0x499080\nMOV.W           R2, #0x3F000000; float                                 ; +0xe6, 0x499082\nMOVS            R3, #0; float                                          ; +0xea, 0x499086\nBL              _ZN7cocos2d13CCLabelBMFont15limitLabelWidthEfff; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0xec, 0x499088\nLDR.W           R0, [R4,#0x1FC]                                        ; +0xf0, 0x49908c\nMOVS            R1, #1                                                 ; +0xf4, 0x499090\nLDR             R3, [R0]                                               ; +0xf6, 0x499092\nLDR.W           R3, [R3,#0xA4]                                         ; +0xf8, 0x499094\nBLX             R3                                                     ; +0xfc, 0x499098\nLDR.W           R0, [R4,#0x1FC]                                        ; +0xfe, 0x49909a\nLDR             R3, [R0]                                               ; +0x102, 0x49909e\nLDR.W           R3, [R3,#0x210]                                        ; +0x104, 0x4990a0\nCMP.W           R8, #0                                                 ; +0x108, 0x4990a4\nBNE             loc_4990B2                                             ; +0x10c, 0x4990a8\nLDR             R1, =(unk_9AC080 - 0x4990B0)                           ; +0x10e, 0x4990aa\nADD             R1, PC; unk_9AC080                                     ; +0x110, 0x4990ac\nADDS            R1, #(word_9AC083 - 0x9AC080)                          ; +0x112, 0x4990ae\nB               loc_4990B6                                             ; +0x114, 0x4990b0\nLDR             R1, =(unk_9AC080 - 0x4990B8)                           ; +0x116, 0x4990b2\nADD             R1, PC; unk_9AC080                                     ; +0x118, 0x4990b4\nBLX             R3                                                     ; +0x11a, 0x4990b6\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x11c, 0x4990b8\nLDR             R3, [R7]                                               ; +0x11e, 0x4990ba\nCMP             R2, R3                                                 ; +0x120, 0x4990bc\nBEQ             loc_4990C4                                             ; +0x122, 0x4990be\nBLX             __stack_chk_fail                                       ; +0x124, 0x4990c0\nADD             SP, SP, #0x10                                          ; +0x128, 0x4990c4\nVPOP            {D8}                                                   ; +0x12a, 0x4990c6\nPOP.W           {R4-R10,PC}                                            ; +0x12e, 0x4990ca", "xrefs": ["ColorChannelSprite::updateValues @ 0x4992fa", "ColorChannelSprite::updateValues @ 0x499354"], "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"}