//
// GameManager::finishedLoadingMGAsync from 0x716b28 to 0x716bb0 (136 bytes)
//
// 3 xrefs:
// > GameManager::finishedLoadingMGAsync1 @ 0x716bfc
// > GameManager::finishedLoadingMGAsync2 @ 0x716c4c
// > ??> @ 0xa5310
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:52:16 +0000
//
GJBaseGameLayer *__fastcall GameManager::finishedLoadingMGAsync(GameManager *this, int a2)
{
GJBaseGameLayer *result; // x0
const char *v5; // x1
cocos2d::CCString *v6; // x0
const char *CString; // x22
cocos2d::CCString *v8; // x0
cocos2d::CCTextureCache *v9; // x21
cocos2d::CCTextureCache *v10; // x0
cocos2d::CCTextureCache *v11; // x0
cocos2d::CCTextureCache *v12; // x0
result = *((GJBaseGameLayer **)this + 70);
*((_BYTE *)this + 1002) = 0;
if ( result )
result = (GJBaseGameLayer *)GJBaseGameLayer::asyncMGLoaded(result, a2);
v5 = (const char *)*((unsigned int *)this + 247);
if ( (_DWORD)v5 )
{
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"fg_%02d_001.png", v5);
CString = (const char *)cocos2d::CCString::getCString(v6);
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"fg_%02d_2_001.png",
(const char *)*((unsigned int *)this + 247));
v9 = (cocos2d::CCTextureCache *)cocos2d::CCString::getCString(v8);
v10 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v9);
v11 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::removeTextureForKey(v10, CString);
v12 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v11);
result = (GJBaseGameLayer *)cocos2d::CCTextureCache::removeTextureForKey(v12, (const char *)v9);
}
*((_DWORD *)this + 247) = a2;
return result;
}