//
// cocos2d::CCTextureCache::reloadTexture from 0x1006c1c00 to 0x1006c1cf2 (242 bytes)
//
// 0 xrefs:
//
// 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:35:32 +0000
//
__int64 __fastcall cocos2d::CCTextureCache::reloadTexture(__int64 a1, __int64 a2)
{
__int64 v2; // rax
__int64 v3; // r14
void *v4; // rbx
_BYTE *v5; // rsi
const char *v6; // rsi
__int64 v7; // rdx
__int64 v8; // rcx
__int64 v9; // r8
int v10; // eax
unsigned __int8 v12; // [rsp+0h] [rbp-30h] BYREF
_BYTE v13[7]; // [rsp+1h] [rbp-2Fh] BYREF
__int64 v14; // [rsp+8h] [rbp-28h]
void *__p; // [rsp+10h] [rbp-20h]
v2 = cocos2d::CCFileUtils::sharedFileUtils(a1, a2);
LODWORD(v3) = 0;
(*(void (__fastcall **)(unsigned __int8 *, __int64, __int64, _QWORD))(*(_QWORD *)v2 + 48LL))(&v12, v2, a2, 0);
if ( (v12 & 1) != 0 )
{
if ( !v14 )
goto LABEL_15;
}
else if ( !(v12 >> 1) )
{
goto LABEL_15;
}
v3 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 56), (char *)&v12);
if ( !v3 )
{
if ( (v12 & 1) != 0 )
v6 = (const char *)__p;
else
v6 = v13;
LOBYTE(v3) = cocos2d::CCTextureCache::addImage(a1, v6, 0) != nullptr;
if ( (v12 & 1) != 0 )
goto LABEL_16;
return (unsigned int)v3;
}
v4 = operator new(0x50u);
cocos2d::CCImage::CCImage((__int64)v4);
if ( (v12 & 1) != 0 )
v5 = __p;
else
v5 = v13;
if ( (unsigned __int8)cocos2d::CCImage::initWithImageFile((__int64)v4, (__int64)v5, 1u) )
{
LOBYTE(v10) = cocos2d::CCTexture2D::initWithImage(v3, (__int64)v4, v7, v8, v9);
LODWORD(v3) = v10;
if ( (v12 & 1) == 0 )
return (unsigned int)v3;
goto LABEL_16;
}
LODWORD(v3) = 0;
LABEL_15:
if ( (v12 & 1) != 0 )
LABEL_16:
operator delete(__p);
return (unsigned int)v3;
}