{"type": "func", "start": 4296462232, "end": 4296462612, "name": "CCTextInputNode::refreshLabel", "pseudocode": "// \n// CCTextInputNode::refreshLabel from 0x10016cf98 to 0x10016d114 (380 bytes)\n// \n// 5 xrefs:\n// > CCTextInputNode::updateLabel @ 0x10016cd38\n// > CCTextInputNode::setMaxLabelScale @ 0x10016d134\n// > CCTextInputNode::setMaxLabelWidth @ 0x10016d13c\n// > CCTextInputNode::setLabelPlaceholderScale @ 0x10016d144\n// > CCTextInputNode::setLabelPlaceholderColor @ 0x10016d154\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 __fastcall CCTextInputNode::refreshLabel(CCTextInputNode *a1)\n{\n  char *v2; // x0\n  _BOOL4 v3; // w20\n  cocos2d::CCLabelBMFont *m_textLabel; // x21\n  float m_maxLabelWidth; // s8\n  float *v6; // x0\n  __n128 v7; // q0\n  float v8; // s8\n  void (*setColor)(void); // x8\n  TextArea *m_textArea; // x0\n  int b; // w9\n  int v12; // w8\n  void *__p[2]; // [xsp+0h] [xbp-60h] BYREF\n  char v14; // [xsp+17h] [xbp-49h]\n  void *v15[2]; // [xsp+18h] [xbp-48h] BYREF\n  char v16; // [xsp+2Fh] [xbp-31h]\n\n  if ( a1->m_textLabel || a1->m_textArea )\n  {\n    v2 = (char *)((__int64 (__fastcall *)(cocos2d::CCTextFieldTTF *))a1->m_textField->getString)(a1->m_textField);\n    sub_100009900(v15, v2);\n    sub_100009900(__p, \"\");\n    v3 = sub_1000045BC(v15, __p);\n    if ( v14 < 0 )\n      operator delete(__p[0]);\n    if ( v16 < 0 )\n      operator delete(v15[0]);\n    m_textLabel = a1->m_textLabel;\n    if ( m_textLabel )\n    {\n      if ( v3 && a1->m_placeholderScale > 0.0 )\n      {\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->setScale)(a1->m_textLabel);\n      }\n      else\n      {\n        m_maxLabelWidth = a1->m_maxLabelWidth;\n        v6 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->getContentSize)(a1->m_textLabel);\n        v7.n128_u32[0] = LODWORD(a1->m_maxLabelScale);\n        if ( (float)(m_maxLabelWidth / *v6) <= v7.n128_f32[0] )\n        {\n          v8 = a1->m_maxLabelWidth;\n          v7.n128_f32[0] = v8\n                         / *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_textLabel->getContentSize)(a1->m_textLabel);\n        }\n        ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __n128))m_textLabel->setScale)(m_textLabel, v7);\n        if ( !v3 )\n        {\n          setColor = (void (*)(void))a1->m_textLabel->setColor;\n          goto LABEL_19;\n        }\n      }\n      setColor = (void (*)(void))a1->m_textLabel->setColor;\nLABEL_19:\n      setColor();\n      return;\n    }\n    m_textArea = a1->m_textArea;\n    if ( m_textArea )\n    {\n      if ( v3 )\n      {\n        b = a1->m_placeholderColor.b;\n        v12 = *(unsigned __int16 *)&a1->m_placeholderColor.r;\n      }\n      else\n      {\n        b = a1->m_textColor.b;\n        v12 = *(unsigned __int16 *)&a1->m_textColor.r;\n      }\n      TextArea::colorAllLabels(m_textArea, (cocos2d::ccColor3B)(v12 | (b << 16)));\n    }\n  }\n}", "assembly": "; \n; CCTextInputNode::refreshLabel from 0x10016cf98 to 0x10016d114 (380 bytes)\n; \n; 5 xrefs:\n; > CCTextInputNode::updateLabel @ 0x10016cd38\n; > CCTextInputNode::setMaxLabelScale @ 0x10016d134\n; > CCTextInputNode::setMaxLabelWidth @ 0x10016d13c\n; > CCTextInputNode::setLabelPlaceholderScale @ 0x10016d144\n; > CCTextInputNode::setLabelPlaceholderColor @ 0x10016d154\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\nSUB             SP, SP, #0x70                                          ; +0x0, 0x10016cf98\nSTP             D9, D8, [SP,#0x60+var_30]                              ; +0x4, 0x10016cf9c\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x8, 0x10016cfa0\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0xc, 0x10016cfa4\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x10, 0x10016cfa8\nADD             X29, SP, #0x60                                         ; +0x14, 0x10016cfac\nMOV             X19, X0                                                ; +0x18, 0x10016cfb0\nLDR             X8, [X0,#0x230]                                        ; +0x1c, 0x10016cfb4\nCBNZ            X8, loc_10016CFC4                                      ; +0x20, 0x10016cfb8\nLDR             X8, [X19,#0x240]                                       ; +0x24, 0x10016cfbc\nCBZ             X8, loc_10016D0FC                                      ; +0x28, 0x10016cfc0\nLDR             X0, [X19,#0x218]                                       ; +0x2c, 0x10016cfc4\nLDR             X8, [X0]                                               ; +0x30, 0x10016cfc8\nLDR             X8, [X8,#0x4D0]                                        ; +0x34, 0x10016cfcc\nBLR             X8                                                     ; +0x38, 0x10016cfd0\nMOV             X1, X0; __s                                            ; +0x3c, 0x10016cfd4\nADD             X0, SP, #0x60+var_48; int                              ; +0x40, 0x10016cfd8\nBL              sub_100009900                                          ; +0x44, 0x10016cfdc\nADRL            X1, asc_100746688; \"\"                                  ; +0x48, 0x10016cfe0\nMOV             X0, SP; int                                            ; +0x50, 0x10016cfe8\nBL              sub_100009900                                          ; +0x54, 0x10016cfec\nADD             X0, SP, #0x60+var_48                                   ; +0x58, 0x10016cff0\nMOV             X1, SP                                                 ; +0x5c, 0x10016cff4\nBL              sub_1000045BC                                          ; +0x60, 0x10016cff8\nMOV             X20, X0                                                ; +0x64, 0x10016cffc\nLDRSB           W8, [SP,#0x60+var_49]                                  ; +0x68, 0x10016d000\nTBZ             W8, #0x1F, loc_10016D010                               ; +0x6c, 0x10016d004\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x70, 0x10016d008\nBL              __ZdlPv; operator delete(void *)                       ; +0x74, 0x10016d00c\nLDRSB           W8, [SP,#0x60+var_31]                                  ; +0x78, 0x10016d010\nTBZ             W8, #0x1F, loc_10016D020                               ; +0x7c, 0x10016d014\nLDR             X0, [SP,#0x60+var_48]; __p                             ; +0x80, 0x10016d018\nBL              __ZdlPv; operator delete(void *)                       ; +0x84, 0x10016d01c\nLDR             X21, [X19,#0x230]                                      ; +0x88, 0x10016d020\nCBZ             X21, loc_10016D0B8                                     ; +0x8c, 0x10016d024\nCBZ             W20, loc_10016D04C                                     ; +0x90, 0x10016d028\nLDR             S0, [X19,#0x200]                                       ; +0x94, 0x10016d02c\nFCMP            S0, #0.0                                               ; +0x98, 0x10016d030\nB.LE            loc_10016D04C                                          ; +0x9c, 0x10016d034\nLDR             X8, [X21]                                              ; +0xa0, 0x10016d038\nLDR             X8, [X8,#0xA0]                                         ; +0xa4, 0x10016d03c\nMOV             X0, X21                                                ; +0xa8, 0x10016d040\nBLR             X8                                                     ; +0xac, 0x10016d044\nB               loc_10016D0A4                                          ; +0xb0, 0x10016d048\nLDR             S8, [X19,#0x1F8]                                       ; +0xb4, 0x10016d04c\nLDR             X8, [X21]                                              ; +0xb8, 0x10016d050\nLDR             X8, [X8,#0x138]                                        ; +0xbc, 0x10016d054\nMOV             X0, X21                                                ; +0xc0, 0x10016d058\nBLR             X8                                                     ; +0xc4, 0x10016d05c\nLDR             S0, [X0]                                               ; +0xc8, 0x10016d060\nFDIV            S1, S8, S0                                             ; +0xcc, 0x10016d064\nLDR             S0, [X19,#0x1FC]                                       ; +0xd0, 0x10016d068\nFCMP            S1, S0                                                 ; +0xd4, 0x10016d06c\nB.GT            loc_10016D090                                          ; +0xd8, 0x10016d070\nLDR             S8, [X19,#0x1F8]                                       ; +0xdc, 0x10016d074\nLDR             X0, [X19,#0x230]                                       ; +0xe0, 0x10016d078\nLDR             X8, [X0]                                               ; +0xe4, 0x10016d07c\nLDR             X8, [X8,#0x138]                                        ; +0xe8, 0x10016d080\nBLR             X8                                                     ; +0xec, 0x10016d084\nLDR             S0, [X0]                                               ; +0xf0, 0x10016d088\nFDIV            S0, S8, S0                                             ; +0xf4, 0x10016d08c\nLDR             X8, [X21]                                              ; +0xf8, 0x10016d090\nLDR             X8, [X8,#0xA0]                                         ; +0xfc, 0x10016d094\nMOV             X0, X21                                                ; +0x100, 0x10016d098\nBLR             X8                                                     ; +0x104, 0x10016d09c\nCBZ             W20, loc_10016D0D4                                     ; +0x108, 0x10016d0a0\nLDR             X0, [X19,#0x230]                                       ; +0x10c, 0x10016d0a4\nLDR             X8, [X0]                                               ; +0x110, 0x10016d0a8\nLDR             X8, [X8,#0x420]                                        ; +0x114, 0x10016d0ac\nADD             X1, X19, #0x204                                        ; +0x118, 0x10016d0b0\nB               loc_10016D0E4                                          ; +0x11c, 0x10016d0b4\nLDR             X0, [X19,#0x240]                                       ; +0x120, 0x10016d0b8\nCBZ             X0, loc_10016D0FC                                      ; +0x124, 0x10016d0bc\nADD             X8, X19, #0x204                                        ; +0x128, 0x10016d0c0\nCBZ             W20, loc_10016D0EC                                     ; +0x12c, 0x10016d0c4\nLDRB            W9, [X8,#2]                                            ; +0x130, 0x10016d0c8\nLDRH            W8, [X8]                                               ; +0x134, 0x10016d0cc\nB               loc_10016D0F4                                          ; +0x138, 0x10016d0d0\nLDR             X0, [X19,#0x230]                                       ; +0x13c, 0x10016d0d4\nLDR             X8, [X0]                                               ; +0x140, 0x10016d0d8\nLDR             X8, [X8,#0x420]                                        ; +0x144, 0x10016d0dc\nADD             X1, X19, #0x207                                        ; +0x148, 0x10016d0e0\nBLR             X8                                                     ; +0x14c, 0x10016d0e4\nB               loc_10016D0FC                                          ; +0x150, 0x10016d0e8\nLDRB            W9, [X8,#5]                                            ; +0x154, 0x10016d0ec\nLDURH           W8, [X8,#3]                                            ; +0x158, 0x10016d0f0\nORR             X1, X8, X9,LSL#16                                      ; +0x15c, 0x10016d0f4\nBL              TextArea__colorAllLabels                               ; +0x160, 0x10016d0f8\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x164, 0x10016d0fc\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x168, 0x10016d100\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x16c, 0x10016d104\nLDP             D9, D8, [SP,#0x60+var_30]                              ; +0x170, 0x10016d108\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x174, 0x10016d10c\nRET                                                                    ; +0x178, 0x10016d110", "xrefs": ["CCTextInputNode::updateLabel @ 0x10016cd38", "CCTextInputNode::setMaxLabelScale @ 0x10016d134", "CCTextInputNode::setMaxLabelWidth @ 0x10016d13c", "CCTextInputNode::setLabelPlaceholderScale @ 0x10016d144", "CCTextInputNode::setLabelPlaceholderColor @ 0x10016d154"], "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"}