{"type": "func", "start": 4298649632, "end": 4298649796, "name": "GameManager::loadFont", "pseudocode": "// \n// GameManager::loadFont from 0x100383020 to 0x1003830c4 (164 bytes)\n// \n// 6 xrefs:\n// > PlayLayer::prepareCreateObjectsFromSetup @ 0x1000ad265\n// > LevelEditorLayer::createObjectsFromSetup @ 0x1000dce16\n// > SelectFontLayer::updateFontLabel @ 0x10029a666\n// > GameManager::getFontFile @ 0x1003830ee\n// > GameManager::getFontTexture @ 0x10038313e\n// > SecretLayer5::init @ 0x10047abaf\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 GameManager::loadFont(GameManager *a1, int a2)\n{\n  int v2; // eax\n  int v3; // r14d\n  int m_loadedFont; // eax\n  cocos2d::CCString *v5; // rax\n  const char *CString; // r15\n  cocos2d::CCTextureCache *v7; // rax\n  cocos2d::CCString *v8; // rax\n  const char *v9; // r15\n  cocos2d::CCTextureCache *v10; // rax\n  char v11; // [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  m_loadedFont = a1->m_loadedFont;\n  if ( v3 != m_loadedFont )\n  {\n    if ( m_loadedFont )\n    {\n      v5 = (cocos2d::CCString *)sub_1007AB580(\"gjFont%02d.png\", v11);\n      CString = cocos2d::CCString::getCString(v5);\n      v7 = cocos2d::CCTextureCache::sharedTextureCache();\n      cocos2d::CCTextureCache::removeTextureForKey(v7, CString);\n    }\n    if ( a2 > 0 )\n    {\n      v8 = (cocos2d::CCString *)sub_1007AB580(\"gjFont%02d.png\", v11);\n      v9 = cocos2d::CCString::getCString(v8);\n      v10 = cocos2d::CCTextureCache::sharedTextureCache();\n      cocos2d::CCTextureCache::addImage(v10, v9, 0);\n    }\n    a1->m_loadedFont = v3;\n  }\n}", "assembly": "; \n; GameManager::loadFont from 0x100383020 to 0x1003830c4 (164 bytes)\n; \n; 6 xrefs:\n; > PlayLayer::prepareCreateObjectsFromSetup @ 0x1000ad265\n; > LevelEditorLayer::createObjectsFromSetup @ 0x1000dce16\n; > SelectFontLayer::updateFontLabel @ 0x10029a666\n; > GameManager::getFontFile @ 0x1003830ee\n; > GameManager::getFontTexture @ 0x10038313e\n; > SecretLayer5::init @ 0x10047abaf\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\npush    rbp                                                            ; +0x0, 0x100383020\nmov     rbp, rsp                                                       ; +0x1, 0x100383021\npush    r15                                                            ; +0x4, 0x100383024\npush    r14                                                            ; +0x6, 0x100383026\npush    r12                                                            ; +0x8, 0x100383028\npush    rbx; char                                                      ; +0xa, 0x10038302a\ncmp     esi, 3Bh ; ';'                                                 ; +0xb, 0x10038302b\nmov     eax, 3Bh ; ';'                                                 ; +0xe, 0x10038302e\ncmovl   eax, esi                                                       ; +0x13, 0x100383033\nxor     r14d, r14d                                                     ; +0x16, 0x100383036\ntest    eax, eax                                                       ; +0x19, 0x100383039\ncmovg   r14d, eax                                                      ; +0x1b, 0x10038303b\nmov     eax, [rdi+3ACh]                                                ; +0x1f, 0x10038303f\ncmp     r14d, eax                                                      ; +0x25, 0x100383045\njz      short loc_1003830BB                                            ; +0x28, 0x100383048\nmov     rbx, rdi                                                       ; +0x2a, 0x10038304a\ntest    eax, eax                                                       ; +0x2d, 0x10038304d\njz      short loc_100383082                                            ; +0x2f, 0x10038304f\nlea     rdi, aGjfont02dPng; \"gjFont%02d.png\"                           ; +0x31, 0x100383051\nmov     r12d, esi                                                      ; +0x38, 0x100383058\nmov     esi, eax                                                       ; +0x3b, 0x10038305b\nxor     eax, eax                                                       ; +0x3d, 0x10038305d\ncall    sub_1007AB580                                                  ; +0x3f, 0x10038305f\nmov     rdi, rax                                                       ; +0x44, 0x100383064\ncall    cocos2d__CCString__getCString                                  ; +0x47, 0x100383067\nmov     r15, rax                                                       ; +0x4c, 0x10038306c\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x4f, 0x10038306f\nmov     rdi, rax                                                       ; +0x54, 0x100383074\nmov     rsi, r15                                                       ; +0x57, 0x100383077\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x5a, 0x10038307a\nmov     esi, r12d                                                      ; +0x5f, 0x10038307f\ntest    esi, esi                                                       ; +0x62, 0x100383082\njle     short loc_1003830B4                                            ; +0x64, 0x100383084\nlea     rdi, aGjfont02dPng; \"gjFont%02d.png\"                           ; +0x66, 0x100383086\nmov     esi, r14d                                                      ; +0x6d, 0x10038308d\nxor     eax, eax                                                       ; +0x70, 0x100383090\ncall    sub_1007AB580                                                  ; +0x72, 0x100383092\nmov     rdi, rax                                                       ; +0x77, 0x100383097\ncall    cocos2d__CCString__getCString                                  ; +0x7a, 0x10038309a\nmov     r15, rax                                                       ; +0x7f, 0x10038309f\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x82, 0x1003830a2\nmov     rdi, rax                                                       ; +0x87, 0x1003830a7\nmov     rsi, r15                                                       ; +0x8a, 0x1003830aa\nxor     edx, edx                                                       ; +0x8d, 0x1003830ad\ncall    cocos2d__CCTextureCache__addImage                              ; +0x8f, 0x1003830af\nmov     [rbx+3ACh], r14d                                               ; +0x94, 0x1003830b4\npop     rbx                                                            ; +0x9b, 0x1003830bb\npop     r12                                                            ; +0x9c, 0x1003830bc\npop     r14                                                            ; +0x9e, 0x1003830be\npop     r15                                                            ; +0xa0, 0x1003830c0\npop     rbp                                                            ; +0xa2, 0x1003830c2\nretn                                                                   ; +0xa3, 0x1003830c3", "xrefs": ["PlayLayer::prepareCreateObjectsFromSetup @ 0x1000ad265", "LevelEditorLayer::createObjectsFromSetup @ 0x1000dce16", "SelectFontLayer::updateFontLabel @ 0x10029a666", "GameManager::getFontFile @ 0x1003830ee", "GameManager::getFontTexture @ 0x10038313e", "SecretLayer5::init @ 0x10047abaf"], "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"}