{"type": "func", "start": 4298651440, "end": 4298651598, "name": "GameManager::finishedLoadingMGAsync", "pseudocode": "// \n// GameManager::finishedLoadingMGAsync from 0x100383730 to 0x1003837ce (158 bytes)\n// \n// 2 xrefs:\n// > GameManager::finishedLoadingMGAsync1 @ 0x1003836dd\n// > GameManager::finishedLoadingMGAsync2 @ 0x10038371d\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::finishedLoadingMGAsync(GameManager *a1, int a2)\n{\n  GJBaseGameLayer *m_gameLayer; // rdi\n  cocos2d::CCString *v4; // rax\n  const char *CString; // r15\n  cocos2d::CCString *v6; // rax\n  const char *v7; // r12\n  cocos2d::CCTextureCache *v8; // rax\n  cocos2d::CCTextureCache *v9; // rax\n  char v10; // [rsp+0h] [rbp-20h]\n  char v11; // [rsp+0h] [rbp-20h]\n\n  a1->m_loadingG1 = 0;\n  m_gameLayer = a1->m_gameLayer;\n  if ( m_gameLayer )\n    GJBaseGameLayer::asyncMGLoaded(m_gameLayer, a2);\n  if ( a1->m_loadedMG )\n  {\n    v4 = (cocos2d::CCString *)sub_1007AB580(\"fg_%02d_001.png\", v10);\n    CString = cocos2d::CCString::getCString(v4);\n    v6 = (cocos2d::CCString *)sub_1007AB580(\"fg_%02d_2_001.png\", v11);\n    v7 = cocos2d::CCString::getCString(v6);\n    v8 = cocos2d::CCTextureCache::sharedTextureCache();\n    cocos2d::CCTextureCache::removeTextureForKey(v8, CString);\n    v9 = cocos2d::CCTextureCache::sharedTextureCache();\n    cocos2d::CCTextureCache::removeTextureForKey(v9, v7);\n  }\n  a1->m_loadedMG = a2;\n}", "assembly": "; \n; GameManager::finishedLoadingMGAsync from 0x100383730 to 0x1003837ce (158 bytes)\n; \n; 2 xrefs:\n; > GameManager::finishedLoadingMGAsync1 @ 0x1003836dd\n; > GameManager::finishedLoadingMGAsync2 @ 0x10038371d\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, 0x100383730\nmov     rbp, rsp                                                       ; +0x1, 0x100383731\npush    r15                                                            ; +0x4, 0x100383734\npush    r14                                                            ; +0x6, 0x100383736\npush    r12                                                            ; +0x8, 0x100383738\npush    rbx; char                                                      ; +0xa, 0x10038373a\nmov     ebx, esi                                                       ; +0xb, 0x10038373b\nmov     r14, rdi                                                       ; +0xd, 0x10038373d\nmov     byte ptr [rdi+3B6h], 0                                         ; +0x10, 0x100383740\nmov     rdi, [rdi+208h]                                                ; +0x17, 0x100383747\ntest    rdi, rdi                                                       ; +0x1e, 0x10038374e\njz      short loc_10038375A                                            ; +0x21, 0x100383751\nmov     esi, ebx                                                       ; +0x23, 0x100383753\ncall    GJBaseGameLayer__asyncMGLoaded                                 ; +0x25, 0x100383755\nmov     esi, [r14+3A8h]                                                ; +0x2a, 0x10038375a\ntest    esi, esi                                                       ; +0x31, 0x100383761\njz      short loc_1003837BE                                            ; +0x33, 0x100383763\nlea     rdi, aFg02d001Png; \"fg_%02d_001.png\"                           ; +0x35, 0x100383765\nxor     eax, eax                                                       ; +0x3c, 0x10038376c\ncall    sub_1007AB580                                                  ; +0x3e, 0x10038376e\nmov     rdi, rax                                                       ; +0x43, 0x100383773\ncall    cocos2d__CCString__getCString                                  ; +0x46, 0x100383776\nmov     r15, rax                                                       ; +0x4b, 0x10038377b\nmov     esi, [r14+3A8h]                                                ; +0x4e, 0x10038377e\nlea     rdi, aFg02d2001Png; \"fg_%02d_2_001.png\"                        ; +0x55, 0x100383785\nxor     eax, eax                                                       ; +0x5c, 0x10038378c\ncall    sub_1007AB580                                                  ; +0x5e, 0x10038378e\nmov     rdi, rax                                                       ; +0x63, 0x100383793\ncall    cocos2d__CCString__getCString                                  ; +0x66, 0x100383796\nmov     r12, rax                                                       ; +0x6b, 0x10038379b\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x6e, 0x10038379e\nmov     rdi, rax                                                       ; +0x73, 0x1003837a3\nmov     rsi, r15                                                       ; +0x76, 0x1003837a6\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x79, 0x1003837a9\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x7e, 0x1003837ae\nmov     rdi, rax                                                       ; +0x83, 0x1003837b3\nmov     rsi, r12                                                       ; +0x86, 0x1003837b6\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x89, 0x1003837b9\nmov     [r14+3A8h], ebx                                                ; +0x8e, 0x1003837be\npop     rbx                                                            ; +0x95, 0x1003837c5\npop     r12                                                            ; +0x96, 0x1003837c6\npop     r14                                                            ; +0x98, 0x1003837c8\npop     r15                                                            ; +0x9a, 0x1003837ca\npop     rbp                                                            ; +0x9c, 0x1003837cc\nretn                                                                   ; +0x9d, 0x1003837cd", "xrefs": ["GameManager::finishedLoadingMGAsync1 @ 0x1003836dd", "GameManager::finishedLoadingMGAsync2 @ 0x10038371d"], "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"}