//
// GameManager::finishedLoadingMGAsync from 0x4148d4 to 0x41492a (86 bytes)
//
// 2 xrefs:
// > GameManager::finishedLoadingMGAsync1 @ 0x414954
// > GameManager::finishedLoadingMGAsync2 @ 0x41497a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:47:39 +0000
//
GJBaseGameLayer *__fastcall GameManager::finishedLoadingMGAsync(GameManager *this, int a2)
{
GJBaseGameLayer *result; // r0
const char *v5; // r1
cocos2d::CCString *v6; // r0
const char *CString; // r7
cocos2d::CCString *v8; // r0
cocos2d::CCTextureCache *v9; // r6
cocos2d::CCTextureCache *v10; // r0
cocos2d::CCTextureCache *v11; // r0
cocos2d::CCTextureCache *v12; // r0
*((_BYTE *)this + 790) = 0;
result = *((GJBaseGameLayer **)this + 103);
if ( result )
result = (GJBaseGameLayer *)GJBaseGameLayer::asyncMGLoaded(result, a2);
v5 = *((const char **)this + 194);
if ( 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 **)this + 194));
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 + 194) = a2;
return result;
}