//
// GameManager::unloadBackground from 0x10036c640 to 0x10036c6dd (157 bytes)
//
// 1 xrefs:
// > SupportLayer::onLowDetail @ 0x100383fa1
//
// This function is hookable on this platform (idp: pc, 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:29:00 +0000
//
__int64 __fastcall GameManager::unloadBackground(__int64 a1)
{
__int64 result; // rax
__int64 v3; // rdi
__int64 CString; // r15
__int64 v5; // rax
unsigned int i; // r14d
__int64 v7; // rdi
__int64 v8; // r15
__int64 v9; // rax
char v10; // [rsp-28h] [rbp-28h]
if ( *(_DWORD *)(a1 + 980) )
{
v3 = sub_10088E820("game_bg_%02d_001.png", result);
CString = cocos2d::CCString::getCString(v3);
v5 = cocos2d::CCTextureCache::sharedTextureCache(v3);
cocos2d::CCTextureCache::removeTextureForKey(v5, CString);
*(_DWORD *)(a1 + 980) = 0;
for ( i = 1; i != 60; ++i )
{
v7 = sub_10088E820("game_bg_%02d_001.png", v10);
v8 = cocos2d::CCString::getCString(v7);
v9 = cocos2d::CCFileUtils::sharedFileUtils(v7, i);
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 56LL))(v9, v8);
}
}
return result;
}