//
// sub_1003B52F8 from 0x1003b52f8 to 0x1003b5394 (156 bytes)
//
// 1 xrefs:
// > sub_1003B524C @ 0x1003b52c8
//
// 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 11:03:56 +0000
//
__int64 __fastcall sub_1003B52F8(__int64 result, __int64 a2)
{
__int64 v3; // x19
__int64 v4; // x21
int v5; // w0
void *v6; // x0
__int64 CString; // x21
void *v8; // x0
*(_BYTE *)(result + 1000) = 0;
if ( a2 )
{
v3 = result;
v4 = *(_QWORD *)(result + 560);
if ( v4 )
{
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
GJBaseGameLayer::asyncBGLoaded(v4, v5);
}
if ( *(_DWORD *)(v3 + 980) )
{
v6 = sub_1003065B0("game_bg_%02d_001.png", *(_DWORD *)(v3 + 980));
CString = cocos2d::CCString::getCString((__int64)v6);
v8 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey((__int64)v8, CString);
}
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(v3 + 980) = result;
}
return result;
}