//
// ObjectManager::loadCopiedSets from 0x6ae368 to 0x6ae628 (704 bytes)
//
// 2 xrefs:
// > ObjectManager::init @ 0x6ae658
// > ??> @ 0x91eb8
//
// 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::loadCopiedSets(cocos2d::CCDictionary **this)
{
unsigned int v2; // w21
cocos2d::CCArray *v3; // x25
cocos2d::CCString *v4; // x0
__int64 v5; // x20
cocos2d::CCString *v6; // x26
const char *CString; // x0
size_t v8; // x0
cocos2d::CCString *v9; // x20
cocos2d::CCString *v10; // x24
cocos2d::CCString *v11; // x22
__int64 v12; // x20
const char *v13; // x0
size_t v14; // x0
ObjectManager *v15; // x0
cocos2d::CCDictionary *v16; // x3
cocos2d::CCObject *v17; // x20
__int64 v18; // 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);
v6 = v4;
CString = (const char *)cocos2d::CCString::getCString(v4);
v25 = 0;
v26 = 0;
v27 = nullptr;
v22 = (char *)CString;
v8 = strlen(CString);
std::string::__init(&v25, v22, v8);
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v5, &v25);
if ( (v25 & 1) != 0 )
operator delete(v27);
v25 = 0;
v26 = 0;
v27 = nullptr;
std::string::__init(&v25, "copy", 4u);
v10 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v9, &v25);
if ( (v25 & 1) != 0 )
operator delete(v27);
v25 = 0;
v26 = 0;
v27 = nullptr;
std::string::__init(&v25, "replaceTag", 0xAu);
v11 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v9, &v25);
if ( (v25 & 1) != 0 )
operator delete(v27);
if ( !v11 )
goto LABEL_15;
if ( v10 )
{
v12 = (__int64)*(this + 40);
v13 = (const char *)cocos2d::CCString::getCString(v10);
v25 = 0;
v26 = 0;
v27 = nullptr;
v23 = (char *)v13;
v14 = strlen(v13);
std::string::__init(&v25, v23, v14);
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v12, &v25);
if ( (v25 & 1) != 0 )
operator delete(v27);
}
v25 = 0;
v26 = 0;
v27 = nullptr;
std::string::__init(&v25, "xyz", 3u);
v15 = (ObjectManager *)cocos2d::CCString::create(&v25);
v17 = ObjectManager::replaceAllOccurencesOfString(v15, v11, v9, v16);
if ( (v25 & 1) != 0 )
operator delete(v27);
v18 = (__int64)*(this + 40);
v19 = (const char *)cocos2d::CCString::getCString(v6);
v25 = 0;
v26 = 0;
v27 = nullptr;
v24 = (char *)v19;
v20 = strlen(v19);
std::string::__init(&v25, v24, v20);
cocos2d::CCDictionary::setObject(v18, v17);
if ( (v25 & 1) != 0 )
{
++v2;
operator delete(v27);
}
else
{
LABEL_15:
++v2;
}
}
while ( v2 < (unsigned int)cocos2d::CCArray::count(v3) );
}
return _stack_chk_guard;
}