{"type": "func", "start": 4298556416, "end": 4298556580, "name": "GameManager::loadFont", "pseudocode": "// \n// GameManager::loadFont from 0x10036c400 to 0x10036c4a4 (164 bytes)\n// \n// 6 xrefs:\n// > PlayLayer::prepareCreateObjectsFromSetup @ 0x10007a725\n// > LevelEditorLayer::createObjectsFromSetup @ 0x1000abd36\n// > SelectFontLayer::updateFontLabel @ 0x100285766\n// > GameManager::getFontFile @ 0x10036c4ce\n// > GameManager::getFontTexture @ 0x10036c51e\n// > SecretLayer5::init @ 0x10046f50f\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 12:29:00 +0000\n// \n\n__int64 __fastcall GameManager::loadFont(__int64 a1, int a2)\n{\n  int v2; // eax\n  int v3; // r14d\n  __int64 result; // rax\n  __int64 v6; // rdi\n  __int64 CString; // r15\n  __int64 v8; // rax\n  __int64 v9; // rdi\n  __int64 v10; // r15\n  __int64 v11; // rax\n  char v12; // [rsp+0h] [rbp-20h]\n\n  v2 = 59;\n  if ( a2 < 59 )\n    v2 = a2;\n  v3 = 0;\n  if ( v2 > 0 )\n    v3 = v2;\n  result = *(unsigned int *)(a1 + 992);\n  if ( v3 != (_DWORD)result )\n  {\n    if ( (_DWORD)result )\n    {\n      v6 = sub_10088E820(\"gjFont%02d.png\", v12);\n      CString = cocos2d::CCString::getCString(v6);\n      v8 = cocos2d::CCTextureCache::sharedTextureCache(v6);\n      result = cocos2d::CCTextureCache::removeTextureForKey(v8, CString);\n    }\n    if ( a2 > 0 )\n    {\n      v9 = sub_10088E820(\"gjFont%02d.png\", v12);\n      v10 = cocos2d::CCString::getCString(v9);\n      v11 = cocos2d::CCTextureCache::sharedTextureCache(v9);\n      result = cocos2d::CCTextureCache::addImage(v11, v10, 0);\n    }\n    *(_DWORD *)(a1 + 992) = v3;\n  }\n  return result;\n}", "assembly": "; \n; GameManager::loadFont from 0x10036c400 to 0x10036c4a4 (164 bytes)\n; \n; 6 xrefs:\n; > PlayLayer::prepareCreateObjectsFromSetup @ 0x10007a725\n; > LevelEditorLayer::createObjectsFromSetup @ 0x1000abd36\n; > SelectFontLayer::updateFontLabel @ 0x100285766\n; > GameManager::getFontFile @ 0x10036c4ce\n; > GameManager::getFontTexture @ 0x10036c51e\n; > SecretLayer5::init @ 0x10046f50f\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 12:29:00 +0000\n; \npush    rbp                                                            ; +0x0, 0x10036c400\nmov     rbp, rsp                                                       ; +0x1, 0x10036c401\npush    r15                                                            ; +0x4, 0x10036c404\npush    r14                                                            ; +0x6, 0x10036c406\npush    r12                                                            ; +0x8, 0x10036c408\npush    rbx; char                                                      ; +0xa, 0x10036c40a\ncmp     esi, 3Bh ; ';'                                                 ; +0xb, 0x10036c40b\nmov     eax, 3Bh ; ';'                                                 ; +0xe, 0x10036c40e\ncmovl   eax, esi                                                       ; +0x13, 0x10036c413\nxor     r14d, r14d                                                     ; +0x16, 0x10036c416\ntest    eax, eax                                                       ; +0x19, 0x10036c419\ncmovg   r14d, eax                                                      ; +0x1b, 0x10036c41b\nmov     eax, [rdi+3E0h]                                                ; +0x1f, 0x10036c41f\ncmp     r14d, eax                                                      ; +0x25, 0x10036c425\njz      short loc_10036C49B                                            ; +0x28, 0x10036c428\nmov     rbx, rdi                                                       ; +0x2a, 0x10036c42a\ntest    eax, eax                                                       ; +0x2d, 0x10036c42d\njz      short loc_10036C462                                            ; +0x2f, 0x10036c42f\nlea     rdi, aGjfont02dPng; \"gjFont%02d.png\"                           ; +0x31, 0x10036c431\nmov     r12d, esi                                                      ; +0x38, 0x10036c438\nmov     esi, eax                                                       ; +0x3b, 0x10036c43b\nxor     eax, eax                                                       ; +0x3d, 0x10036c43d\ncall    sub_10088E820                                                  ; +0x3f, 0x10036c43f\nmov     rdi, rax                                                       ; +0x44, 0x10036c444\ncall    cocos2d__CCString__getCString                                  ; +0x47, 0x10036c447\nmov     r15, rax                                                       ; +0x4c, 0x10036c44c\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x4f, 0x10036c44f\nmov     rdi, rax                                                       ; +0x54, 0x10036c454\nmov     rsi, r15                                                       ; +0x57, 0x10036c457\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x5a, 0x10036c45a\nmov     esi, r12d                                                      ; +0x5f, 0x10036c45f\ntest    esi, esi                                                       ; +0x62, 0x10036c462\njle     short loc_10036C494                                            ; +0x64, 0x10036c464\nlea     rdi, aGjfont02dPng; \"gjFont%02d.png\"                           ; +0x66, 0x10036c466\nmov     esi, r14d                                                      ; +0x6d, 0x10036c46d\nxor     eax, eax                                                       ; +0x70, 0x10036c470\ncall    sub_10088E820                                                  ; +0x72, 0x10036c472\nmov     rdi, rax                                                       ; +0x77, 0x10036c477\ncall    cocos2d__CCString__getCString                                  ; +0x7a, 0x10036c47a\nmov     r15, rax                                                       ; +0x7f, 0x10036c47f\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x82, 0x10036c482\nmov     rdi, rax                                                       ; +0x87, 0x10036c487\nmov     rsi, r15                                                       ; +0x8a, 0x10036c48a\nxor     edx, edx                                                       ; +0x8d, 0x10036c48d\ncall    cocos2d__CCTextureCache__addImage                              ; +0x8f, 0x10036c48f\nmov     [rbx+3E0h], r14d                                               ; +0x94, 0x10036c494\npop     rbx                                                            ; +0x9b, 0x10036c49b\npop     r12                                                            ; +0x9c, 0x10036c49c\npop     r14                                                            ; +0x9e, 0x10036c49e\npop     r15                                                            ; +0xa0, 0x10036c4a0\npop     rbp                                                            ; +0xa2, 0x10036c4a2\nretn                                                                   ; +0xa3, 0x10036c4a3", "xrefs": ["PlayLayer::prepareCreateObjectsFromSetup @ 0x10007a725", "LevelEditorLayer::createObjectsFromSetup @ 0x1000abd36", "SelectFontLayer::updateFontLabel @ 0x100285766", "GameManager::getFontFile @ 0x10036c4ce", "GameManager::getFontTexture @ 0x10036c51e", "SecretLayer5::init @ 0x10046f50f"], "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"}