//
// sub_1003B502C from 0x1003b502c to 0x1003b5110 (228 bytes)
//
// 1 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10013f704
//
// 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
//
void __fastcall sub_1003B502C(__int64 a1, int a2)
{
int v2; // w8
int v3; // w22
int v4; // w8
void *v7; // x0
__int64 CString; // x21
void *v9; // x0
void *v10; // x20
void *v11; // x0
char *v12; // x0
_DWORD *v13; // x0
__int64 v14; // x20
void *v15; // x0
__int64 v16; // x0
if ( a2 >= 20 )
v2 = 20;
else
v2 = a2;
if ( v2 <= 1 )
v3 = 1;
else
v3 = v2;
v4 = *(_DWORD *)(a1 + 996);
if ( v3 != v4 )
{
if ( v4 >= 2 )
{
v7 = sub_1003065B0("PlayerExplosion_%02d.png", v4 - 1);
CString = cocos2d::CCString::getCString((__int64)v7);
v9 = cocos2d::CCTextureCache::sharedTextureCache();
cocos2d::CCTextureCache::removeTextureForKey((__int64)v9, CString);
}
if ( a2 >= 2 )
{
v10 = cocos2d::CCTextureCache::sharedTextureCache();
v11 = sub_1003065B0("PlayerExplosion_%02d.png", v3 - 1);
v12 = (char *)cocos2d::CCString::getCString((__int64)v11);
v13 = cocos2d::CCTextureCache::addImage((__int64)v10, v12);
v14 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v13);
v15 = sub_1003065B0("PlayerExplosion_%02d.plist", v3 - 1);
v16 = cocos2d::CCString::getCString((__int64)v15);
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v14, v16);
}
*(_DWORD *)(a1 + 996) = v3;
}
}