//
// cocos2d::CCParticleSystem::initWithFile from 0x100226638 to 0x100226784 (332 bytes)
//
// 1 xrefs:
// > cocos2d::CCParticleSystemQuad::create @ 0x1002f0870
//
// This function is hookable on this platform (idp: arm, 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:01:10 +0000
//
__int64 __fastcall cocos2d::CCParticleSystem::initWithFile(__int64 a1, char *a2, __int64 a3)
{
__int64 v6; // x0
_QWORD *v7; // x0
void **v8; // x21
__int64 v9; // x0
__int64 v10; // x21
std::string::size_type v11; // x0
std::string *p_str; // x2
__int64 v13; // x0
__int64 v14; // x19
std::string v16; // [xsp+8h] [xbp-58h] BYREF
std::string __str; // [xsp+20h] [xbp-40h] BYREF
std::allocator __a; // [xsp+3Fh] [xbp-21h] BYREF
v6 = cocos2d::CCFileUtils::sharedFileUtils(a1);
v7 = (*(_QWORD *(__fastcall **)(std::string *__return_ptr, __int64, char *, _QWORD))(*(_QWORD *)v6 + 48LL))(
&__str,
v6,
a2,
0);
v8 = (void **)(a1 + 328);
if ( *(char *)(a1 + 351) < 0 )
operator delete(*v8);
*(_OWORD *)v8 = *(_OWORD *)&__str.__r_.__value_.__l.__data_;
*(_QWORD *)(a1 + 344) = *((_QWORD *)&__str.__r_.__value_.__l + 2);
v9 = CCContentManager::sharedManager(v7);
v10 = CCContentManager::addDict(v9, a2, 1);
sub_100009900(&__str, a2);
if ( std::string::find(&__str, 47, 0) == -1 )
{
v13 = cocos2d::CCParticleSystem::initWithDictionary(a1, v10, "", a3);
}
else
{
v11 = std::string::rfind(&__str, 47, 0xFFFFFFFFFFFFFFFFLL);
std::string::basic_string(&v16, &__str, 0, v11 + 1, &__a);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
__str = v16;
if ( (v16.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_str = &__str;
else
p_str = (std::string *)v16.__r_.__value_.__r.__words[0];
v13 = cocos2d::CCParticleSystem::initWithDictionary(a1, v10, p_str, a3);
}
v14 = v13;
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
return v14;
}