{"type": "func", "start": 4295617472, "end": 4295618015, "name": "CCTextInputNode::refreshLabel", "pseudocode": "// \n// CCTextInputNode::refreshLabel from 0x10009ebc0 to 0x10009eddf (543 bytes)\n// \n// 6 xrefs:\n// > CCTextInputNode::updateLabel @ 0x10009e7c8\n// > CCTextInputNode::setMaxLabelScale @ 0x10009ee0d\n// > CCTextInputNode::setMaxLabelWidth @ 0x10009ee2d\n// > CCTextInputNode::setLabelPlaceholderScale @ 0x10009ee4d\n// > CCTextInputNode::setLabelPlaceholderColor @ 0x10009ee76\n// > CCTextInputNode::setLabelNormalColor @ 0x10009ee96\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  double v1; // xmm0_8\n  const char *v3; // r15\n  size_t v4; // rax\n  size_t v5; // r14\n  char *v6; // r12\n  size_t v7; // r13\n  size_t v8; // r15\n  cocos2d::CCLabelBMFont *m_textLabel; // r14\n  float *v10; // rax\n  TextArea *m_textArea; // rdi\n  int v12; // eax\n  int b; // esi\n  size_t __dst; // [rsp+8h] [rbp-48h] BYREF\n  size_t v15; // [rsp+10h] [rbp-40h]\n  void *__p; // [rsp+18h] [rbp-38h]\n  float m_maxLabelWidth; // [rsp+24h] [rbp-2Ch]\n\n  if ( !a1->m_textLabel && !a1->m_textArea )\n    return;\n  v3 = (const char *)((__int64 (__fastcall *)(cocos2d::CCTextFieldTTF *))a1->m_textField->getString)(a1->m_textField);\n  v4 = strlen(v3);\n  if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v1);\n  v5 = v4;\n  if ( v4 >= 0x17 )\n  {\n    v7 = 26;\n    if ( (v4 | 7) != 0x17 )\n      v7 = (v4 | 7) + 1;\n    v6 = (char *)operator new(v7);\n    __p = v6;\n    __dst = v7 + 1;\n    v15 = v5;\n    goto LABEL_10;\n  }\n  LOBYTE(__dst) = 2 * v4;\n  v6 = (char *)&__dst + 1;\n  if ( v4 )\nLABEL_10:\n    memmove(v6, v3, v5);\n  v6[v5] = 0;\n  v8 = (unsigned __int8)__dst >> 1;\n  if ( (__dst & 1) == 0 )\n  {\n    m_textLabel = a1->m_textLabel;\n    if ( m_textLabel )\n      goto LABEL_13;\nLABEL_21:\n    m_textArea = a1->m_textArea;\n    if ( m_textArea )\n    {\n      if ( v8 )\n      {\n        v12 = *(unsigned __int16 *)&a1->m_textColor.r;\n        b = a1->m_textColor.b;\n      }\n      else\n      {\n        v12 = *(unsigned __int16 *)&a1->m_placeholderColor.r;\n        b = a1->m_placeholderColor.b;\n      }\n      TextArea::colorAllLabels(m_textArea, (cocos2d::ccColor3B)(v12 | (b << 16)));\n    }\n    return;\n  }\n  v8 = v15;\n  operator delete(__p);\n  m_textLabel = a1->m_textLabel;\n  if ( !m_textLabel )\n    goto LABEL_21;\nLABEL_13:\n  if ( v8 || a1->m_placeholderScale <= 0.0 )\n  {\n    m_maxLabelWidth = a1->m_maxLabelWidth;\n    v10 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->getContentSize)(m_textLabel);\n    if ( (float)(m_maxLabelWidth / *v10) <= a1->m_maxLabelScale )\n    {\n      m_maxLabelWidth = a1->m_maxLabelWidth;\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_textLabel->getContentSize)(a1->m_textLabel);\n    }\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->setScale)(m_textLabel);\n    if ( v8 )\n    {\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::ccColor3B *))a1->m_textLabel->setColor)(\n        a1->m_textLabel,\n        &a1->m_textColor);\n      return;\n    }\n  }\n  else\n  {\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *))m_textLabel->setScale)(m_textLabel);\n  }\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, cocos2d::ccColor3B *))a1->m_textLabel->setColor)(\n    a1->m_textLabel,\n    &a1->m_placeholderColor);\n}", "assembly": "; \n; CCTextInputNode::refreshLabel from 0x10009ebc0 to 0x10009eddf (543 bytes)\n; \n; 6 xrefs:\n; > CCTextInputNode::updateLabel @ 0x10009e7c8\n; > CCTextInputNode::setMaxLabelScale @ 0x10009ee0d\n; > CCTextInputNode::setMaxLabelWidth @ 0x10009ee2d\n; > CCTextInputNode::setLabelPlaceholderScale @ 0x10009ee4d\n; > CCTextInputNode::setLabelPlaceholderColor @ 0x10009ee76\n; > CCTextInputNode::setLabelNormalColor @ 0x10009ee96\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\npush    rbp                                                            ; +0x0, 0x10009ebc0\nmov     rbp, rsp                                                       ; +0x1, 0x10009ebc1\npush    r15                                                            ; +0x4, 0x10009ebc4\npush    r14                                                            ; +0x6, 0x10009ebc6\npush    r13                                                            ; +0x8, 0x10009ebc8\npush    r12                                                            ; +0xa, 0x10009ebca\npush    rbx                                                            ; +0xc, 0x10009ebcc\nsub     rsp, 28h                                                       ; +0xd, 0x10009ebcd\nmov     rbx, rdi                                                       ; +0x11, 0x10009ebd1\ncmp     qword ptr [rdi+230h], 0                                        ; +0x14, 0x10009ebd4\njnz     short loc_10009EBEC                                            ; +0x1c, 0x10009ebdc\ncmp     qword ptr [rbx+240h], 0                                        ; +0x1e, 0x10009ebde\njz      loc_10009EDA5                                                  ; +0x26, 0x10009ebe6\nmov     rdi, [rbx+218h]                                                ; +0x2c, 0x10009ebec\nmov     rax, [rdi]                                                     ; +0x33, 0x10009ebf3\ncall    qword ptr [rax+4D0h]                                           ; +0x36, 0x10009ebf6\nmov     r15, rax                                                       ; +0x3c, 0x10009ebfc\nmov     rdi, rax; __s                                                  ; +0x3f, 0x10009ebff\ncall    _strlen                                                        ; +0x42, 0x10009ec02\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x47, 0x10009ec07\njnb     loc_10009EDDA                                                  ; +0x4b, 0x10009ec0b\nmov     r14, rax                                                       ; +0x51, 0x10009ec11\ncmp     rax, 17h                                                       ; +0x54, 0x10009ec14\njnb     short loc_10009EC2C                                            ; +0x58, 0x10009ec18\nlea     eax, [r14+r14]                                                 ; +0x5a, 0x10009ec1a\nmov     byte ptr [rbp+__dst], al                                       ; +0x5e, 0x10009ec1e\nlea     r12, [rbp+__dst+1]                                             ; +0x61, 0x10009ec21\ntest    r14, r14                                                       ; +0x65, 0x10009ec25\njnz     short loc_10009EC5F                                            ; +0x68, 0x10009ec28\njmp     short loc_10009EC6D                                            ; +0x6a, 0x10009ec2a\nmov     rax, r14                                                       ; +0x6c, 0x10009ec2c\nor      rax, 7                                                         ; +0x6f, 0x10009ec2f\nlea     rcx, [rax+1]                                                   ; +0x73, 0x10009ec33\ncmp     rax, 17h                                                       ; +0x77, 0x10009ec37\nmov     r13d, 1Ah                                                      ; +0x7b, 0x10009ec3b\ncmovnz  r13, rcx                                                       ; +0x81, 0x10009ec41\nmov     rdi, r13; __sz                                                 ; +0x85, 0x10009ec45\ncall    __Znwm; operator new(ulong)                                    ; +0x88, 0x10009ec48\nmov     r12, rax                                                       ; +0x8d, 0x10009ec4d\nmov     [rbp+__p], rax                                                 ; +0x90, 0x10009ec50\ninc     r13                                                            ; +0x94, 0x10009ec54\nmov     [rbp+__dst], r13                                               ; +0x97, 0x10009ec57\nmov     [rbp+var_40], r14                                              ; +0x9b, 0x10009ec5b\nmov     rdi, r12; __dst                                                ; +0x9f, 0x10009ec5f\nmov     rsi, r15; __src                                                ; +0xa2, 0x10009ec62\nmov     rdx, r14; __len                                                ; +0xa5, 0x10009ec65\ncall    _memmove                                                       ; +0xa8, 0x10009ec68\nmov     byte ptr [r12+r14], 0                                          ; +0xad, 0x10009ec6d\nmovzx   eax, byte ptr [rbp+__dst]                                      ; +0xb2, 0x10009ec72\nmov     r15d, eax                                                      ; +0xb6, 0x10009ec76\nshr     r15d, 1                                                        ; +0xb9, 0x10009ec79\ntest    al, 1                                                          ; +0xbc, 0x10009ec7c\njnz     loc_10009ED36                                                  ; +0xbe, 0x10009ec7e\njnz     loc_10009ED40                                                  ; +0xc4, 0x10009ec84\nmov     r14, [rbx+230h]                                                ; +0xca, 0x10009ec8a\ntest    r14, r14                                                       ; +0xd1, 0x10009ec91\njz      loc_10009ED59                                                  ; +0xd4, 0x10009ec94\ntest    r15, r15                                                       ; +0xda, 0x10009ec9a\njnz     short loc_10009ECC0                                            ; +0xdd, 0x10009ec9d\nmovss   xmm0, dword ptr [rbx+200h]                                     ; +0xdf, 0x10009ec9f\nxorps   xmm1, xmm1                                                     ; +0xe7, 0x10009eca7\nucomiss xmm0, xmm1                                                     ; +0xea, 0x10009ecaa\njbe     short loc_10009ECC0                                            ; +0xed, 0x10009ecad\nmov     rax, [r14]                                                     ; +0xef, 0x10009ecaf\nmov     rdi, r14                                                       ; +0xf2, 0x10009ecb2\ncall    qword ptr [rax+0A0h]                                           ; +0xf5, 0x10009ecb5\njmp     loc_10009ED7A                                                  ; +0xfb, 0x10009ecbb\nmovss   xmm0, dword ptr [rbx+1F8h]                                     ; +0x100, 0x10009ecc0\nmovss   [rbp+var_2C], xmm0                                             ; +0x108, 0x10009ecc8\nmov     rax, [r14]                                                     ; +0x10d, 0x10009eccd\nmov     rdi, r14                                                       ; +0x110, 0x10009ecd0\ncall    qword ptr [rax+138h]                                           ; +0x113, 0x10009ecd3\nmovss   xmm1, [rbp+var_2C]                                             ; +0x119, 0x10009ecd9\ndivss   xmm1, dword ptr [rax]                                          ; +0x11e, 0x10009ecde\nmovss   xmm0, dword ptr [rbx+1FCh]                                     ; +0x122, 0x10009ece2\nucomiss xmm1, xmm0                                                     ; +0x12a, 0x10009ecea\nja      short loc_10009ED15                                            ; +0x12d, 0x10009eced\nmovss   xmm0, dword ptr [rbx+1F8h]                                     ; +0x12f, 0x10009ecef\nmovss   [rbp+var_2C], xmm0                                             ; +0x137, 0x10009ecf7\nmov     rdi, [rbx+230h]                                                ; +0x13c, 0x10009ecfc\nmov     rax, [rdi]                                                     ; +0x143, 0x10009ed03\ncall    qword ptr [rax+138h]                                           ; +0x146, 0x10009ed06\nmovss   xmm0, [rbp+var_2C]                                             ; +0x14c, 0x10009ed0c\ndivss   xmm0, dword ptr [rax]                                          ; +0x151, 0x10009ed11\nmov     rax, [r14]                                                     ; +0x155, 0x10009ed15\nmov     rdi, r14                                                       ; +0x158, 0x10009ed18\ncall    qword ptr [rax+0A0h]                                           ; +0x15b, 0x10009ed1b\ntest    r15, r15                                                       ; +0x161, 0x10009ed21\njz      short loc_10009ED7A                                            ; +0x164, 0x10009ed24\nmov     rdi, [rbx+230h]                                                ; +0x166, 0x10009ed26\nadd     rbx, 207h                                                      ; +0x16d, 0x10009ed2d\njmp     short loc_10009ED88                                            ; +0x174, 0x10009ed34\nmov     r15, [rbp+var_40]                                              ; +0x176, 0x10009ed36\njz      loc_10009EC8A                                                  ; +0x17a, 0x10009ed3a\nmov     rdi, [rbp+__p]; __p                                            ; +0x180, 0x10009ed40\ncall    __ZdlPv; operator delete(void *)                               ; +0x184, 0x10009ed44\nmov     r14, [rbx+230h]                                                ; +0x189, 0x10009ed49\ntest    r14, r14                                                       ; +0x190, 0x10009ed50\njnz     loc_10009EC9A                                                  ; +0x193, 0x10009ed53\nmov     rdi, [rbx+240h]                                                ; +0x199, 0x10009ed59\ntest    rdi, rdi                                                       ; +0x1a0, 0x10009ed60\njz      short loc_10009EDA5                                            ; +0x1a3, 0x10009ed63\ntest    r15, r15                                                       ; +0x1a5, 0x10009ed65\njz      short loc_10009EDB4                                            ; +0x1a8, 0x10009ed68\nmovzx   eax, word ptr [rbx+207h]                                       ; +0x1aa, 0x10009ed6a\nmovzx   esi, byte ptr [rbx+209h]                                       ; +0x1b1, 0x10009ed71\njmp     short loc_10009EDC2                                            ; +0x1b8, 0x10009ed78\nmov     rdi, [rbx+230h]                                                ; +0x1ba, 0x10009ed7a\nadd     rbx, 204h                                                      ; +0x1c1, 0x10009ed81\nmov     rax, [rdi]                                                     ; +0x1c8, 0x10009ed88\nmov     rax, [rax+420h]                                                ; +0x1cb, 0x10009ed8b\nmov     rsi, rbx                                                       ; +0x1d2, 0x10009ed92\nadd     rsp, 28h                                                       ; +0x1d5, 0x10009ed95\npop     rbx                                                            ; +0x1d9, 0x10009ed99\npop     r12                                                            ; +0x1da, 0x10009ed9a\npop     r13                                                            ; +0x1dc, 0x10009ed9c\npop     r14                                                            ; +0x1de, 0x10009ed9e\npop     r15                                                            ; +0x1e0, 0x10009eda0\npop     rbp                                                            ; +0x1e2, 0x10009eda2\njmp     rax                                                            ; +0x1e3, 0x10009eda3\nadd     rsp, 28h                                                       ; +0x1e5, 0x10009eda5\npop     rbx                                                            ; +0x1e9, 0x10009eda9\npop     r12                                                            ; +0x1ea, 0x10009edaa\npop     r13                                                            ; +0x1ec, 0x10009edac\npop     r14                                                            ; +0x1ee, 0x10009edae\npop     r15                                                            ; +0x1f0, 0x10009edb0\npop     rbp                                                            ; +0x1f2, 0x10009edb2\nretn                                                                   ; +0x1f3, 0x10009edb3\nmovzx   eax, word ptr [rbx+204h]                                       ; +0x1f4, 0x10009edb4\nmovzx   esi, byte ptr [rbx+206h]                                       ; +0x1fb, 0x10009edbb\nshl     esi, 10h                                                       ; +0x202, 0x10009edc2\nor      esi, eax                                                       ; +0x205, 0x10009edc5\nadd     rsp, 28h                                                       ; +0x207, 0x10009edc7\npop     rbx                                                            ; +0x20b, 0x10009edcb\npop     r12                                                            ; +0x20c, 0x10009edcc\npop     r13                                                            ; +0x20e, 0x10009edce\npop     r14                                                            ; +0x210, 0x10009edd0\npop     r15                                                            ; +0x212, 0x10009edd2\npop     rbp                                                            ; +0x214, 0x10009edd4\njmp     TextArea__colorAllLabels                                       ; +0x215, 0x10009edd5\ncall    sub_100006BF0                                                  ; +0x21a, 0x10009edda", "xrefs": ["CCTextInputNode::updateLabel @ 0x10009e7c8", "CCTextInputNode::setMaxLabelScale @ 0x10009ee0d", "CCTextInputNode::setMaxLabelWidth @ 0x10009ee2d", "CCTextInputNode::setLabelPlaceholderScale @ 0x10009ee4d", "CCTextInputNode::setLabelPlaceholderColor @ 0x10009ee76", "CCTextInputNode::setLabelNormalColor @ 0x10009ee96"], "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"}