//
// SpriteAnimationManager::createAnimations from 0x140072fd0 to 0x140073b89 (3001 bytes)
//
// 3 xrefs:
// > ObjectManager::setup @ 0x14006e776
// > SpriteAnimationManager::initWithOwner @ 0x1400725ab
// > ??> @ 0x1406c630c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=14
void __fastcall SpriteAnimationManager::createAnimations(_QWORD *a1)
{
_BYTE *v2; // rbx
ObjectManager *v3; // rdi
size_t v4; // r8
__int64 v5; // rbx
void *v6; // rcx
_BYTE *v7; // rbx
ObjectManager *v8; // rdi
size_t v9; // r8
__int64 v10; // rax
void *v11; // rcx
cocos2d::CCAnimationCache *v12; // rsi
const char *v13; // rbx
ObjectManager *v14; // rax
cocos2d::CCDictionary *Definition; // rax
cocos2d::CCDictionary *v16; // rdi
cocos2d::CCArray *v17; // rbx
unsigned int v18; // r13d
cocos2d::CCString *v19; // rax
const char *CString; // rax
size_t v21; // r8
__int64 v22; // rdi
float v23; // xmm6_4
cocos2d::CCString *v24; // rbx
__int64 v25; // rcx
cocos2d::CCArray *v26; // r15
cocos2d::CCString *v27; // rbx
void *v28; // rcx
bool v29; // r14
cocos2d::CCString *v30; // rbx
void *v31; // rcx
char *v32; // rax
size_t v33; // r8
const char *v34; // r8
const char *v35; // rdx
cocos2d::CCString *v36; // rax
__int64 v37; // rbx
void *v38; // rcx
cocos2d::CCString *v39; // rax
const char *v40; // rax
size_t v41; // r8
const char *v42; // rbx
cocos2d::CCSpriteFrameCache *v43; // rax
struct cocos2d::CCSpriteFrame *v44; // rbx
__int128 *v45; // rdx
size_t v46; // r8
const char *v47; // rdx
const char *v48; // r8
cocos2d::CCString *v49; // rax
const char *v50; // rax
void *v51; // rcx
cocos2d::CCString *v52; // rax
bool v53; // bl
cocos2d::CCString *v54; // rax
int v55; // esi
void *v56; // rcx
int v57; // edi
const char *v58; // rdx
cocos2d::CCString *v59; // rax
const char *v60; // rbx
cocos2d::CCSpriteFrameCache *v61; // rax
struct cocos2d::CCSpriteFrame *v62; // rax
int j; // ebx
const char *v64; // rdx
struct cocos2d::CCString *v65; // rax
cocos2d::CCString *v66; // rax
const char *v67; // rax
size_t v68; // r8
void *v69; // rcx
void **v70; // rdx
size_t v71; // r8
cocos2d::CCArray *v72; // rsi
void *v73; // rcx
unsigned int i; // edi
cocos2d::CCString *v75; // rax
unsigned int v76; // eax
__int128 *v77; // rdx
cocos2d::CCString *v78; // rax
const char *v79; // rbx
cocos2d::CCSpriteFrameCache *v80; // rax
struct cocos2d::CCString *v81; // rax
struct cocos2d::CCAnimation *v82; // rbx
const char *v83; // rdx
const char *v84; // r8
cocos2d::CCString *v85; // rax
const char *v86; // rax
cocos2d::CCAnimationCache *v87; // [rsp+28h] [rbp-E0h]
cocos2d::CCArray *v88; // [rsp+30h] [rbp-D8h]
cocos2d::CCDictionary *v89; // [rsp+38h] [rbp-D0h]
__int128 v90; // [rsp+48h] [rbp-C0h] BYREF
__int64 v91; // [rsp+58h] [rbp-B0h]
unsigned __int64 v92; // [rsp+60h] [rbp-A8h]
__int128 v93; // [rsp+68h] [rbp-A0h] BYREF
__int64 v94; // [rsp+78h] [rbp-90h]
unsigned __int64 v95; // [rsp+80h] [rbp-88h]
void *Block[2]; // [rsp+88h] [rbp-80h] BYREF
__int128 v97; // [rsp+98h] [rbp-70h]
__int128 v98; // [rsp+A8h] [rbp-60h] BYREF
__int64 v99; // [rsp+B8h] [rbp-50h]
unsigned __int64 v100; // [rsp+C0h] [rbp-48h]
__int128 v101; // [rsp+C8h] [rbp-40h] BYREF
__int64 v102; // [rsp+D8h] [rbp-30h]
unsigned __int64 v103; // [rsp+E0h] [rbp-28h]
_QWORD v104[4]; // [rsp+E8h] [rbp-20h] BYREF
__int128 v105; // [rsp+108h] [rbp+0h] BYREF
__int64 v106; // [rsp+118h] [rbp+10h]
__int64 v107; // [rsp+120h] [rbp+18h]
v2 = a1;
if ( a1[3] > 0xFu )
v2 = (_BYTE *)*a1;
v3 = ObjectManager::instance();
*(_OWORD *)Block = 0;
v97 = 0;
v4 = -1;
do
++v4;
while ( v2[v4] );
sub_14003A930(Block, v2, v4);
v5 = cocos2d::CCDictionary::objectForKey(v3->m_loadedAnimations, Block);
if ( *((_QWORD *)&v97 + 1) > 0xFu )
{
v6 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v97 + 1) + 1LL) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v6);
}
if ( !v5 )
{
v7 = a1;
if ( a1[3] > 0xFu )
v7 = (_BYTE *)*a1;
v8 = ObjectManager::instance();
*(_OWORD *)Block = 0;
v97 = 0;
v9 = -1;
do
++v9;
while ( v7[v9] );
sub_14003A930(Block, v7, v9);
v10 = cocos2d::CCNode::create();
cocos2d::CCDictionary::setObject(v8->m_loadedAnimations, v10, Block);
if ( *((_QWORD *)&v97 + 1) > 0xFu )
{
v11 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v97 + 1) + 1LL) >= 0x1000 )
{
v11 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v11);
}
v12 = (cocos2d::CCAnimationCache *)cocos2d::CCAnimationCache::sharedAnimationCache();
v87 = v12;
v13 = (const char *)a1;
if ( a1[3] > 0xFu )
v13 = (const char *)*a1;
v14 = ObjectManager::instance();
Definition = ObjectManager::getDefinition(v14, v13);
v104[1] = 29550;
v104[2] = 10;
v104[3] = 15;
v104[0] = 0x6F6974616D696E61LL;
v16 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey(Definition, v104);
v89 = v16;
sub_14003A830((__int64)v104);
v17 = cocos2d::CCDictionary::allKeys(v16);
v88 = v17;
v18 = 0;
if ( cocos2d::CCArray::count(v17) )
{
while ( 1 )
{
v19 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v17, v18);
CString = cocos2d::CCString::getCString(v19);
v101 = 0;
v102 = 0;
v103 = 0;
v21 = -1;
do
++v21;
while ( CString[v21] );
sub_14003A930(&v101, CString, v21);
v22 = cocos2d::CCDictionary::objectForKey(v16, &v101);
v23 = 0.0;
v93 = 0;
v94 = 5;
v95 = 15;
strcpy((char *)&v93, "delay");
v24 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v22, &v93);
sub_14003A830((__int64)&v93);
if ( v24 )
v23 = cocos2d::CCString::floatValue(v24);
v26 = (cocos2d::CCArray *)cocos2d::CCArray::create(v25);
*((_QWORD *)&v90 + 1) = 115;
v91 = 9;
v92 = 15;
*(_QWORD *)&v90 = 0x7472615073657375LL;
v27 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v22, &v90);
if ( v92 > 0xF )
{
v28 = (void *)v90;
if ( v92 + 1 >= 0x1000 )
{
v28 = *(void **)(v90 - 8);
if ( (unsigned __int64)(v90 - (_QWORD)v28 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v28);
}
v91 = 0;
v92 = 15;
LOBYTE(v90) = 0;
v29 = 0;
if ( v27 )
v29 = cocos2d::CCString::boolValue(v27);
v91 = 13;
v92 = 15;
strcpy((char *)&v90, "animFrameName");
HIWORD(v90) = 0;
v30 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v22, &v90);
if ( v92 > 0xF )
{
v31 = (void *)v90;
if ( v92 + 1 >= 0x1000 )
{
v31 = *(void **)(v90 - 8);
if ( (unsigned __int64)(v90 - (_QWORD)v31 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v31);
}
v91 = 0;
v92 = 15;
LOBYTE(v90) = 0;
v98 = 0;
v99 = 0;
v100 = 15;
LOBYTE(v98) = 0;
if ( v30 )
{
v32 = (char *)cocos2d::CCString::getCString(v30);
v33 = -1;
do
++v33;
while ( v32[v33] );
}
else
{
v34 = (const char *)&v101;
if ( v103 > 0xF )
v34 = (const char *)v101;
v35 = (const char *)a1;
if ( a1[3] > 0xFu )
v35 = (const char *)*a1;
v36 = cocos2d::CCString::createWithFormat("%s_%s", v35, v34);
v32 = (char *)cocos2d::CCString::getCString(v36);
v33 = -1;
do
++v33;
while ( v32[v33] );
}
sub_14003CCE0((void **)&v98, v32, v33);
v91 = 11;
v92 = 15;
*(_QWORD *)&v90 = 0x7246656C676E6973LL;
*((_QWORD *)&v90 + 1) = 6647137;
v37 = cocos2d::CCDictionary::objectForKey(v22, &v90);
if ( v92 > 0xF )
{
v38 = (void *)v90;
if ( v92 + 1 >= 0x1000 )
{
v38 = *(void **)(v90 - 8);
if ( (unsigned __int64)(v90 - (_QWORD)v38 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v38);
}
v95 = 15;
v93 = 0;
if ( v37 )
{
v94 = 11;
strcpy((char *)&v93, "singleFrame");
v39 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v22, &v93);
v40 = cocos2d::CCString::getCString(v39);
v90 = 0;
v91 = 0;
v92 = 0;
v41 = -1;
do
++v41;
while ( v40[v41] );
sub_14003A930(&v90, v40, v41);
sub_14003A830((__int64)&v93);
if ( v29 )
{
v45 = &v90;
if ( v92 > 0xF )
v45 = (__int128 *)v90;
v105 = 0;
v106 = 0;
v107 = 0;
v46 = -1;
do
++v46;
while ( *((_BYTE *)v45 + v46) );
sub_14003A930(&v105, v45, v46);
v44 = (struct cocos2d::CCSpriteFrame *)cocos2d::CCString::create(&v105);
sub_14003A830((__int64)&v105);
v44->m_eObjType = 1;
}
else
{
v42 = (const char *)&v90;
if ( v92 > 0xF )
v42 = (const char *)v90;
v43 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v44 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v43, v42);
v44->m_eObjType = 2;
}
v47 = (const char *)a1;
if ( a1[3] > 0xFu )
v47 = (const char *)*a1;
v48 = (const char *)&v101;
if ( v103 > 0xF )
v48 = (const char *)v101;
v49 = cocos2d::CCString::createWithFormat("%s_%s", v47, v48);
v50 = cocos2d::CCString::getCString(v49);
cocos2d::CCAnimationCache::addAnimation(v12, (struct cocos2d::CCAnimation *)v44, v50);
if ( v92 > 0xF )
{
v51 = (void *)v90;
if ( v92 + 1 >= 0x1000 )
{
v51 = *(void **)(v90 - 8);
if ( (unsigned __int64)(v90 - (_QWORD)v51 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v51);
}
}
else
{
v94 = 5;
strcpy((char *)&v93, "other");
v52 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v22, &v93);
v53 = cocos2d::CCString::boolValue(v52);
sub_14003A830((__int64)&v93);
if ( v53 )
{
v90 = 0;
v91 = 6;
v92 = 15;
strcpy((char *)&v90, "frames");
v66 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v22, &v90);
v67 = cocos2d::CCString::getCString(v66);
*(_OWORD *)Block = 0;
v97 = 0u;
v68 = -1;
do
++v68;
while ( v67[v68] );
sub_14003A930(Block, v67, v68);
if ( v92 > 0xF )
{
v69 = (void *)v90;
if ( v92 + 1 >= 0x1000 )
{
v69 = *(void **)(v90 - 8);
if ( (unsigned __int64)(v90 - (_QWORD)v69 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v69);
}
v91 = 0;
v92 = 15;
LOBYTE(v90) = 0;
v70 = Block;
if ( *((_QWORD *)&v97 + 1) > 0xFu )
v70 = (void **)Block[0];
v93 = 0;
v94 = 0;
v95 = 0;
v71 = -1;
do
++v71;
while ( *((_BYTE *)v70 + v71) );
sub_14003A930(&v93, v70, v71);
v72 = sub_140072070((__int64 *)&v93);
if ( v95 > 0xF )
{
v73 = (void *)v93;
if ( v95 + 1 >= 0x1000 )
{
v73 = *(void **)(v93 - 8);
if ( (unsigned __int64)(v93 - (_QWORD)v73 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v73);
}
v94 = 0;
v95 = 15;
LOBYTE(v93) = 0;
for ( i = 0; i < cocos2d::CCArray::count(v72); ++i )
{
v75 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v72, i);
v76 = cocos2d::CCString::intValue(v75);
v77 = &v98;
if ( v29 )
{
if ( v100 > 0xF )
v77 = (__int128 *)v98;
v81 = cocos2d::CCString::createWithFormat("%s_%03d.png", v77, v76);
v81->m_eObjType = 1;
}
else
{
if ( v100 > 0xF )
v77 = (__int128 *)v98;
v78 = cocos2d::CCString::createWithFormat("%s_%03d.png", v77, v76);
v79 = cocos2d::CCString::getCString(v78);
v80 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v81 = (struct cocos2d::CCString *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v80, v79);
v81->m_eObjType = 2;
}
cocos2d::CCArray::addObject(v26, v81);
}
sub_14003A830((__int64)Block);
}
else
{
v93 = 0;
v94 = 6;
v95 = 15;
strcpy((char *)&v93, "frames");
v54 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v22, &v93);
v55 = cocos2d::CCString::intValue(v54);
if ( v95 > 0xF )
{
v56 = (void *)v93;
if ( v95 + 1 >= 0x1000 )
{
v56 = *(void **)(v93 - 8);
if ( (unsigned __int64)(v93 - (_QWORD)v56 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v56);
}
v57 = 1;
if ( v55 >= 1 )
{
if ( v29 )
{
for ( j = 1; j <= v55; ++j )
{
v64 = (const char *)&v98;
if ( v100 > 0xF )
v64 = (const char *)v98;
v65 = cocos2d::CCString::createWithFormat("%s_%03d.png", v64, j);
v65->m_eObjType = 1;
cocos2d::CCArray::addObject(v26, v65);
}
}
else
{
do
{
v58 = (const char *)&v98;
if ( v100 > 0xF )
v58 = (const char *)v98;
v59 = cocos2d::CCString::createWithFormat("%s_%03d.png", v58, v57);
v60 = cocos2d::CCString::getCString(v59);
v61 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v62 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v61, v60);
v62->m_eObjType = 2;
cocos2d::CCArray::addObject(v26, v62);
++v57;
}
while ( v57 <= v55 );
}
}
}
v82 = cocos2d::CCAnimation::createWithSpriteFrames(v26, v23);
v83 = (const char *)a1;
if ( a1[3] > 0xFu )
v83 = (const char *)*a1;
v84 = (const char *)&v101;
if ( v103 > 0xF )
v84 = (const char *)v101;
v85 = cocos2d::CCString::createWithFormat("%s_%s", v83, v84);
v86 = cocos2d::CCString::getCString(v85);
v12 = v87;
cocos2d::CCAnimationCache::addAnimation(v87, v82, v86);
}
sub_14003A830((__int64)&v98);
sub_14003A830((__int64)&v101);
++v18;
v17 = v88;
if ( v18 >= cocos2d::CCArray::count(v88) )
break;
v16 = v89;
}
}
}
sub_14003A830((__int64)a1);
}