//
// CCAnimateFrameCache::addSpriteFramesWithFile from 0x68e404 to 0x68e5c4 (448 bytes)
//
// 3 xrefs:
// > CCPartAnimSprite::initWithAnimDesc @ 0x693a18
// > LoadingLayer::loadAssets @ 0x6ee008
// > ??> @ 0xdcdc8
//
// 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 12:50:34 +0000
//
cocos2d::CCObject *__fastcall CCAnimateFrameCache::addSpriteFramesWithFile(CCAnimateFrameCache *this, char *a2)
{
size_t v4; // x0
size_t v5; // x19
__int64 v6; // x25
unsigned __int64 v7; // x0
char *v8; // x3
__int64 v9; // x19
size_t v10; // x0
__int64 v11; // x19
__int64 v12; // x19
DS_Dictionary *v14; // x19
unsigned __int64 v15; // [xsp+50h] [xbp+50h] BYREF
size_t v16; // [xsp+58h] [xbp+58h]
void *v17; // [xsp+60h] [xbp+60h]
v15 = 0;
v16 = 0;
v17 = nullptr;
v4 = strlen(a2);
v5 = v4;
v6 = *((_QWORD *)this + 9);
if ( v4 > 0xFFFFFFFFFFFFFFEFLL )
sub_62B240();
if ( v4 > 0x16 )
{
v7 = (v4 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v15 = v7 | 1;
v8 = (char *)operator new(v7);
v17 = v8;
v16 = v5;
LABEL_4:
v8 = (char *)memcpy(v8, a2, v5);
goto LABEL_5;
}
LOBYTE(v15) = 2 * v4;
v8 = (char *)&v15 + 1;
if ( v4 )
goto LABEL_4;
LABEL_5:
v8[v5] = 0;
v9 = cocos2d::CCDictionary::objectForKey(v6, &v15);
if ( (v15 & 1) == 0 )
{
if ( v9 )
goto LABEL_7;
LABEL_13:
v14 = (DS_Dictionary *)operator new(0xF0u);
DS_Dictionary::DS_Dictionary(v14);
DS_Dictionary::loadRootSubDictFromFile(v14, a2);
return CCAnimateFrameCache::addDict(this, v14, a2);
}
operator delete(v17);
if ( !v9 )
goto LABEL_13;
LABEL_7:
v15 = 0;
v16 = 0;
v17 = nullptr;
v10 = strlen(a2);
v11 = *((_QWORD *)this + 9);
std::string::__init((__int64 *)&v15, a2, v10);
v12 = cocos2d::CCDictionary::objectForKey(v11, &v15);
if ( (v15 & 1) != 0 )
operator delete(v17);
return (cocos2d::CCObject *)v12;
}