//
// ObjectManager::loadCopiedAnimations from 0x6ad5e8 to 0x6ad8a8 (704 bytes)
//
// 2 xrefs:
// > ObjectManager::init @ 0x6ae650
// > ??> @ 0x85588
//
// 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 12:50:49 +0000
//
__int64 __fastcall ObjectManager::loadCopiedAnimations(cocos2d::CCDictionary **this)
{
unsigned int v2; // w27
cocos2d::CCArray *v3; // x28
cocos2d::CCString *v4; // x0
__int64 v5; // x20
const char *CString; // x0
size_t v7; // x0
__int64 v8; // x20
cocos2d::CCDictionary *v9; // x23
unsigned int v10; // w20
cocos2d::CCArray *v11; // x21
cocos2d::CCString *v12; // x24
const char *v13; // x0
size_t v14; // x0
__int64 v15; // x22
cocos2d::CCString *v16; // x22
const char *v17; // x0
cocos2d::CCObject *GlobalAnimCopy; // x22
const char *v19; // x0
size_t v20; // x0
char *v22; // [xsp+68h] [xbp+68h]
char *v23; // [xsp+68h] [xbp+68h]
char *v24; // [xsp+68h] [xbp+68h]
__int64 v25; // [xsp+70h] [xbp+70h] BYREF
__int64 v26; // [xsp+78h] [xbp+78h]
void *v27; // [xsp+80h] [xbp+80h]
v2 = 0;
v3 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*(this + 40));
if ( (unsigned int)cocos2d::CCArray::count(v3) )
{
do
{
v4 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v3, v2);
v5 = (__int64)*(this + 40);
CString = (const char *)cocos2d::CCString::getCString(v4);
v25 = 0;
v26 = 0;
v27 = nullptr;
v22 = (char *)CString;
v7 = strlen(CString);
std::string::__init(&v25, v22, v7);
v8 = cocos2d::CCDictionary::objectForKey(v5, &v25);
if ( (v25 & 1) != 0 )
operator delete(v27);
v25 = 0;
v26 = 0;
v27 = nullptr;
std::string::__init(&v25, "animations", 0xAu);
v9 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey(v8, &v25);
if ( (v25 & 1) != 0 )
operator delete(v27);
if ( v9 )
{
v10 = 0;
v11 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(v9);
if ( (unsigned int)cocos2d::CCArray::count(v11) )
{
do
{
v12 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v11, v10);
v13 = (const char *)cocos2d::CCString::getCString(v12);
v25 = 0;
v26 = 0;
v27 = nullptr;
v23 = (char *)v13;
v14 = strlen(v13);
std::string::__init(&v25, v23, v14);
v15 = cocos2d::CCDictionary::objectForKey(v9, &v25);
if ( (v25 & 1) != 0 )
operator delete(v27);
v25 = 0;
v26 = 0;
v27 = nullptr;
std::string::__init(&v25, "copy", 4u);
v16 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v15, &v25);
if ( (v25 & 1) != 0 )
operator delete(v27);
if ( !v16 )
goto LABEL_14;
v17 = (const char *)cocos2d::CCString::getCString(v16);
GlobalAnimCopy = (cocos2d::CCObject *)ObjectManager::getGlobalAnimCopy((ObjectManager *)this, v17);
v19 = (const char *)cocos2d::CCString::getCString(v12);
v25 = 0;
v26 = 0;
v27 = nullptr;
v24 = (char *)v19;
v20 = strlen(v19);
std::string::__init(&v25, v24, v20);
cocos2d::CCDictionary::setObject((int)v9, GlobalAnimCopy);
if ( (v25 & 1) != 0 )
{
++v10;
operator delete(v27);
}
else
{
LABEL_14:
++v10;
}
}
while ( v10 < (unsigned int)cocos2d::CCArray::count(v11) );
}
}
++v2;
}
while ( v2 < (unsigned int)cocos2d::CCArray::count(v3) );
}
return _stack_chk_guard;
}