//
// cocos2d::CCImage::initWithImageFileThreadSafe from 0x10048a000 to 0x10048a093 (147 bytes)
//
// 1 xrefs:
// > sub_1005ED180 @ 0x1005ed648
//
// 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 __fastcall cocos2d::CCImage::initWithImageFileThreadSafe(
cocos2d::CCImage *a1,
const char *a2,
cocos2d::CCImage::EImageFormat a3)
{
cocos2d::CCFileUtils *v4; // rax
void *v5; // rbx
bool v6; // r14
int v8; // [rsp+8h] [rbp-28h]
_QWORD v9[4]; // [rsp+10h] [rbp-20h] BYREF
v9[0] = 0;
v4 = cocos2d::CCFileUtils::sharedFileUtils();
v5 = (void *)((__int64 (__fastcall *)(cocos2d::CCFileUtils *, const char *, const char *, _QWORD *))v4->addSearchResolutionsOrder)(
v4,
a2,
"rb",
v9);
if ( v5 != nullptr && v9[0] != 0 )
{
v6 = cocos2d::CCImage::initWithImageData(a1, v5, v9[0], a3, 0, 0, 8, v8);
LABEL_4:
operator delete[](v5);
return v6;
}
v6 = 0;
if ( v5 )
goto LABEL_4;
return v6;
}