//
// cocos2d::CCAnimationCache::addAnimationsWithDictionary from 0x100461fe0 to 0x1004621df (511 bytes)
//
// 1 xrefs:
// > cocos2d::CCAnimationCache::addAnimationsWithFile @ 0x10046223f
//
// 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::addAnimationsWithDictionary(double a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v5; // rbx
__int64 v6; // rdi
__int64 v7; // r12
void *v8; // rax
int v9; // r15d
char *v10; // rsi
__int64 v11; // r12
unsigned int *v12; // rax
__int64 *v13; // r15
unsigned __int64 v14; // rbx
__int64 v15; // r12
__int64 v16; // r13
__int64 CString; // rax
const char *v18; // r12
__int64 v19; // r12
const char *v20; // rax
__int64 v21; // r14
__int64 v22; // [rsp+0h] [rbp-50h]
int v23; // [rsp+Ch] [rbp-44h]
char v24; // [rsp+10h] [rbp-40h] BYREF
char v25[15]; // [rsp+11h] [rbp-3Fh] BYREF
void *__p; // [rsp+20h] [rbp-30h]
v24 = 20;
strcpy(v25, "animations");
v5 = cocos2d::CCDictionary::objectForKey(a3, &v24);
if ( (v24 & 1) != 0 )
operator delete(__p);
if ( v5 )
{
v24 = 20;
strcpy(v25, "properties");
v6 = a3;
v7 = cocos2d::CCDictionary::objectForKey(a3, &v24);
if ( (v24 & 1) != 0 )
{
v6 = (__int64)__p;
operator delete(__p);
}
if ( !v7 )
{
LABEL_21:
cocos2d::CCAnimationCache::parseVersion1(a1, v6, v5);
return;
}
v24 = 12;
strcpy(v25, "format");
v8 = cocos2d::CCDictionary::valueForKey(v7, (__int64)&v24);
v9 = cocos2d::CCString::intValue(v8);
if ( (v24 & 1) != 0 )
operator delete(__p);
v23 = v9;
v24 = 24;
strcpy(v25, "spritesheets");
v10 = &v24;
v6 = v7;
v11 = cocos2d::CCDictionary::objectForKey(v7, &v24);
v22 = v5;
if ( (v24 & 1) != 0 )
{
v6 = (__int64)__p;
operator delete(__p);
}
if ( v11 )
{
v12 = *(unsigned int **)(v11 + 56);
if ( *v12 )
{
v13 = *((__int64 **)v12 + 2);
v14 = (unsigned __int64)&v13[*v12 - 1];
if ( a4 )
{
do
{
v15 = *v13;
if ( !*v13 )
break;
v16 = cocos2d::CCFileUtils::sharedFileUtils(v6, v10);
CString = cocos2d::CCString::getCString(v15);
v18 = (const char *)(*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v16 + 80LL))(
v16,
CString,
a4);
v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v10 = (char *)v18;
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v6, v18, a1);
++v13;
}
while ( (unsigned __int64)v13 <= v14 );
}
else
{
do
{
v21 = *v13;
if ( !*v13 )
break;
v19 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v20 = (const char *)cocos2d::CCString::getCString(v21);
v6 = v19;
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile_2(v19, v20, a1);
++v13;
}
while ( (unsigned __int64)v13 <= v14 );
}
}
}
if ( v23 != 2 )
{
v5 = v22;
if ( v23 != 1 )
return;
goto LABEL_21;
}
cocos2d::CCAnimationCache::parseVersion2(v6, v22);
}
}