{"type": "func", "start": 6442770752, "end": 6442770983, "name": "cocos2d::CCLabelBMFont::setFntFile", "pseudocode": "// \n// cocos2d::CCLabelBMFont::setFntFile from 0x18004e140 to 0x18004e227 (231 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x180140c50\n// > <???> @ 0x180140c84\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bbcd4\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:21:44 +0000\n// \n\nvoid __fastcall cocos2d::CCLabelBMFont::setFntFile(cocos2d::CCLabelBMFont *this, cocos2d *a2)\n{\n  const char *v3; // rdx\n  const char *v5; // rdx\n  cocos2d::CCObject *File; // rsi\n  size_t v7; // rax\n  cocos2d::CCObject *v8; // rcx\n  char *v9; // rsi\n  __int64 v10; // rbx\n  cocos2d::CCTextureCache *v11; // rax\n  struct cocos2d::CCTexture2D *v12; // rax\n\n  if ( a2 )\n  {\n    v3 = (char *)this + 384;\n    if ( *((_QWORD *)this + 51) > 0xFu )\n      v3 = *((const char **)this + 48);\n    if ( strcmp((const char *)a2, v3) )\n    {\n      File = cocos2d::FNTConfigLoadFile(a2, v5);\n      v7 = strlen((const char *)a2);\n      sub_1800101E0((void **)this + 48, a2, v7);\n      if ( File )\n        cocos2d::CCObject::retain(File);\n      v8 = *((cocos2d::CCObject **)this + 58);\n      if ( v8 )\n        cocos2d::CCObject::release(v8);\n      *((_QWORD *)this + 58) = File;\n      v9 = (char *)File + 88;\n      if ( *((_QWORD *)v9 + 3) > 0xFu )\n        v9 = *(char **)v9;\n      v10 = *((_QWORD *)this + 40);\n      v11 = cocos2d::CCTextureCache::sharedTextureCache();\n      v12 = cocos2d::CCTextureCache::addImage(v11, v9, 0);\n      (*(void (__fastcall **)(char *, struct cocos2d::CCTexture2D *))(v10 + 24))((char *)this + 320, v12);\n      cocos2d::CCLabelBMFont::createFontChars(this);\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCLabelBMFont::setFntFile from 0x18004e140 to 0x18004e227 (231 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x180140c50\n; > <???> @ 0x180140c84\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bbcd4\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:21:44 +0000\n; \ntest    rdx, rdx                                                       ; +0x0, 0x18004e140\njz      locret_18004E226                                               ; +0x3, 0x18004e143\nmov     [rsp+arg_10], rbp                                              ; +0x9, 0x18004e149\npush    rdi                                                            ; +0xe, 0x18004e14e\nsub     rsp, 20h                                                       ; +0xf, 0x18004e14f\ncmp     qword ptr [rcx+198h], 0Fh                                      ; +0x13, 0x18004e153\nmov     rdi, rdx                                                       ; +0x1b, 0x18004e15b\nlea     rdx, [rcx+180h]                                                ; +0x1e, 0x18004e15e\nmov     [rsp+28h+arg_0], rbx                                           ; +0x25, 0x18004e165\nmov     rbp, rcx                                                       ; +0x2a, 0x18004e16a\njbe     short loc_18004E176                                            ; +0x2d, 0x18004e16d\nmov     rdx, [rcx+180h]; Str2                                          ; +0x2f, 0x18004e16f\nmov     rcx, rdi; Str1                                                 ; +0x36, 0x18004e176\ncall    strcmp                                                         ; +0x39, 0x18004e179\ntest    eax, eax                                                       ; +0x3e, 0x18004e17e\njz      loc_18004E217                                                  ; +0x40, 0x18004e180\nmov     rcx, rdi; this                                                 ; +0x46, 0x18004e186\nmov     [rsp+28h+arg_8], rsi                                           ; +0x49, 0x18004e189\ncall    ?FNTConfigLoadFile@cocos2d@@YAPEAVCCBMFontConfiguration@1@PEBD@Z; cocos2d::FNTConfigLoadFile(char const *) ; +0x4e, 0x18004e18e\nmov     rcx, rdi; Str                                                  ; +0x53, 0x18004e193\nmov     rsi, rax                                                       ; +0x56, 0x18004e196\ncall    strlen                                                         ; +0x59, 0x18004e199\nmov     r8, rax; Size                                                  ; +0x5e, 0x18004e19e\nlea     rcx, [rbp+180h]; void *                                        ; +0x61, 0x18004e1a1\nmov     rdx, rdi; Src                                                  ; +0x68, 0x18004e1a8\ncall    sub_1800101E0                                                  ; +0x6b, 0x18004e1ab\ntest    rsi, rsi                                                       ; +0x70, 0x18004e1b0\njz      short loc_18004E1BD                                            ; +0x73, 0x18004e1b3\nmov     rcx, rsi; this                                                 ; +0x75, 0x18004e1b5\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x78, 0x18004e1b8\nmov     rcx, [rbp+1D0h]; this                                          ; +0x7d, 0x18004e1bd\ntest    rcx, rcx                                                       ; +0x84, 0x18004e1c4\njz      short loc_18004E1CE                                            ; +0x87, 0x18004e1c7\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x89, 0x18004e1c9\nmov     [rbp+1D0h], rsi                                                ; +0x8e, 0x18004e1ce\nadd     rsi, 58h ; 'X'                                                 ; +0x95, 0x18004e1d5\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0x99, 0x18004e1d9\njbe     short loc_18004E1E3                                            ; +0x9e, 0x18004e1de\nmov     rsi, [rsi]                                                     ; +0xa0, 0x18004e1e0\nmov     rbx, [rbp+140h]                                                ; +0xa3, 0x18004e1e3\ncall    ?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0xaa, 0x18004e1ea\nmov     rcx, rax; this                                                 ; +0xaf, 0x18004e1ef\nxor     r8d, r8d; bool                                                 ; +0xb2, 0x18004e1f2\nmov     rdx, rsi; char *                                               ; +0xb5, 0x18004e1f5\ncall    ?addImage@CCTextureCache@cocos2d@@QEAAPEAVCCTexture2D@2@PEBD_N@Z; cocos2d::CCTextureCache::addImage(char const *,bool) ; +0xb8, 0x18004e1f8\nmov     rdx, rax                                                       ; +0xbd, 0x18004e1fd\nlea     rcx, [rbp+140h]                                                ; +0xc0, 0x18004e200\ncall    qword ptr [rbx+18h]                                            ; +0xc7, 0x18004e207\nmov     rcx, rbp; this                                                 ; +0xca, 0x18004e20a\ncall    ?createFontChars@CCLabelBMFont@cocos2d@@QEAAXXZ; cocos2d::CCLabelBMFont::createFontChars(void) ; +0xcd, 0x18004e20d\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xd2, 0x18004e212\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xd7, 0x18004e217\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xdc, 0x18004e21c\nadd     rsp, 20h                                                       ; +0xe1, 0x18004e221\npop     rdi                                                            ; +0xe5, 0x18004e225\nretn                                                                   ; +0xe6, 0x18004e226", "xrefs": ["<???> @ 0x180140c50", "<???> @ 0x180140c84", "<???> @ 0x18014cf68", "<???> @ 0x1801bbcd4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}