{"type": "func", "start": 6442764832, "end": 6442764967, "name": "cocos2d::CCLabelBMFont::setString", "pseudocode": "// \n// cocos2d::CCLabelBMFont::setString from 0x18004ca20 to 0x18004caa7 (135 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1800ec5f0\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b1b54\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 cocos2d::CCLabelBMFont::setString(cocos2d::CCLabelBMFont *this, CHAR *a2, int *a3)\n{\n  CHAR *v3; // rbx\n  unsigned __int8 v4; // si\n  size_t v6; // r8\n  unsigned __int16 *v7; // rbx\n\n  v3 = (CHAR *)Buf2;\n  v4 = (unsigned __int8)a3;\n  if ( a2 )\n    v3 = a2;\n  if ( (_BYTE)a3 )\n  {\n    v6 = -1;\n    do\n      ++v6;\n    while ( v3[v6] );\n    sub_180010050((void **)&this->m_sInitialStringUTF8, v3, v6);\n  }\n  v7 = cocos2d::cc_utf8_to_utf16((cocos2d *)v3, nullptr, a3);\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, unsigned __int16 *, _QWORD))this->setString)(this, v7, v4);\n  if ( v7 )\n    j_j_free_0(v7);\n}", "assembly": "; \n; cocos2d::CCLabelBMFont::setString from 0x18004ca20 to 0x18004caa7 (135 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1800ec5f0\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b1b54\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_0], rbx                                               ; +0x0, 0x18004ca20\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18004ca25\npush    rdi                                                            ; +0xa, 0x18004ca2a\nsub     rsp, 20h                                                       ; +0xb, 0x18004ca2b\ntest    rdx, rdx                                                       ; +0xf, 0x18004ca2f\nlea     rbx, Buf2                                                      ; +0x12, 0x18004ca32\nmovzx   esi, r8b                                                       ; +0x19, 0x18004ca39\nmov     rdi, rcx                                                       ; +0x1d, 0x18004ca3d\ncmovnz  rbx, rdx                                                       ; +0x20, 0x18004ca40\ntest    r8b, r8b                                                       ; +0x24, 0x18004ca44\njz      short loc_18004CA69                                            ; +0x27, 0x18004ca47\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x29, 0x18004ca49\ninc     r8; Size                                                       ; +0x30, 0x18004ca50\ncmp     byte ptr [rbx+r8], 0                                           ; +0x33, 0x18004ca53\njnz     short loc_18004CA50                                            ; +0x38, 0x18004ca58\nadd     rcx, 1A8h; void *                                              ; +0x3a, 0x18004ca5a\nmov     rdx, rbx; Src                                                  ; +0x41, 0x18004ca61\ncall    sub_180010050                                                  ; +0x44, 0x18004ca64\nxor     edx, edx; char *                                               ; +0x49, 0x18004ca69\nmov     rcx, rbx; this                                                 ; +0x4b, 0x18004ca6b\ncall    ?cc_utf8_to_utf16@cocos2d@@YAPEAGPEBDPEAH@Z; cocos2d::cc_utf8_to_utf16(char const *,int *) ; +0x4e, 0x18004ca6e\nmov     r9, [rdi]                                                      ; +0x53, 0x18004ca73\nmovzx   r8d, sil                                                       ; +0x56, 0x18004ca76\nmov     rdx, rax                                                       ; +0x5a, 0x18004ca7a\nmov     rcx, rdi                                                       ; +0x5d, 0x18004ca7d\nmov     rbx, rax                                                       ; +0x60, 0x18004ca80\ncall    qword ptr [r9+368h]                                            ; +0x63, 0x18004ca83\ntest    rbx, rbx                                                       ; +0x6a, 0x18004ca8a\njz      short loc_18004CA97                                            ; +0x6d, 0x18004ca8d\nmov     rcx, rbx; Block                                                ; +0x6f, 0x18004ca8f\ncall    j_j_free_0                                                     ; +0x72, 0x18004ca92\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x77, 0x18004ca97\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x7c, 0x18004ca9c\nadd     rsp, 20h                                                       ; +0x81, 0x18004caa1\npop     rdi                                                            ; +0x85, 0x18004caa5\nretn                                                                   ; +0x86, 0x18004caa6", "xrefs": ["<???> @ 0x1800ec5f0", "<???> @ 0x1801438a8", "<???> @ 0x1801b1b54"], "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"}