//
// sub_10060CD10 from 0x10060cd10 to 0x10060cea2 (402 bytes)
//
// 3 xrefs:
// > cocos2d::CCFileUtilsMac::writeToFile @ 0x10060ccb1
// > sub_10060CD10 @ 0x10060cda1
// > sub_10060D580 @ 0x10060d6c1
//
// 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
//
NSString *__fastcall sub_10060CD10(__int64 a1, const void *a2, void *a3)
{
NSString *result; // rax
NSString *v5; // r14
_QWORD *v6; // rax
_QWORD *v7; // r13
NSString *v8; // r15
__int64 v9; // rdi
__int64 v10; // r12
cocos2d::CCString *v11; // rax
const char *CString; // rax
NSString *v13; // r12
unsigned int *v14; // rax
_QWORD *v15; // r12
unsigned __int64 v16; // r13
result = +[NSString stringWithCString:encoding:](&OBJC_CLASS___NSString, "stringWithCString:encoding:", a1, 4);
if ( a2 )
{
v5 = result;
v6 = __dynamic_cast(
a2,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCDictionary,
0);
if ( v6 )
{
v7 = v6;
v8 = (NSString *)+[NSMutableDictionary dictionary](&OBJC_CLASS___NSMutableDictionary, "dictionary");
v9 = v7[7];
if ( v9 )
{
do
{
v10 = *(_QWORD *)(v9 + 288);
sub_10060CD10(v9, *(_QWORD *)(v9 + 264), v8);
v9 = v10;
}
while ( v10 );
}
return (NSString *)objc_msgSend(a3, "setObject:forKey:", v8, v5);
}
v11 = (cocos2d::CCString *)__dynamic_cast(
a2,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCString,
0);
if ( v11 )
{
CString = cocos2d::CCString::getCString(v11);
v8 = +[NSString stringWithCString:encoding:](&OBJC_CLASS___NSString, "stringWithCString:encoding:", CString, 4);
return (NSString *)objc_msgSend(a3, "setObject:forKey:", v8, v5);
}
result = (NSString *)__dynamic_cast(
a2,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCArray,
0);
if ( result )
{
v13 = result;
v8 = (NSString *)+[NSMutableArray array](&OBJC_CLASS___NSMutableArray, "array");
v14 = (unsigned int *)v13[7];
if ( *v14 )
{
v15 = *((_QWORD **)v14 + 2);
v16 = (unsigned __int64)&v15[*v14 - 1];
do
{
if ( !*v15 )
break;
sub_10060D580(*v15++, v8);
}
while ( (unsigned __int64)v15 <= v16 );
}
return (NSString *)objc_msgSend(a3, "setObject:forKey:", v8, v5);
}
}
return result;
}