{"type": "func", "start": 3122308, "end": 3122632, "name": "CCTextInputNode::refreshLabel", "pseudocode": "// \n// CCTextInputNode::refreshLabel from 0x2fa484 to 0x2fa5c8 (324 bytes)\n// \n// 6 xrefs:\n// > CCTextInputNode::setMaxLabelScale @ 0x2fa5d4\n// > CCTextInputNode::setMaxLabelWidth @ 0x2fa5dc\n// > CCTextInputNode::setLabelPlaceholderScale @ 0x2fa5e4\n// > CCTextInputNode::setLabelPlaceholderColor @ 0x2fa5f6\n// > CCTextInputNode::setLabelNormalColor @ 0x2fa610\n// > CCTextInputNode::updateLabel @ 0x2fa9a2\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 CCTextInputNode::refreshLabel(CCTextInputNode *a1)\n{\n  char *v2; // r0\n  unsigned int v3; // r6\n  cocos2d::CCLabelBMFont *m_textLabel; // r5\n  unsigned int v5; // r6\n  cocos2d::CCLabelBMFont_vtbl *v6; // r3\n  void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // r8\n  float m_maxLabelWidth; // s16\n  float *v9; // r0\n  float m_maxLabelScale; // s15\n  float v11; // s16\n  void (*setColor)(void); // r3\n  TextArea *m_textArea; // r0\n  int v14; // r1\n  char v15[4]; // [sp+Ch] [bp-Ch] BYREF\n  char v16[4]; // [sp+10h] [bp-8h] BYREF\n\n  if ( a1->m_textLabel || a1->m_textArea )\n  {\n    v2 = (char *)a1->m_textField->getString(a1->m_textField);\n    sub_776584((int)v15, v2);\n    sub_776584((int)v16, (char *)&unk_939830);\n    v3 = __clz(sub_774DBC(v15, v16));\n    sub_774008(v16);\n    sub_774008(v15);\n    m_textLabel = a1->m_textLabel;\n    v5 = v3 >> 5;\n    if ( m_textLabel )\n    {\n      v6 = m_textLabel->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      if ( v5 && a1->m_placeholderScale > 0.0 )\n      {\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))v6->setScale)(\n          a1->m_textLabel,\n          LODWORD(a1->m_placeholderScale));\n      }\n      else\n      {\n        setScale = v6->setScale;\n        m_maxLabelWidth = a1->m_maxLabelWidth;\n        v9 = (float *)v6->getContentSize(a1->m_textLabel);\n        m_maxLabelScale = a1->m_maxLabelScale;\n        if ( (float)(m_maxLabelWidth / *v9) <= m_maxLabelScale )\n        {\n          m_textLabel = a1->m_textLabel;\n          v11 = a1->m_maxLabelWidth;\n          m_maxLabelScale = v11 / m_textLabel->getContentSize(m_textLabel)->width;\n        }\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))setScale)(m_textLabel, LODWORD(m_maxLabelScale));\n        if ( !v5 )\n        {\n          setColor = (void (*)(void))a1->m_textLabel->setColor;\n          goto LABEL_12;\n        }\n      }\n      setColor = (void (*)(void))a1->m_textLabel->setColor;\nLABEL_12:\n      setColor();\n      return;\n    }\n    m_textArea = a1->m_textArea;\n    if ( m_textArea )\n    {\n      if ( v5 )\n        v14 = *(_DWORD *)&a1->m_placeholderColor.r;\n      else\n        v14 = a1->m_textColor.r | (a1->m_textColor.g << 8) | (a1->m_textColor.b << 16);\n      TextArea::colorAllLabels(m_textArea, (cocos2d::ccColor3B)v14);\n    }\n  }\n}", "assembly": "; \n; CCTextInputNode::refreshLabel from 0x2fa484 to 0x2fa5c8 (324 bytes)\n; \n; 6 xrefs:\n; > CCTextInputNode::setMaxLabelScale @ 0x2fa5d4\n; > CCTextInputNode::setMaxLabelWidth @ 0x2fa5dc\n; > CCTextInputNode::setLabelPlaceholderScale @ 0x2fa5e4\n; > CCTextInputNode::setLabelPlaceholderColor @ 0x2fa5f6\n; > CCTextInputNode::setLabelNormalColor @ 0x2fa610\n; > CCTextInputNode::updateLabel @ 0x2fa9a2\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 - 0x2FA48E)                ; +0x0, 0x2fa484\nPUSH.W          {R4-R8,LR}                                             ; +0x2, 0x2fa486\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x2fa48a\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x2fa48c\nVPUSH           {D8}                                                   ; +0xa, 0x2fa48e\nMOV             R4, R0                                                 ; +0xe, 0x2fa492\nLDR             R2, [R3]                                               ; +0x10, 0x2fa494\nMOV             R7, R3                                                 ; +0x12, 0x2fa496\nSUB             SP, SP, #0x18                                          ; +0x14, 0x2fa498\nSTR             R2, [SP,#0x18+var_4]                                   ; +0x16, 0x2fa49a\nLDR.W           R2, [R0,#0x188]                                        ; +0x18, 0x2fa49c\nCBNZ            R2, loc_2FA4AC                                         ; +0x1c, 0x2fa4a0\nLDR.W           R3, [R0,#0x190]                                        ; +0x1e, 0x2fa4a2\nCMP             R3, #0                                                 ; +0x22, 0x2fa4a6\nBEQ.W           loc_2FA5B2                                             ; +0x24, 0x2fa4a8\nLDR.W           R0, [R4,#0x17C]                                        ; +0x28, 0x2fa4ac\nADD             R5, SP, #0x18+var_C                                    ; +0x2c, 0x2fa4b0\nADD.W           R8, SP, #0x18+var_8                                    ; +0x2e, 0x2fa4b2\nLDR             R3, [R0]                                               ; +0x32, 0x2fa4b6\nLDR.W           R3, [R3,#0x268]                                        ; +0x34, 0x2fa4b8\nBLX             R3                                                     ; +0x38, 0x2fa4bc\nADD             R2, SP, #0x18+var_14                                   ; +0x3a, 0x2fa4be\nMOV             R1, R0; char *                                         ; +0x3c, 0x2fa4c0\nMOV             R0, R5; int                                            ; +0x3e, 0x2fa4c2\nBL              sub_776584                                             ; +0x40, 0x2fa4c4\nLDR             R1, =(unk_939830 - 0x2FA4D2)                           ; +0x44, 0x2fa4c8\nMOV             R0, R8; int                                            ; +0x46, 0x2fa4ca\nADD             R2, SP, #0x18+var_10                                   ; +0x48, 0x2fa4cc\nADD             R1, PC; unk_939830 ; char *                            ; +0x4a, 0x2fa4ce\nBL              sub_776584                                             ; +0x4c, 0x2fa4d0\nMOV             R1, R8                                                 ; +0x50, 0x2fa4d4\nMOV             R0, R5                                                 ; +0x52, 0x2fa4d6\nBL              sub_774DBC                                             ; +0x54, 0x2fa4d8\nCLZ.W           R6, R0                                                 ; +0x58, 0x2fa4dc\nMOV             R0, R8                                                 ; +0x5c, 0x2fa4e0\nBL              sub_774008                                             ; +0x5e, 0x2fa4e2\nMOV             R0, R5                                                 ; +0x62, 0x2fa4e6\nBL              sub_774008                                             ; +0x64, 0x2fa4e8\nLDR.W           R5, [R4,#0x188]                                        ; +0x68, 0x2fa4ec\nLSRS            R6, R6, #5                                             ; +0x6c, 0x2fa4f0\nCMP             R5, #0                                                 ; +0x6e, 0x2fa4f2\nBEQ             loc_2FA580                                             ; +0x70, 0x2fa4f4\nLDR             R3, [R5]                                               ; +0x72, 0x2fa4f6\nCBZ             R6, loc_2FA514                                         ; +0x74, 0x2fa4f8\nVLDR            S15, [R4,#0x16C]                                       ; +0x76, 0x2fa4fa\nVCMPE.F32       S15, #0.0                                              ; +0x7a, 0x2fa4fe\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7e, 0x2fa502\nBLE             loc_2FA514                                             ; +0x82, 0x2fa506\nLDR             R3, [R3,#0x50]                                         ; +0x84, 0x2fa508\nMOV             R0, R5                                                 ; +0x86, 0x2fa50a\nVMOV            R1, S15                                                ; +0x88, 0x2fa50c\nBLX             R3                                                     ; +0x8c, 0x2fa510\nB               loc_2FA55E                                             ; +0x8e, 0x2fa512\nLDR.W           R8, [R3,#0x50]                                         ; +0x90, 0x2fa514\nMOV             R0, R5                                                 ; +0x94, 0x2fa518\nLDR.W           R3, [R3,#0x9C]                                         ; +0x96, 0x2fa51a\nVLDR            S16, [R4,#0x164]                                       ; +0x9a, 0x2fa51e\nBLX             R3                                                     ; +0x9e, 0x2fa522\nVLDR            S15, [R4,#0x168]                                       ; +0xa0, 0x2fa524\nVLDR            S14, [R0]                                              ; +0xa4, 0x2fa528\nVDIV.F32        S16, S16, S14                                          ; +0xa8, 0x2fa52c\nVCMPE.F32       S16, S15                                               ; +0xac, 0x2fa530\nVMRS            APSR_nzcv, FPSCR                                       ; +0xb0, 0x2fa534\nBGT             loc_2FA554                                             ; +0xb4, 0x2fa538\nLDR.W           R5, [R4,#0x188]                                        ; +0xb6, 0x2fa53a\nVLDR            S16, [R4,#0x164]                                       ; +0xba, 0x2fa53e\nLDR             R3, [R5]                                               ; +0xbe, 0x2fa542\nMOV             R0, R5                                                 ; +0xc0, 0x2fa544\nLDR.W           R3, [R3,#0x9C]                                         ; +0xc2, 0x2fa546\nBLX             R3                                                     ; +0xc6, 0x2fa54a\nVLDR            S15, [R0]                                              ; +0xc8, 0x2fa54c\nVDIV.F32        S15, S16, S15                                          ; +0xcc, 0x2fa550\nMOV             R0, R5                                                 ; +0xd0, 0x2fa554\nVMOV            R1, S15                                                ; +0xd2, 0x2fa556\nBLX             R8                                                     ; +0xd6, 0x2fa55a\nCBZ             R6, loc_2FA56E                                         ; +0xd8, 0x2fa55c\nLDR.W           R0, [R4,#0x188]                                        ; +0xda, 0x2fa55e\nADD.W           R1, R4, #0x170                                         ; +0xde, 0x2fa562\nLDR             R3, [R0]                                               ; +0xe2, 0x2fa566\nLDR.W           R3, [R3,#0x210]                                        ; +0xe4, 0x2fa568\nB               loc_2FA57C                                             ; +0xe8, 0x2fa56c\nLDR.W           R0, [R4,#0x188]                                        ; +0xea, 0x2fa56e\nADDW            R1, R4, #0x173                                         ; +0xee, 0x2fa572\nLDR             R3, [R0]                                               ; +0xf2, 0x2fa576\nLDR.W           R3, [R3,#0x210]                                        ; +0xf4, 0x2fa578\nBLX             R3                                                     ; +0xf8, 0x2fa57c\nB               loc_2FA5B2                                             ; +0xfa, 0x2fa57e\nLDR.W           R0, [R4,#0x190]                                        ; +0xfc, 0x2fa580\nCBZ             R0, loc_2FA5B2                                         ; +0x100, 0x2fa584\nCBZ             R6, loc_2FA58E                                         ; +0x102, 0x2fa586\nLDR.W           R1, [R4,#0x170]                                        ; +0x104, 0x2fa588\nB               loc_2FA5A2                                             ; +0x108, 0x2fa58c\nLDRB.W          R1, [R4,#0x174]                                        ; +0x10a, 0x2fa58e\nLDRB.W          R3, [R4,#0x173]                                        ; +0x10e, 0x2fa592\nORR.W           R3, R3, R1,LSL#8                                       ; +0x112, 0x2fa596\nLDRB.W          R1, [R4,#0x175]                                        ; +0x116, 0x2fa59a\nORR.W           R1, R3, R1,LSL#16                                      ; +0x11a, 0x2fa59e\nBL              _ZN8TextArea14colorAllLabelsEN7cocos2d10_ccColor3BE; TextArea::colorAllLabels(cocos2d::_ccColor3B) ; +0x11e, 0x2fa5a2\nB               loc_2FA5B2                                             ; +0x122, 0x2fa5a6\nMOV             R0, R5                                                 ; +0x124, 0x2fa5a8\nBL              sub_774008                                             ; +0x126, 0x2fa5aa\nBL              __cxa_end_cleanup                                      ; +0x12a, 0x2fa5ae\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x12e, 0x2fa5b2\nLDR             R3, [R7]                                               ; +0x130, 0x2fa5b4\nCMP             R2, R3                                                 ; +0x132, 0x2fa5b6\nBEQ             loc_2FA5BE                                             ; +0x134, 0x2fa5b8\nBLX             __stack_chk_fail                                       ; +0x136, 0x2fa5ba\nADD             SP, SP, #0x18                                          ; +0x13a, 0x2fa5be\nVPOP            {D8}                                                   ; +0x13c, 0x2fa5c0\nPOP.W           {R4-R8,PC}                                             ; +0x140, 0x2fa5c4", "xrefs": ["CCTextInputNode::setMaxLabelScale @ 0x2fa5d4", "CCTextInputNode::setMaxLabelWidth @ 0x2fa5dc", "CCTextInputNode::setLabelPlaceholderScale @ 0x2fa5e4", "CCTextInputNode::setLabelPlaceholderColor @ 0x2fa5f6", "CCTextInputNode::setLabelNormalColor @ 0x2fa610", "CCTextInputNode::updateLabel @ 0x2fa9a2"], "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"}