//
// GameManager::finishedLoadingMGAsync from 0x100383730 to 0x1003837ce (158 bytes)
//
// 2 xrefs:
// > GameManager::finishedLoadingMGAsync1 @ 0x1003836dd
// > GameManager::finishedLoadingMGAsync2 @ 0x10038371d
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GameManager::finishedLoadingMGAsync(GameManager *a1, int a2)
{
GJBaseGameLayer *m_gameLayer; // rdi
cocos2d::CCString *v4; // rax
const char *CString; // r15
cocos2d::CCString *v6; // rax
const char *v7; // r12
cocos2d::CCTextureCache *v8; // rax
cocos2d::CCTextureCache *v9; // rax
char v10; // [rsp+0h] [rbp-20h]
char v11; // [rsp+0h] [rbp-20h]
a1->m_loadingG1 = 0;
m_gameLayer = a1->m_gameLayer;
if ( m_gameLayer )
GJBaseGameLayer::asyncMGLoaded(m_gameLayer, a2);
if ( a1->m_loadedMG )
{
v4 = (cocos2d::CCString *)sub_1007AB580("fg_%02d_001.png", v10);
CString = cocos2d::CCString::getCString(v4);
v6 = (cocos2d::CCString *)sub_1007AB580("fg_%02d_2_001.png", v11);
v7 = cocos2d::CCString::getCString(v6);
v8 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey(v8, CString);
v9 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey(v9, v7);
}
a1->m_loadedMG = a2;
}