{"type": "func", "start": 4069756, "end": 4070102, "name": "CCTextInputNode::refreshLabel", "pseudocode": "// \n// CCTextInputNode::refreshLabel from 0x3e197c to 0x3e1ad6 (346 bytes)\n// \n// 7 xrefs:\n// > CCTextInputNode::setMaxLabelScale @ 0x3e1ae4\n// > CCTextInputNode::setMaxLabelWidth @ 0x3e1aec\n// > CCTextInputNode::setLabelPlaceholderScale @ 0x3e1af4\n// > CCTextInputNode::setLabelPlaceholderColor @ 0x3e1b06\n// > CCTextInputNode::setLabelNormalColor @ 0x3e1b20\n// > CCTextInputNode::updateLabel @ 0x3e2fde\n// > CCTextInputNode::updateLabel @ 0x3e314c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:47:02 +0000\n// \n\nunsigned int __fastcall CCTextInputNode::refreshLabel(unsigned int this)\n{\n  unsigned int v1; // r4\n  const char *v2; // r0\n  const char *v3; // r7\n  size_t v4; // r0\n  _BOOL4 v5; // r7\n  int *v6; // r5\n  int v7; // r3\n  void (__fastcall *v8)(int *, _DWORD); // r8\n  float v9; // s16\n  float *v10; // r0\n  float v11; // s15\n  float v12; // s16\n  int (*v13)(void); // r3\n  int v14; // r1\n  int v15[3]; // [sp+4h] [bp-20h] BYREF\n  int v16[3]; // [sp+10h] [bp-14h] BYREF\n\n  v1 = this;\n  if ( *(_DWORD *)(this + 428) || *(_DWORD *)(this + 436) )\n  {\n    v2 = (const char *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(this + 416) + 624))(*(_DWORD *)(this + 416));\n    memset(v15, 0, sizeof(v15));\n    v3 = v2;\n    v4 = strlen(v2);\n    std::string::__init(v15, v3, v4);\n    memset(v16, 0, sizeof(v16));\n    std::string::__init(v16, &unk_B6B226, 0);\n    v5 = sub_3DC1CE((unsigned __int8 *)v15, (unsigned __int8 *)v16);\n    std::string::~string((int)v16);\n    std::string::~string((int)v15);\n    v6 = *(int **)(v1 + 428);\n    if ( v6 )\n    {\n      v7 = *v6;\n      if ( v5 && *(float *)(v1 + 400) > 0.0 )\n      {\n        (*(void (__fastcall **)(_DWORD, _DWORD))(v7 + 80))(*(_DWORD *)(v1 + 428), *(_DWORD *)(v1 + 400));\n      }\n      else\n      {\n        v8 = *(void (__fastcall **)(int *, _DWORD))(v7 + 80);\n        v9 = *(float *)(v1 + 392);\n        v10 = (float *)(*(int (__fastcall **)(_DWORD))(v7 + 164))(*(_DWORD *)(v1 + 428));\n        v11 = *(float *)(v1 + 396);\n        if ( (float)(v9 / *v10) <= v11 )\n        {\n          v6 = *(int **)(v1 + 428);\n          v12 = *(float *)(v1 + 392);\n          v11 = v12 / *(float *)(*(int (__fastcall **)(int *))(*v6 + 164))(v6);\n        }\n        v8(v6, LODWORD(v11));\n        if ( !v5 )\n        {\n          v13 = *(int (**)(void))(**(_DWORD **)(v1 + 428) + 536);\n          return v13();\n        }\n      }\n      v13 = *(int (**)(void))(**(_DWORD **)(v1 + 428) + 536);\n      return v13();\n    }\n    this = *(_DWORD *)(v1 + 436);\n    if ( this )\n    {\n      if ( v5 )\n        v14 = *(_DWORD *)(v1 + 404);\n      else\n        v14 = *(unsigned __int8 *)(v1 + 407)\n            | (*(unsigned __int8 *)(v1 + 408) << 8)\n            | (*(unsigned __int8 *)(v1 + 409) << 16);\n      return TextArea::colorAllLabels(this, v14);\n    }\n  }\n  return this;\n}", "assembly": "; \n; CCTextInputNode::refreshLabel from 0x3e197c to 0x3e1ad6 (346 bytes)\n; \n; 7 xrefs:\n; > CCTextInputNode::setMaxLabelScale @ 0x3e1ae4\n; > CCTextInputNode::setMaxLabelWidth @ 0x3e1aec\n; > CCTextInputNode::setLabelPlaceholderScale @ 0x3e1af4\n; > CCTextInputNode::setLabelPlaceholderColor @ 0x3e1b06\n; > CCTextInputNode::setLabelNormalColor @ 0x3e1b20\n; > CCTextInputNode::updateLabel @ 0x3e2fde\n; > CCTextInputNode::updateLabel @ 0x3e314c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:47:02 +0000\n; \nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x3e197c\nMOV             R4, R0                                                 ; +0x4, 0x3e1980\nVPUSH           {D8}                                                   ; +0x6, 0x3e1982\nLDR             R6, =(__stack_chk_guard_ptr - 0x3E198C)                ; +0xa, 0x3e1986\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xc, 0x3e1988\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xe, 0x3e198a\nSUB             SP, SP, #0x24                                          ; +0x10, 0x3e198c\nLDR             R3, [R6]                                               ; +0x12, 0x3e198e\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x14, 0x3e1990\nLDR.W           R3, [R0,#0x1AC]                                        ; +0x16, 0x3e1992\nCBNZ            R3, loc_3E19A2                                         ; +0x1a, 0x3e1996\nLDR.W           R3, [R0,#0x1B4]                                        ; +0x1c, 0x3e1998\nCMP             R3, #0                                                 ; +0x20, 0x3e199c\nBEQ.W           loc_3E1AC0                                             ; +0x22, 0x3e199e\nLDR.W           R0, [R4,#0x1A0]                                        ; +0x26, 0x3e19a2\nMOVS            R5, #0                                                 ; +0x2a, 0x3e19a6\nADD.W           R8, SP, #0x24+var_20                                   ; +0x2c, 0x3e19a8\nADD.W           R9, SP, #0x24+var_14                                   ; +0x30, 0x3e19ac\nLDR             R3, [R0]                                               ; +0x34, 0x3e19b0\nLDR.W           R3, [R3,#0x270]                                        ; +0x36, 0x3e19b2\nBLX             R3                                                     ; +0x3a, 0x3e19b6\nSTR             R5, [SP,#0x24+var_20]                                  ; +0x3c, 0x3e19b8\nSTR             R5, [SP,#0x24+var_1C]                                  ; +0x3e, 0x3e19ba\nSTR             R5, [SP,#0x24+var_18]                                  ; +0x40, 0x3e19bc\nMOV             R7, R0                                                 ; +0x42, 0x3e19be\nBLX             strlen                                                 ; +0x44, 0x3e19c0\nMOV             R1, R7                                                 ; +0x48, 0x3e19c4\nMOV             R2, R0                                                 ; +0x4a, 0x3e19c6\nMOV             R0, R8                                                 ; +0x4c, 0x3e19c8\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x4e, 0x3e19ca\nLDR             R1, =(unk_B6B226 - 0x3E19D8)                           ; +0x52, 0x3e19ce\nMOV             R0, R9                                                 ; +0x54, 0x3e19d0\nMOV             R2, R5                                                 ; +0x56, 0x3e19d2\nADD             R1, PC; unk_B6B226                                     ; +0x58, 0x3e19d4\nSTR             R5, [SP,#0x24+var_14]                                  ; +0x5a, 0x3e19d6\nSTR             R5, [SP,#0x24+var_10]                                  ; +0x5c, 0x3e19d8\nSTR             R5, [SP,#0x24+var_C]                                   ; +0x5e, 0x3e19da\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcj; std::string::__init(char const*,uint) ; +0x60, 0x3e19dc\nMOV             R1, R9                                                 ; +0x64, 0x3e19e0\nMOV             R0, R8                                                 ; +0x66, 0x3e19e2\nBL              sub_3DC1CE                                             ; +0x68, 0x3e19e4\nMOV             R7, R0                                                 ; +0x6c, 0x3e19e8\nMOV             R0, R9                                                 ; +0x6e, 0x3e19ea\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x70, 0x3e19ec\nMOV             R0, R8                                                 ; +0x74, 0x3e19f0\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x76, 0x3e19f2\nLDR.W           R5, [R4,#0x1AC]                                        ; +0x7a, 0x3e19f6\nCMP             R5, #0                                                 ; +0x7e, 0x3e19fa\nBEQ             loc_3E1A88                                             ; +0x80, 0x3e19fc\nLDR             R3, [R5]                                               ; +0x82, 0x3e19fe\nCBZ             R7, loc_3E1A1C                                         ; +0x84, 0x3e1a00\nVLDR            S15, [R4,#0x190]                                       ; +0x86, 0x3e1a02\nVCMPE.F32       S15, #0.0                                              ; +0x8a, 0x3e1a06\nVMRS            APSR_nzcv, FPSCR                                       ; +0x8e, 0x3e1a0a\nBLE             loc_3E1A1C                                             ; +0x92, 0x3e1a0e\nLDR             R3, [R3,#0x50]                                         ; +0x94, 0x3e1a10\nMOV             R0, R5                                                 ; +0x96, 0x3e1a12\nVMOV            R1, S15                                                ; +0x98, 0x3e1a14\nBLX             R3                                                     ; +0x9c, 0x3e1a18\nB               loc_3E1A66                                             ; +0x9e, 0x3e1a1a\nLDR.W           R8, [R3,#0x50]                                         ; +0xa0, 0x3e1a1c\nMOV             R0, R5                                                 ; +0xa4, 0x3e1a20\nLDR.W           R3, [R3,#0xA4]                                         ; +0xa6, 0x3e1a22\nVLDR            S16, [R4,#0x188]                                       ; +0xaa, 0x3e1a26\nBLX             R3                                                     ; +0xae, 0x3e1a2a\nVLDR            S15, [R4,#0x18C]                                       ; +0xb0, 0x3e1a2c\nVLDR            S14, [R0]                                              ; +0xb4, 0x3e1a30\nVDIV.F32        S16, S16, S14                                          ; +0xb8, 0x3e1a34\nVCMPE.F32       S16, S15                                               ; +0xbc, 0x3e1a38\nVMRS            APSR_nzcv, FPSCR                                       ; +0xc0, 0x3e1a3c\nBGT             loc_3E1A5C                                             ; +0xc4, 0x3e1a40\nLDR.W           R5, [R4,#0x1AC]                                        ; +0xc6, 0x3e1a42\nVLDR            S16, [R4,#0x188]                                       ; +0xca, 0x3e1a46\nLDR             R3, [R5]                                               ; +0xce, 0x3e1a4a\nMOV             R0, R5                                                 ; +0xd0, 0x3e1a4c\nLDR.W           R3, [R3,#0xA4]                                         ; +0xd2, 0x3e1a4e\nBLX             R3                                                     ; +0xd6, 0x3e1a52\nVLDR            S15, [R0]                                              ; +0xd8, 0x3e1a54\nVDIV.F32        S15, S16, S15                                          ; +0xdc, 0x3e1a58\nMOV             R0, R5                                                 ; +0xe0, 0x3e1a5c\nVMOV            R1, S15                                                ; +0xe2, 0x3e1a5e\nBLX             R8                                                     ; +0xe6, 0x3e1a62\nCBZ             R7, loc_3E1A76                                         ; +0xe8, 0x3e1a64\nLDR.W           R0, [R4,#0x1AC]                                        ; +0xea, 0x3e1a66\nADD.W           R1, R4, #0x194                                         ; +0xee, 0x3e1a6a\nLDR             R3, [R0]                                               ; +0xf2, 0x3e1a6e\nLDR.W           R3, [R3,#0x218]                                        ; +0xf4, 0x3e1a70\nB               loc_3E1A84                                             ; +0xf8, 0x3e1a74\nLDR.W           R0, [R4,#0x1AC]                                        ; +0xfa, 0x3e1a76\nADDW            R1, R4, #0x197                                         ; +0xfe, 0x3e1a7a\nLDR             R3, [R0]                                               ; +0x102, 0x3e1a7e\nLDR.W           R3, [R3,#0x218]                                        ; +0x104, 0x3e1a80\nBLX             R3                                                     ; +0x108, 0x3e1a84\nB               loc_3E1AC0                                             ; +0x10a, 0x3e1a86\nLDR.W           R0, [R4,#0x1B4]                                        ; +0x10c, 0x3e1a88\nCBZ             R0, loc_3E1AC0                                         ; +0x110, 0x3e1a8c\nCBZ             R7, loc_3E1A96                                         ; +0x112, 0x3e1a8e\nLDR.W           R1, [R4,#0x194]                                        ; +0x114, 0x3e1a90\nB               loc_3E1AB0                                             ; +0x118, 0x3e1a94\nLDRB.W          R1, [R4,#0x198]                                        ; +0x11a, 0x3e1a96\nAND.W           R7, R7, #0xFF000000                                    ; +0x11e, 0x3e1a9a\nLDRB.W          R3, [R4,#0x197]                                        ; +0x122, 0x3e1a9e\nORR.W           R1, R3, R1,LSL#8                                       ; +0x126, 0x3e1aa2\nLDRB.W          R3, [R4,#0x199]                                        ; +0x12a, 0x3e1aa6\nORR.W           R1, R1, R3,LSL#16                                      ; +0x12e, 0x3e1aaa\nORRS            R1, R7                                                 ; +0x132, 0x3e1aae\nBL              _ZN8TextArea14colorAllLabelsEN7cocos2d10_ccColor3BE; TextArea::colorAllLabels(cocos2d::_ccColor3B) ; +0x134, 0x3e1ab0\nB               loc_3E1AC0                                             ; +0x138, 0x3e1ab4\nMOV             R0, R8                                                 ; +0x13a, 0x3e1ab6\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x13c, 0x3e1ab8\nBL              __cxa_end_cleanup                                      ; +0x140, 0x3e1abc\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x144, 0x3e1ac0\nLDR             R3, [R6]                                               ; +0x146, 0x3e1ac2\nCMP             R2, R3                                                 ; +0x148, 0x3e1ac4\nBEQ             loc_3E1ACC                                             ; +0x14a, 0x3e1ac6\nBLX             __stack_chk_fail                                       ; +0x14c, 0x3e1ac8\nADD             SP, SP, #0x24 ; '$'                                    ; +0x150, 0x3e1acc\nVPOP            {D8}                                                   ; +0x152, 0x3e1ace\nPOP.W           {R4-R9,PC}                                             ; +0x156, 0x3e1ad2", "xrefs": ["CCTextInputNode::setMaxLabelScale @ 0x3e1ae4", "CCTextInputNode::setMaxLabelWidth @ 0x3e1aec", "CCTextInputNode::setLabelPlaceholderScale @ 0x3e1af4", "CCTextInputNode::setLabelPlaceholderColor @ 0x3e1b06", "CCTextInputNode::setLabelNormalColor @ 0x3e1b20", "CCTextInputNode::updateLabel @ 0x3e2fde", "CCTextInputNode::updateLabel @ 0x3e314c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}