//
// cocos2d::CCTextureCache::reloadTexture from 0x5f5560 to 0x5f55ee (142 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool cocos2d::CCTextureCache::reloadTexture(cocos2d::CCTextureCache *a1, const char *a2)
{
cocos2d::CCFileUtils *v4; // r0
int v5; // r5
cocos2d::CCImage *v6; // r7
char *v8[2]; // [sp+0h] [bp-8h] BYREF
v8[0] = (char *)a1;
v8[1] = (char *)a2;
v4 = cocos2d::CCFileUtils::sharedFileUtils();
((void (__fastcall *)(char **, cocos2d::CCFileUtils *, const char *, _DWORD))v4->createCCArrayWithContentsOfFile)(
v8,
v4,
a2,
0);
if ( *((_DWORD *)v8[0] - 3) )
{
v5 = cocos2d::CCDictionary::objectForKey((int)a1->m_pTextures, (const char **)v8);
if ( !v5 )
{
v5 = cocos2d::CCTextureCache::addImage(a1, v8[0], 0) != nullptr;
goto LABEL_7;
}
v6 = (cocos2d::CCImage *)operator new(0x48u);
cocos2d::CCImage::CCImage(v6);
if ( cocos2d::CCImage::initWithImageFile(v6, v8[0], kFmtPng) )
{
LOBYTE(v5) = cocos2d::CCTexture2D::initWithImage((cocos2d::CCTexture2D *)v5, v6);
goto LABEL_7;
}
}
LOBYTE(v5) = 0;
LABEL_7:
sub_774008(v8);
return v5;
}