//
// cocos2d::CCAnimationCache::parseVersion1 from 0x100461910 to 0x100461b75 (613 bytes)
//
// 1 xrefs:
// > cocos2d::CCAnimationCache::addAnimationsWithDictionary @ 0x1004621c0
//
// 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 12:30:25 +0000
//
void __fastcall cocos2d::CCAnimationCache::parseVersion1(double a1, __int64 a2, __int64 a3)
{
__int64 v3; // r15
__int64 v4; // r13
__int64 v5; // r12
void *v6; // rax
unsigned int v7; // eax
__int64 v8; // r13
unsigned int *v9; // rax
_QWORD *v10; // rbx
unsigned __int64 v11; // r12
const char *CString; // rax
__int64 v13; // rax
__int64 v14; // r15
void *v15; // r14
_DWORD *v16; // rax
__int64 v17; // rdi
_DWORD *v18; // rbx
_QWORD *v19; // r12
void *v20; // r14
__int64 v21; // [rsp+8h] [rbp-68h]
const char *v22; // [rsp+10h] [rbp-60h]
__int64 v23; // [rsp+18h] [rbp-58h]
__int64 v24; // [rsp+20h] [rbp-50h]
float v25; // [rsp+2Ch] [rbp-44h]
char v26[16]; // [rsp+30h] [rbp-40h] BYREF
void *__p; // [rsp+40h] [rbp-30h]
v21 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( a3 )
{
v3 = *(_QWORD *)(a3 + 56);
while ( v3 )
{
v4 = *(_QWORD *)(v3 + 264);
v22 = (const char *)v3;
v3 = *(_QWORD *)(v3 + 288);
v26[0] = 12;
strcpy(&v26[1], "frames");
v5 = cocos2d::CCDictionary::objectForKey(v4, v26);
if ( (v26[0] & 1) != 0 )
operator delete(__p);
strcpy(v26, "\ndelay");
v6 = cocos2d::CCDictionary::valueForKey(v4, (__int64)v26);
*(float *)&a1 = cocos2d::CCString::floatValue(v6, a1);
v25 = *(float *)&a1;
if ( (v26[0] & 1) != 0 )
operator delete(__p);
if ( v5 )
{
v23 = v3;
v7 = sub_1007FEF90(v5);
v8 = sub_1007FEC20(v7);
cocos2d::CCObject::retain(v8);
v24 = v5;
v9 = *(unsigned int **)(v5 + 56);
if ( *v9 )
{
v10 = *((_QWORD **)v9 + 2);
v11 = (unsigned __int64)&v10[*v9 - 1];
do
{
if ( !*v10 )
break;
CString = (const char *)cocos2d::CCString::getCString(*v10);
v13 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v21, CString);
if ( v13 )
{
v14 = v13;
v15 = operator new(0x50u);
cocos2d::CCAnimationFrame::CCAnimationFrame((__int64)v15);
*(_QWORD *)&a1 = 1065353216;
cocos2d::CCAnimationFrame::initWithSpriteFrame((__int64)v15, v14, 0, 1.0);
sub_1007FEBF0(v8, v15);
cocos2d::CCObject::release(v15);
}
++v10;
}
while ( (unsigned __int64)v10 <= v11 );
}
v3 = v23;
if ( (unsigned int)sub_1007FEF90(v8) )
{
sub_1007FEF90(v8);
sub_1007FEF90(v24);
*(_QWORD *)&a1 = LODWORD(v25);
v16 = cocos2d::CCAnimation::create(v8, 1, v25);
v17 = qword_100BE8BE0;
if ( !qword_100BE8BE0 )
{
v18 = v16;
v19 = operator new(0x40u);
cocos2d::CCObject::CCObject(v19);
*v19 = off_100B43998;
v19[7] = 0;
qword_100BE8BE0 = (__int64)v19;
v20 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v20);
v19[7] = v20;
v17 = qword_100BE8BE0;
v16 = v18;
}
cocos2d::CCAnimationCache::addAnimation(v17, (__int64)v16, v22);
cocos2d::CCObject::release(v8);
}
}
}
}
}