//
// cocos2d::CCAnimationCache::parseVersion1 from 0x7f0218 to 0x7f0376 (350 bytes)
//
// 1 xrefs:
// > cocos2d::CCAnimationCache::addAnimationsWithDictionary @ 0x7f06d0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:03 +0000
//
cocos2d::CCSpriteFrameCache *__fastcall cocos2d::CCAnimationCache::parseVersion1(
cocos2d::CCAnimationCache *this,
cocos2d::CCDictionary *a2)
{
cocos2d::CCSpriteFrameCache *result; // r0
int v4; // r4
int v5; // r5
int v6; // r9
cocos2d::CCArray *v7; // r8
int v8; // r2
int v9; // r3
cocos2d::CCString *v10; // r0
cocos2d::CCArray *v11; // r11
cocos2d::CCArray *v12; // r0
unsigned int v13; // r1
cocos2d::CCArray *v14; // r7
_DWORD *v15; // r2
unsigned int v16; // r3
cocos2d::CCAnimation *v17; // r8
cocos2d::CCAnimationCache *v18; // r0
int v19; // r3
cocos2d::CCString **v20; // r10
cocos2d::CCString *v21; // r0
cocos2d::CCString *v22; // t1
int v23; // r3
char *CString; // r0
cocos2d::CCObject *v25; // r1
cocos2d::CCAnimationFrame *v26; // r9
cocos2d::CCSpriteFrameCache *v27; // [sp+0h] [bp-2Ch]
cocos2d::CCString **v28; // [sp+4h] [bp-28h]
cocos2d::CCObject *v29; // [sp+14h] [bp-18h]
int v30; // [sp+18h] [bp-14h] BYREF
int v31; // [sp+1Ch] [bp-10h]
int v32; // [sp+20h] [bp-Ch]
result = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(this);
v27 = result;
if ( a2 )
{
v4 = *((_DWORD *)a2 + 13);
if ( v4 )
v5 = *(_DWORD *)(v4 + 272);
else
v5 = 0;
while ( v4 )
{
v6 = *(_DWORD *)(v4 + 260);
v30 = 0;
v31 = 0;
v32 = 0;
std::string::__init(&v30, "frames", 6u);
v7 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v6, (int)&v30);
std::string::~string((int)&v30);
v30 = 0;
v31 = 0;
v32 = 0;
std::string::__init(&v30, "delay", 5u);
v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v6, (int)&v30, v8, v9);
v11 = (cocos2d::CCArray *)cocos2d::CCString::floatValue(v10);
result = (cocos2d::CCSpriteFrameCache *)std::string::~string((int)&v30);
if ( v7 )
{
v12 = (cocos2d::CCArray *)cocos2d::CCArray::count(v7);
v14 = cocos2d::CCArray::createWithCapacity(v12, v13);
cocos2d::CCObject::retain((int)v14);
v15 = *((_DWORD **)v7 + 13);
if ( *v15 )
{
v20 = (cocos2d::CCString **)v15[3];
v28 = &v20[*v15] + 0x3FFFFFFF;
while ( v20 <= v28 )
{
v22 = *v20++;
v21 = v22;
if ( !v22 )
break;
CString = cocos2d::CCString::getCString(v21);
v25 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v27, CString);
if ( v25 )
{
v29 = v25;
v26 = (cocos2d::CCAnimationFrame *)operator new(0x40u);
cocos2d::CCAnimationFrame::CCAnimationFrame(v26);
cocos2d::CCAnimationFrame::initWithSpriteFrame(v26, v29, 1065353216, nullptr);
cocos2d::CCArray::addObject(v14, v26);
cocos2d::CCObject::release(v26);
}
}
}
result = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::count(v14);
if ( result )
{
cocos2d::CCArray::count(v14);
cocos2d::CCArray::count(v7);
v17 = cocos2d::CCAnimation::create(v14, v11, 1u, v16);
v18 = (cocos2d::CCAnimationCache *)cocos2d::CCAnimationCache::sharedAnimationCache(v17);
cocos2d::CCAnimationCache::addAnimation(v18, v17, (const char *)v4, v19);
result = (cocos2d::CCSpriteFrameCache *)cocos2d::CCObject::release(v14);
}
}
if ( v5 )
v23 = *(_DWORD *)(v5 + 272);
else
v23 = 0;
v4 = v5;
v5 = v23;
}
}
return result;
}