{"type": "func", "start": 6442772144, "end": 6442772369, "name": "cocos2d::CCLabelTTF::setFontName", "pseudocode": "// \n// cocos2d::CCLabelTTF::setFontName from 0x18004e6b0 to 0x18004e791 (225 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b1cd4\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\n// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::CCLabelTTF::setFontName(cocos2d::CCLabelTTF *this, char *a2)\n{\n  std::string *m_pFontName; // rbx\n  std::string *v5; // rsi\n  unsigned __int64 m_capacity; // rdx\n  char *m_bigStorage; // rcx\n  _QWORD *v8; // rax\n\n  m_pFontName = this->m_pFontName;\n  if ( sub_18004DCF0(m_pFontName, a2) )\n  {\n    v5 = nullptr;\n    if ( m_pFontName )\n    {\n      m_capacity = m_pFontName->m_data.m_capacity;\n      if ( m_capacity > 0xF )\n      {\n        m_bigStorage = m_pFontName->m_data.m_bigStorage;\n        if ( m_capacity + 1 >= 0x1000 )\n        {\n          if ( (unsigned __int64)&m_bigStorage[-*((_QWORD *)m_bigStorage - 1) - 8] > 0x1F )\n            invalid_parameter_noinfo_noreturn();\n          m_bigStorage = *((char **)m_bigStorage - 1);\n        }\n        j_j_free_0(m_bigStorage);\n      }\n      m_pFontName->m_data.m_size = 0;\n      m_pFontName->m_data.m_capacity = 15;\n      m_pFontName->m_data.m_smallStorage._Elems[0] = 0;\n      j_j_free_0(m_pFontName);\n    }\n    v8 = operator new(0x20u);\n    if ( v8 )\n      v5 = (std::string *)sub_180005910(v8, a2);\n    this->m_pFontName = v5;\n    if ( this->m_string.m_data.m_size )\n      cocos2d::CCLabelTTF::updateTexture(this);\n  }\n}", "assembly": "; \n; cocos2d::CCLabelTTF::setFontName from 0x18004e6b0 to 0x18004e791 (225 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b1cd4\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18004e6b0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18004e6b5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x18004e6ba\npush    rdi                                                            ; +0xf, 0x18004e6bf\nsub     rsp, 20h                                                       ; +0x10, 0x18004e6c0\nmov     rbp, rdx                                                       ; +0x14, 0x18004e6c4\nmov     rdi, rcx                                                       ; +0x17, 0x18004e6c7\nmov     rbx, [rcx+270h]                                                ; +0x1a, 0x18004e6ca\nmov     rcx, rbx; Buf1                                                 ; +0x21, 0x18004e6d1\ncall    sub_18004DCF0                                                  ; +0x24, 0x18004e6d4\ntest    eax, eax                                                       ; +0x29, 0x18004e6d9\njz      loc_18004E775                                                  ; +0x2b, 0x18004e6db\nxor     esi, esi                                                       ; +0x31, 0x18004e6e1\ntest    rbx, rbx                                                       ; +0x33, 0x18004e6e3\njz      short loc_18004E73A                                            ; +0x36, 0x18004e6e6\nmov     rdx, [rbx+18h]                                                 ; +0x38, 0x18004e6e8\ncmp     rdx, 0Fh                                                       ; +0x3c, 0x18004e6ec\njbe     short loc_18004E71E                                            ; +0x40, 0x18004e6f0\nmov     rcx, [rbx]                                                     ; +0x42, 0x18004e6f2\ninc     rdx                                                            ; +0x45, 0x18004e6f5\ncmp     rdx, 1000h                                                     ; +0x48, 0x18004e6f8\njb      short loc_18004E719                                            ; +0x4f, 0x18004e6ff\nadd     rdx, 27h ; '''                                                 ; +0x51, 0x18004e701\nmov     r8, [rcx-8]                                                    ; +0x55, 0x18004e705\nsub     rcx, r8                                                        ; +0x59, 0x18004e709\nlea     rax, [rcx-8]                                                   ; +0x5c, 0x18004e70c\ncmp     rax, 1Fh                                                       ; +0x60, 0x18004e710\nja      short loc_18004E78A                                            ; +0x64, 0x18004e714\nmov     rcx, r8; Block                                                 ; +0x66, 0x18004e716\ncall    j_j_free_0                                                     ; +0x69, 0x18004e719\nmov     [rbx+10h], rsi                                                 ; +0x6e, 0x18004e71e\nmov     qword ptr [rbx+18h], 0Fh                                       ; +0x72, 0x18004e722\nmov     [rbx], sil                                                     ; +0x7a, 0x18004e72a\nmov     edx, 20h ; ' '                                                 ; +0x7d, 0x18004e72d\nmov     rcx, rbx; Block                                                ; +0x82, 0x18004e732\ncall    j_j_free_0                                                     ; +0x85, 0x18004e735\nmov     ecx, 20h ; ' '; Size                                           ; +0x8a, 0x18004e73a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x8f, 0x18004e73f\nmov     [rsp+28h+arg_0], rax                                           ; +0x94, 0x18004e744\ntest    rax, rax                                                       ; +0x99, 0x18004e749\njz      short loc_18004E75C                                            ; +0x9c, 0x18004e74c\nmov     rdx, rbp                                                       ; +0x9e, 0x18004e74e\nmov     rcx, rax                                                       ; +0xa1, 0x18004e751\ncall    sub_180005910                                                  ; +0xa4, 0x18004e754\nmov     rsi, rax                                                       ; +0xa9, 0x18004e759\nmov     [rdi+270h], rsi                                                ; +0xac, 0x18004e75c\ncmp     qword ptr [rdi+290h], 0                                        ; +0xb3, 0x18004e763\njbe     short loc_18004E775                                            ; +0xbb, 0x18004e76b\nmov     rcx, rdi; this                                                 ; +0xbd, 0x18004e76d\ncall    ?updateTexture@CCLabelTTF@cocos2d@@AEAA_NXZ; cocos2d::CCLabelTTF::updateTexture(void) ; +0xc0, 0x18004e770\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xc5, 0x18004e775\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xca, 0x18004e77a\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xcf, 0x18004e77f\nadd     rsp, 20h                                                       ; +0xd4, 0x18004e784\npop     rdi                                                            ; +0xd8, 0x18004e788\nretn                                                                   ; +0xd9, 0x18004e789\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xda, 0x18004e78a\ndb 0CCh                                                                ; +0xe0, 0x18004e790", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b1cd4"], "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"}