//
// GJSmartTemplate::saveRemapToDict from 0x100005420 to 0x100005508 (232 bytes)
//
// 7 xrefs:
// > GJSmartTemplate::saveRemap @ 0x100004758
// > GJSmartTemplate::saveRemap @ 0x1000047e4
// > GJSmartTemplate::saveRemap @ 0x100004880
// > GJSmartTemplate::saveRemap @ 0x100004964
// > GJSmartTemplate::saveRemap @ 0x1000049f0
// > GJSmartTemplate::saveRemap @ 0x100004ad4
// > GJSmartTemplate::saveRemap @ 0x100004b60
//
// 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
//
void __fastcall GJSmartTemplate::saveRemapToDict(__int64 a1, __int64 a2, _QWORD *a3, __int64 a4)
{
__int64 v7; // x8
cocos2d::CCArray *v8; // x20
unsigned int v9; // w21
cocos2d::CCString *v10; // x0
char *CString; // x0
bool v12; // w22
__int64 v13; // x0
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v15; // [xsp+1Fh] [xbp-21h]
v7 = *(char *)(a2 + 23);
if ( v7 < 0 )
v7 = *(_QWORD *)(a2 + 8);
if ( v7 )
{
v8 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey_1(a4, a2);
if ( !v8 )
{
v8 = (cocos2d::CCArray *)sub_10024A15C();
cocos2d::CCDictionary::setObject_1(a4, v8, a2);
}
if ( (unsigned int)sub_10024A36C(v8) )
{
v9 = 0;
while ( 1 )
{
v10 = cocos2d::CCArray::stringAtIndex(v8, v9);
CString = (char *)cocos2d::CCString::getCString(v10);
sub_100009900((int)__p, CString);
v12 = sub_1000045BC(__p, a3);
if ( v15 < 0 )
operator delete(__p[0]);
if ( v12 )
break;
if ( ++v9 >= (unsigned int)sub_10024A36C(v8) )
goto LABEL_12;
}
}
else
{
LABEL_12:
v13 = sub_100268E48(a3);
sub_10024A2D0(v8, v13);
}
}
}