//
// cocos2d::CCAnimationCache::parseVersion2 from 0x100461bb0 to 0x100461f90 (992 bytes)
//
// 1 xrefs:
// > cocos2d::CCAnimationCache::addAnimationsWithDictionary @ 0x1004621cb
//
// 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::parseVersion2(__int64 a1, __int64 a2)
{
__int64 v2; // r15
__int64 v3; // r13
__int64 v4; // rdi
double v5; // xmm0_8
void *v6; // rax
__int64 v7; // rbx
unsigned int v8; // eax
unsigned int *v9; // rax
__int64 *v10; // r13
void *v11; // r14
__int64 v12; // r15
void *v13; // rax
const char *CString; // rbx
__int64 v15; // rax
__int64 v16; // rbx
void *v17; // rax
__int64 v18; // r15
void *v19; // rax
_BYTE *v20; // r13
int v21; // edx
__int64 v22; // rdi
_QWORD *v23; // r14
void *v24; // r15
__int64 *v25; // [rsp+8h] [rbp-88h]
__int64 v26; // [rsp+10h] [rbp-80h]
void *v27; // [rsp+18h] [rbp-78h]
const char *v28; // [rsp+20h] [rbp-70h]
__int64 v29; // [rsp+28h] [rbp-68h]
__int64 v30; // [rsp+30h] [rbp-60h]
float v31; // [rsp+44h] [rbp-4Ch]
float v32; // [rsp+44h] [rbp-4Ch]
void *v33[3]; // [rsp+48h] [rbp-48h] BYREF
char v34; // [rsp+67h] [rbp-29h]
v26 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( a2 )
{
v2 = *(_QWORD *)(a2 + 56);
if ( v2 )
{
do
{
v4 = *(_QWORD *)(v2 + 264);
v3 = *(_QWORD *)(v2 + 288);
strcpy((char *)v33, "\nloops");
v27 = cocos2d::CCDictionary::valueForKey(v4, (__int64)v33);
if ( ((__int64)v33[0] & 1) != 0 )
operator delete(v33[2]);
strcpy((char *)v33, "(restoreOriginalFrame");
v5 = *(double *)"restoreOriginalFrame";
v6 = cocos2d::CCDictionary::valueForKey(v4, (__int64)v33);
v34 = cocos2d::CCString::boolValue(v6);
if ( ((__int64)v33[0] & 1) != 0 )
operator delete(v33[2]);
LOBYTE(v33[0]) = 12;
strcpy((char *)v33 + 1, "frames");
v7 = cocos2d::CCDictionary::objectForKey(v4, (char *)v33);
if ( ((__int64)v33[0] & 1) != 0 )
operator delete(v33[2]);
if ( v7 )
{
v29 = v3;
v28 = (const char *)v2;
v8 = sub_1007FEF90(v7);
v30 = sub_1007FEC20(v8);
cocos2d::CCObject::retain(v30);
v9 = *(unsigned int **)(v7 + 56);
if ( *v9 )
{
v10 = *((__int64 **)v9 + 2);
v25 = &v10[*v9 - 1];
do
{
v12 = *v10;
if ( !*v10 )
break;
LOBYTE(v33[0]) = 22;
strcpy((char *)v33 + 1, "spriteframe");
v13 = cocos2d::CCDictionary::valueForKey(v12, (__int64)v33);
CString = (const char *)cocos2d::CCString::getCString(v13);
if ( ((__int64)v33[0] & 1) != 0 )
operator delete(v33[2]);
v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v26, CString);
if ( v15 )
{
v16 = v15;
LOBYTE(v33[0]) = 20;
strcpy((char *)v33 + 1, "delayUnits");
v17 = cocos2d::CCDictionary::valueForKey(v12, (__int64)v33);
v31 = cocos2d::CCString::floatValue(v17, v5);
if ( ((__int64)v33[0] & 1) != 0 )
operator delete(v33[2]);
LOBYTE(v33[0]) = 24;
strcpy((char *)v33 + 1, "notification");
v18 = cocos2d::CCDictionary::objectForKey(v12, (char *)v33);
if ( ((__int64)v33[0] & 1) != 0 )
operator delete(v33[2]);
v11 = operator new(0x50u);
cocos2d::CCAnimationFrame::CCAnimationFrame((__int64)v11);
*(_QWORD *)&v5 = LODWORD(v31);
cocos2d::CCAnimationFrame::initWithSpriteFrame((__int64)v11, v16, v18, v31);
sub_1007FEBF0(v30, v11);
cocos2d::CCObject::release(v11);
}
++v10;
}
while ( v10 <= v25 );
}
LOBYTE(v33[0]) = 24;
strcpy((char *)v33 + 1, "delayPerUnit");
v19 = cocos2d::CCDictionary::valueForKey(v4, (__int64)v33);
v32 = cocos2d::CCString::floatValue(v19, v5);
if ( ((__int64)v33[0] & 1) != 0 )
operator delete(v33[2]);
v20 = operator new(0x58u);
sub_100280ED0((__int64)v20);
if ( (unsigned int)cocos2d::CCString::length(v27) )
v21 = cocos2d::CCString::intValue(v27);
else
v21 = 1;
cocos2d::CCAnimation::initWithAnimationFrames((__int64)v20, v30, v21, v32);
cocos2d::CCObject::release(v30);
v20[80] = v34;
v22 = qword_100BE8BE0;
if ( !qword_100BE8BE0 )
{
v23 = operator new(0x40u);
cocos2d::CCObject::CCObject(v23);
*v23 = off_100B43998;
v23[7] = 0;
qword_100BE8BE0 = (__int64)v23;
v24 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v24);
v23[7] = v24;
v22 = qword_100BE8BE0;
}
cocos2d::CCAnimationCache::addAnimation(v22, (__int64)v20, v28);
cocos2d::CCObject::release(v20);
v3 = v29;
}
v2 = v3;
}
while ( v3 );
}
}
}