//
// cocos2d::CCSprite::initWithFile from 0x18008ecc0 to 0x18008ed48 (136 bytes)
//
// 7 xrefs:
// > ??> @ 0x1800f1d18
// > ??> @ 0x1800f2200
// > ??> @ 0x1800f2db0
// > ??> @ 0x18010a1f0
// > ??> @ 0x18010d208
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bfe50
//
// 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 11:22:07 +0000
//
bool __fastcall cocos2d::CCSprite::initWithFile(cocos2d::CCSprite *this, const char *a2)
{
cocos2d::CCTextureCache *v4; // rax
struct cocos2d::CCTexture2D *v5; // rax
struct cocos2d::CCTexture2D *v6; // rbx
_DWORD *v7; // rax
_BYTE v9[8]; // [rsp+20h] [rbp-18h] BYREF
_DWORD v10[4]; // [rsp+28h] [rbp-10h] BYREF
char v11; // [rsp+50h] [rbp+18h] BYREF
v4 = cocos2d::CCTextureCache::sharedTextureCache();
v5 = cocos2d::CCTextureCache::addImage(v4, a2, 0);
v6 = v5;
if ( v5 )
{
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v9, (const struct cocos2d::CCRect *)&unk_1801B2830);
v7 = (_DWORD *)(*(__int64 (__fastcall **)(struct cocos2d::CCTexture2D *, char *))(*(_QWORD *)v6 + 136LL))(v6, &v11);
cocos2d::CCSize::operator=(v10, v7);
LOBYTE(v5) = (*(bool (__fastcall **)(cocos2d::CCSprite *, struct cocos2d::CCTexture2D *, _BYTE *))(*(_QWORD *)this + 896LL))(
this,
v6,
v9);
}
return (char)v5;
}