//
// sub_1003C11CC from 0x1003c11cc to 0x1003c16b0 (1252 bytes)
//
// 1 xrefs:
// > sub_1003C06B4 @ 0x1003c0844
//
// This function is hookable on this platform (idp: arm, 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 11:04:02 +0000
//
__int64 __fastcall sub_1003C11CC(__int64 a1, char *a2)
{
__int64 v3; // x0
char *v4; // x1
__int64 v5; // x20
__int64 result; // x0
unsigned int i; // w24
__int64 v8; // x28
char *CString; // x0
__int64 v10; // x26
__int64 v11; // x0
__int64 v12; // x25
__int64 v13; // x0
_BOOL4 v14; // w27
__int64 v15; // x0
_BOOL4 v16; // w22
__int64 v17; // x0
bool v18; // w21
__int64 v19; // x0
__int64 v20; // x20
char *v21; // x0
bool v22; // w23
__int64 v23; // x0
float v24; // s8
char *v25; // x0
__int64 v26; // x22
char *v27; // x1
char *v28; // x0
_BYTE *v29; // x20
__int64 v30; // x20
__int64 v31; // x0
__int64 v32; // x23
int v33; // w8
__int64 v34; // x26
__int64 v35; // x23
__int64 v36; // x0
_DWORD *v37; // x0
__int64 v38; // x0
char v39; // w0
__int64 v40; // x1
__int64 v41; // x2
__int64 v42; // x3
__int64 v43; // x4
__int64 v44; // x5
__int64 v45; // x6
__int64 v46; // x7
char *v47; // x0
__int64 v48; // [xsp+20h] [xbp-2F0h]
__int64 v49; // [xsp+28h] [xbp-2E8h]
__int64 v51; // [xsp+40h] [xbp-2D0h]
void *v52[2]; // [xsp+48h] [xbp-2C8h] BYREF
char v53; // [xsp+5Fh] [xbp-2B1h]
void *v54[2]; // [xsp+60h] [xbp-2B0h] BYREF
char v55; // [xsp+77h] [xbp-299h]
void *v56[2]; // [xsp+78h] [xbp-298h] BYREF
char v57; // [xsp+8Fh] [xbp-281h]
void *__p[2]; // [xsp+90h] [xbp-280h] BYREF
char *v59; // [xsp+A0h] [xbp-270h]
_BYTE v60[504]; // [xsp+A8h] [xbp-268h] BYREF
v48 = cocos2d::CCAnimationCache::sharedAnimationCache();
v3 = ObjectManager::instance();
v4 = a2;
if ( a2[23] < 0 )
v4 = *(char **)a2;
v5 = sub_1002EAFA8(v3, v4);
sub_100009900(__p, "animations");
v49 = cocos2d::CCDictionary::objectForKey(v5, __p);
if ( SHIBYTE(v59) < 0 )
operator delete(__p[0]);
v51 = cocos2d::CCDictionary::allKeys(v49);
result = sub_1002E757C(v51);
if ( (_DWORD)result )
{
for ( i = 0; i < (unsigned int)result; ++i )
{
v8 = sub_1002E75A0(v51, i);
CString = (char *)cocos2d::CCString::getCString(v8);
sub_100009900(__p, CString);
v10 = cocos2d::CCDictionary::objectForKey(v49, __p);
if ( SHIBYTE(v59) < 0 )
operator delete(__p[0]);
sub_100009900(__p, "prio");
v11 = cocos2d::CCDictionary::valueForKey(v10, __p);
v12 = cocos2d::CCString::intValue(v11);
if ( SHIBYTE(v59) < 0 )
operator delete(__p[0]);
sub_100009900(__p, "looped");
v13 = cocos2d::CCDictionary::valueForKey(v10, __p);
v14 = cocos2d::CCString::boolValue(v13);
if ( SHIBYTE(v59) < 0 )
operator delete(__p[0]);
sub_100009900(__p, "usesParts");
v15 = cocos2d::CCDictionary::valueForKey(v10, __p);
v16 = cocos2d::CCString::boolValue(v15);
if ( SHIBYTE(v59) < 0 )
operator delete(__p[0]);
sub_100009900(__p, "dontPlayNext");
v17 = cocos2d::CCDictionary::valueForKey(v10, __p);
v18 = cocos2d::CCString::boolValue(v17);
if ( SHIBYTE(v59) < 0 )
operator delete(__p[0]);
sub_100009900(__p, "sound");
v19 = cocos2d::CCDictionary::objectForKey(v10, __p);
v20 = v19;
if ( SHIBYTE(v59) < 0 )
{
operator delete(__p[0]);
if ( !v20 )
goto LABEL_31;
}
else if ( !v19 )
{
goto LABEL_31;
}
v21 = (char *)cocos2d::CCString::getCString(v20);
sub_100009900(__p, v21);
sub_100009900(v56, "0");
v22 = sub_1000045BC(__p, v56);
if ( v57 < 0 )
operator delete(v56[0]);
if ( SHIBYTE(v59) < 0 )
{
operator delete(__p[0]);
if ( v22 )
goto LABEL_31;
}
else if ( v22 )
{
goto LABEL_31;
}
sub_100009900(__p, "soundDelay");
v23 = cocos2d::CCDictionary::objectForKey(v10, __p);
v24 = cocos2d::CCString::floatValue(v23);
if ( SHIBYTE(v59) < 0 )
operator delete(__p[0]);
v25 = (char *)cocos2d::CCString::getCString(v8);
sub_100009900(v54, v25);
sub_1003C1764(a1, v20, v54, v24);
if ( v55 < 0 )
operator delete(v54[0]);
LABEL_31:
if ( v16 )
v26 = 2;
else
v26 = 1;
*(_OWORD *)__p = xmmword_10075BA80;
v59 = v60;
v27 = a2;
if ( a2[23] < 0 )
v27 = *(char **)a2;
sub_10000CB50((__int64 *)__p, v27, 0);
sub_10000CB50((__int64 *)__p, "_", 0);
v28 = (char *)cocos2d::CCString::getCString(v8);
sub_10000CB50((__int64 *)__p, v28, 0);
v29 = __p[0];
if ( __p[1] < (char *)__p[0] + 1 )
sub_100009ED4((__int64)__p, (size_t)__p[0] + 1);
v29[(_QWORD)v59] = 0;
v30 = cocos2d::CCAnimationCache::animationByName(v48, v59);
sub_100009900(v56, "singleFrame");
v31 = cocos2d::CCDictionary::objectForKey(v10, v56);
v32 = v31;
if ( v57 < 0 )
{
operator delete(v56[0]);
if ( v32 )
{
LABEL_40:
v33 = 2;
v34 = v30;
v35 = v30;
goto LABEL_50;
}
}
else if ( v31 )
{
goto LABEL_40;
}
v36 = sub_1002E75A0(*(_QWORD *)(v30 + 72), 0);
v34 = v36;
if ( *(_DWORD *)(v36 + 28) == 14 )
v34 = *(_QWORD *)(v36 + 56);
v37 = cocos2d::CCAnimate::create(v30);
v35 = (__int64)v37;
v37[7] = 0;
if ( v14 )
{
v38 = (__int64)cocos2d::CCRepeatForever::create((__int64)v37);
LABEL_49:
v30 = v38;
v33 = 0;
goto LABEL_50;
}
if ( !v18 )
{
v39 = (unsigned __int8)cocos2d::CCCallFunc::create(a1, (__int64)sub_1003C17C4, 0);
v38 = sub_10021D420(v35, v40, v41, v42, v43, v44, v45, v46, v39);
goto LABEL_49;
}
v33 = 0;
v30 = (__int64)v37;
LABEL_50:
*(_DWORD *)(v30 + 28) = v33;
v47 = (char *)cocos2d::CCString::getCString(v8);
sub_100009900(v52, v47);
SpriteAnimationManager::storeAnimation(a1, v35, v30, v52, v12, v26, v34);
if ( v53 < 0 )
operator delete(v52[0]);
if ( v59 != v60 )
{
if ( v59 )
operator delete[](v59);
}
result = sub_1002E757C(v51);
}
}
return result;
}