//
// ObjectManager::loadCopiedAnimations from 0x14006e830 to 0x14006ed75 (1349 bytes)
//
// 2 xrefs:
// > ObjectManager::init @ 0x14006e4b9
// > ??> @ 0x1406c6120
//
// 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=3
void ObjectManager::loadCopiedAnimations(ObjectManager *a1)
{
ObjectManager *v1; // rdi
cocos2d::CCArray *v2; // rbx
unsigned int i; // r13d
cocos2d::CCString *v4; // rax
const char *CString; // rax
size_t v6; // r8
__int64 v7; // rbx
void *v8; // rcx
cocos2d::CCDictionary *v9; // r12
void *v10; // rcx
cocos2d::CCArray *v11; // r15
unsigned int j; // esi
cocos2d::CCString *v13; // r14
const char *v14; // rax
size_t v15; // r8
__int64 v16; // rbx
void *v17; // rcx
cocos2d::CCString *v18; // rbx
void *v19; // rcx
const char *v20; // rbx
__int64 v21; // rdi
void *v22; // rcx
size_t v23; // r8
__int64 v24; // rbx
void *v25; // rcx
const char *v26; // rax
size_t v27; // r8
void *v28; // rcx
cocos2d::CCArray *v30; // [rsp+28h] [rbp-41h]
__int128 v31; // [rsp+30h] [rbp-39h] BYREF
__int64 v32; // [rsp+40h] [rbp-29h]
unsigned __int64 v33; // [rsp+48h] [rbp-21h]
__int128 v34; // [rsp+50h] [rbp-19h] BYREF
__int64 v35; // [rsp+60h] [rbp-9h]
unsigned __int64 v36; // [rsp+68h] [rbp-1h]
_QWORD v37[2]; // [rsp+70h] [rbp+7h] BYREF
__int64 v38; // [rsp+80h] [rbp+17h]
unsigned __int64 v39; // [rsp+88h] [rbp+1Fh]
v1 = a1;
v2 = cocos2d::CCDictionary::allKeys(a1->m_objectDefinitions);
v30 = v2;
for ( i = 0; i < cocos2d::CCArray::count(v30); v2 = v30 )
{
v4 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v2, i);
CString = cocos2d::CCString::getCString(v4);
v31 = 0;
v32 = 0;
v33 = 0;
v6 = -1;
do
++v6;
while ( CString[v6] );
sub_14003A930(&v31, CString, v6);
v7 = cocos2d::CCDictionary::objectForKey(v1->m_objectDefinitions, &v31);
if ( v33 > 0xF )
{
v8 = (void *)v31;
if ( v33 + 1 >= 0x1000 )
{
v8 = *(void **)(v31 - 8);
if ( (unsigned __int64)(v31 - (_QWORD)v8 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v8);
}
v32 = 0;
v33 = 15;
LOBYTE(v31) = 0;
v37[1] = 29550;
v38 = 10;
v39 = 15;
v37[0] = 0x6F6974616D696E61LL;
v9 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey(v7, v37);
if ( v39 > 0xF )
{
v10 = (void *)v37[0];
if ( v39 + 1 >= 0x1000 )
{
v10 = *(void **)(v37[0] - 8LL);
if ( (unsigned __int64)(v37[0] - (_QWORD)v10 - 8LL) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v10);
}
v38 = 0;
v39 = 15;
LOBYTE(v37[0]) = 0;
if ( v9 )
{
v11 = cocos2d::CCDictionary::allKeys(v9);
for ( j = 0; j < cocos2d::CCArray::count(v11); ++j )
{
v13 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v11, j);
v14 = cocos2d::CCString::getCString(v13);
v34 = 0;
v35 = 0;
v36 = 0;
v15 = -1;
do
++v15;
while ( v14[v15] );
sub_14003A930(&v34, v14, v15);
v16 = cocos2d::CCDictionary::objectForKey(v9, &v34);
if ( v36 > 0xF )
{
v17 = (void *)v34;
if ( v36 + 1 >= 0x1000 )
{
v17 = *(void **)(v34 - 8);
if ( (unsigned __int64)(v34 - (_QWORD)v17 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v17);
}
v35 = 0;
v36 = 15;
LOBYTE(v34) = 0;
v31 = 0;
v32 = 4;
v33 = 15;
strcpy((char *)&v31, "copy");
v18 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v16, &v31);
if ( v33 > 0xF )
{
v19 = (void *)v31;
if ( v33 + 1 >= 0x1000 )
{
v19 = *(void **)(v31 - 8);
if ( (unsigned __int64)(v31 - (_QWORD)v19 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v19);
}
v32 = 0;
v33 = 15;
LOBYTE(v31) = 0;
if ( v18 )
{
v20 = cocos2d::CCString::getCString(v18);
v31 = 0;
v32 = 0;
v33 = 15;
*(_QWORD *)&v31 = sub_14003AA10(0x20u);
v32 = 16;
v33 = 31;
strcpy((char *)v31, "GlobalAnimations");
v21 = cocos2d::CCDictionary::objectForKey(v1->m_objectDefinitions, &v31);
if ( v33 > 0xF )
{
v22 = (void *)v31;
if ( v33 + 1 >= 0x1000 )
{
v22 = *(void **)(v31 - 8);
if ( (unsigned __int64)(v31 - (_QWORD)v22 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v22);
}
v32 = 0;
v33 = 15;
LOBYTE(v31) = 0;
v34 = 0;
v35 = 0;
v36 = 0;
v23 = -1;
do
++v23;
while ( v20[v23] );
sub_14003A930(&v34, v20, v23);
v24 = cocos2d::CCDictionary::objectForKey(v21, &v34);
if ( v36 > 0xF )
{
v25 = (void *)v34;
if ( v36 + 1 >= 0x1000 )
{
v25 = *(void **)(v34 - 8);
if ( (unsigned __int64)(v34 - (_QWORD)v25 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v25);
}
v35 = 0;
v36 = 15;
LOBYTE(v34) = 0;
v26 = cocos2d::CCString::getCString(v13);
v31 = 0;
v32 = 0;
v33 = 0;
v27 = -1;
do
++v27;
while ( v26[v27] );
sub_14003A930(&v31, v26, v27);
cocos2d::CCDictionary::setObject(v9, v24, &v31);
if ( v33 > 0xF )
{
v28 = (void *)v31;
if ( v33 + 1 >= 0x1000 )
{
v28 = *(void **)(v31 - 8);
if ( (unsigned __int64)(v31 - (_QWORD)v28 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v28);
}
v1 = a1;
}
}
}
++i;
}
}