//
// cocos2d::CCImage::initWithImageFileThreadSafe from 0x10047f620 to 0x10047f6b3 (147 bytes)
//
// 1 xrefs:
// > sub_1006C0210 @ 0x1006c06d8
//
// 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:30:39 +0000
//
__int64 __fastcall cocos2d::CCImage::initWithImageFileThreadSafe(__int64 a1, __int64 a2, int a3)
{
__int64 v4; // rax
void *v5; // rbx
unsigned int v6; // eax
unsigned int v7; // r14d
_QWORD v9[4]; // [rsp+10h] [rbp-20h] BYREF
v9[0] = 0;
v4 = cocos2d::CCFileUtils::sharedFileUtils(a1, a2);
v5 = (void *)(*(__int64 (__fastcall **)(__int64, __int64, const char *, _QWORD *))(*(_QWORD *)v4 + 32LL))(
v4,
a2,
"rb",
v9);
if ( v5 != nullptr && v9[0] != 0 )
{
LOBYTE(v6) = cocos2d::CCImage::initWithImageData(a1, v5, v9[0], a3, 0, 0, 8);
v7 = v6;
LABEL_4:
operator delete[](v5);
return v7;
}
v7 = 0;
if ( v5 )
goto LABEL_4;
return v7;
}