//
// sub_1002EA418 from 0x1002ea418 to 0x1002ea600 (488 bytes)
//
// 1 xrefs:
// > ObjectManager::init @ 0x1002ea3f0
//
// 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:02:52 +0000
//
__int64 __fastcall sub_1002EA418(__int64 a1)
{
__int64 v2; // x20
__int64 result; // x0
unsigned int i; // w21
__int64 v5; // x0
__int64 v6; // x24
char *CString; // x0
__int64 v8; // x24
__int64 v9; // x0
__int64 v10; // x24
__int64 v11; // x25
unsigned int j; // w26
__int64 v13; // x27
char *v14; // x0
__int64 v15; // x28
__int64 v16; // x0
__int64 v17; // x28
__int64 v18; // x0
__int64 v19; // x28
char *v20; // x0
void *__p[2]; // [xsp+8h] [xbp-68h] BYREF
char v22; // [xsp+1Fh] [xbp-51h]
v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 320));
result = sub_1002E757C(v2);
if ( (_DWORD)result )
{
for ( i = 0; i < (unsigned int)result; ++i )
{
v5 = sub_1002E75A0(v2, i);
v6 = *(_QWORD *)(a1 + 320);
CString = (char *)cocos2d::CCString::getCString(v5);
sub_100009900(__p, CString);
v8 = cocos2d::CCDictionary::objectForKey(v6, __p);
if ( v22 < 0 )
operator delete(__p[0]);
sub_100009900(__p, "animations");
v9 = cocos2d::CCDictionary::objectForKey(v8, __p);
v10 = v9;
if ( v22 < 0 )
{
operator delete(__p[0]);
if ( !v10 )
goto LABEL_20;
}
else if ( !v9 )
{
goto LABEL_20;
}
v11 = cocos2d::CCDictionary::allKeys(v10);
if ( (unsigned int)sub_1002E757C(v11) )
{
for ( j = 0; j < (unsigned int)sub_1002E757C(v11); ++j )
{
v13 = sub_1002E75A0(v11, j);
v14 = (char *)cocos2d::CCString::getCString(v13);
sub_100009900(__p, v14);
v15 = cocos2d::CCDictionary::objectForKey(v10, __p);
if ( v22 < 0 )
operator delete(__p[0]);
sub_100009900(__p, "copy");
v16 = cocos2d::CCDictionary::objectForKey(v15, __p);
v17 = v16;
if ( v22 < 0 )
{
operator delete(__p[0]);
if ( v17 )
{
LABEL_17:
v18 = cocos2d::CCString::getCString(v17);
v19 = sub_1002EAA44(a1, v18);
v20 = (char *)cocos2d::CCString::getCString(v13);
sub_100009900(__p, v20);
cocos2d::CCDictionary::setObject(v10, v19, __p);
if ( v22 < 0 )
operator delete(__p[0]);
}
}
else if ( v16 )
{
goto LABEL_17;
}
}
}
LABEL_20:
result = sub_1002E757C(v2);
}
}
return result;
}