//
// cocos2d::CCParticleSystem::initWithFile from 0x100193368 to 0x1001934b4 (332 bytes)
//
// 1 xrefs:
// > cocos2d::CCParticleSystemQuad::create @ 0x100253710
//
// 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::CCParticleSystem::initWithFile(cocos2d::CCParticleSystem *a1, const char *a2, bool a3)
{
cocos2d::CCFileUtils *v6; // x0
void **p_m_sPlistFile; // x21
CCContentManager *v8; // x0
cocos2d::CCDictionary *v9; // x21
std::string::size_type v10; // x0
std::string *p_str; // x2
bool v12; // w0
bool v13; // w19
std::string v15; // [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();
((void (__fastcall *)(std::string *__return_ptr, cocos2d::CCFileUtils *, const char *, _QWORD))v6->createCCArrayWithContentsOfFile)(
&__str,
v6,
a2,
0);
p_m_sPlistFile = (void **)&a1->m_sPlistFile;
if ( a1->m_sPlistFile.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete(*p_m_sPlistFile);
*(_OWORD *)p_m_sPlistFile = *(_OWORD *)&__str.__r_.__value_.__l.__data_;
a1->m_sPlistFile.m_data.m_long.longStorage = (char *)__str.__r_.__value_.__r.__words[2];
v8 = CCContentManager::sharedManager();
v9 = CCContentManager::addDict(v8, a2, 1);
sub_100009900(&__str, (char *)a2);
if ( std::string::find(&__str, 47, 0) == -1 )
{
v12 = cocos2d::CCParticleSystem::initWithDictionary(a1, v9, "", a3);
}
else
{
v10 = std::string::rfind(&__str, 47, 0xFFFFFFFFFFFFFFFFLL);
std::string::basic_string(&v15, &__str, 0, v10 + 1, &__a);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
__str = v15;
if ( (v15.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_str = &__str;
else
p_str = (std::string *)v15.__r_.__value_.__r.__words[0];
v12 = cocos2d::CCParticleSystem::initWithDictionary(a1, v9, (const char *)p_str, a3);
}
v13 = v12;
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
return v13;
}