//
// sub_1006E64F0 from 0x1006e64f0 to 0x1006e6682 (402 bytes)
//
// 3 xrefs:
// > cocos2d::CCFileUtilsMac::writeToFile @ 0x1006e6491
// > sub_1006E64F0 @ 0x1006e6581
// > sub_1006E6D60 @ 0x1006e6ea1
//
// This function is hookable on this platform (idp: pc, 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:35:47 +0000
//
NSString *__fastcall sub_1006E64F0(__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
void *v11; // rax
__int64 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_1006E64F0(v9, *(_QWORD *)(v9 + 264), v8);
v9 = v10;
}
while ( v10 );
}
return (NSString *)objc_msgSend(a3, "setObject:forKey:", v8, v5);
}
v11 = __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_1006E6D60(*v15++, v8);
}
while ( (unsigned __int64)v15 <= v16 );
}
return (NSString *)objc_msgSend(a3, "setObject:forKey:", v8, v5);
}
}
return result;
}