//
// GJSmartTemplate::saveRemapToDict from 0x53986c to 0x539906 (154 bytes)
//
// 7 xrefs:
// > GJSmartTemplate::saveRemap @ 0x53a5c2
// > GJSmartTemplate::saveRemap @ 0x53a600
// > GJSmartTemplate::saveRemap @ 0x53a644
// > GJSmartTemplate::saveRemap @ 0x53a6a2
// > GJSmartTemplate::saveRemap @ 0x53a6e0
// > GJSmartTemplate::saveRemap @ 0x53a73e
// > GJSmartTemplate::saveRemap @ 0x53a778
//
// 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
//
int __fastcall GJSmartTemplate::saveRemapToDict(
int a1,
const std::string *a2,
cocos2d::CCString *a3,
cocos2d::CCDictionary *a4)
{
cocos2d::CCArray *v6; // r4
unsigned int i; // r5
const std::string *v8; // r1
cocos2d::CCString *v9; // r0
char *CString; // r0
int v11; // r10
int result; // r0
cocos2d::CCObject *v13; // r0
_DWORD v14[2]; // [sp+8h] [bp-8h] BYREF
v14[0] = a3;
v14[1] = a4;
if ( *((_DWORD *)a2->m_data.m_data - 3) )
{
v6 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a4, a2);
if ( !v6 )
{
v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(nullptr);
cocos2d::CCDictionary::setObject((int)a4, v6);
}
for ( i = 0; i < cocos2d::CCArray::count(v6); ++i )
{
v9 = cocos2d::CCArray::stringAtIndex(v6, i);
CString = (char *)cocos2d::CCString::getCString(v9);
sub_776584((int)v14, CString);
v11 = sub_774DBC(v14, a3);
result = sub_774008(v14);
if ( !v11 )
return result;
}
v13 = (cocos2d::CCObject *)cocos2d::CCString::create(a3, v8);
return cocos2d::CCArray::addObject(v6, v13);
}
return result;
}