//
// cocos2d::CCFileUtilsMac::createCCArrayWithContentsOfFile from 0x1006e6690 to 0x1006e68aa (538 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b93ff8
//
// 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
//
void *__fastcall cocos2d::CCFileUtilsMac::createCCArrayWithContentsOfFile(__int64 a1, __int64 a2)
{
__int64 v3; // rsi
__int64 v4; // rbx
_OWORD *v5; // r15
NSString *v6; // rax
NSArray *v7; // r14
void *v8; // rbx
id v9; // r15
__int64 v10; // r12
void *i; // r13
__int128 v13; // [rsp+0h] [rbp-110h] BYREF
__int128 v14; // [rsp+10h] [rbp-100h]
__int128 v15; // [rsp+20h] [rbp-F0h]
__int128 v16; // [rsp+30h] [rbp-E0h]
char v17; // [rsp+48h] [rbp-C8h] BYREF
_BYTE v18[15]; // [rsp+49h] [rbp-C7h] BYREF
void *__p; // [rsp+58h] [rbp-B8h]
_BYTE v20[128]; // [rsp+60h] [rbp-B0h] BYREF
v3 = qword_100BE8BA0;
if ( qword_100BE8BA0 )
{
if ( (*(_BYTE *)a2 & 1) != 0 )
{
LABEL_3:
v4 = *(_QWORD *)(a2 + 16);
goto LABEL_6;
}
}
else
{
v5 = operator new(0x88u);
*v5 = 0;
v5[1] = 0;
v5[2] = 0;
v5[3] = 0;
v5[4] = 0;
v5[5] = 0;
v5[6] = 0;
v5[7] = 0;
*((_QWORD *)v5 + 16) = 0;
cocos2d::CCFileUtils::CCFileUtils((__int64)v5);
*(_QWORD *)v5 = off_100B93EF8;
qword_100BE8BA0 = (__int64)v5;
cocos2d::CCFileUtils::init((__int64)v5);
v3 = qword_100BE8BA0;
if ( (*(_BYTE *)a2 & 1) != 0 )
goto LABEL_3;
}
v4 = a2 + 1;
LABEL_6:
(*(void (__fastcall **)(char *, __int64, __int64, _QWORD))(*(_QWORD *)v3 + 48LL))(&v17, v3, v4, 0);
if ( (v17 & 1) != 0 )
v6 = +[NSString stringWithUTF8String:](&OBJC_CLASS___NSString, "stringWithUTF8String:", __p);
else
v6 = +[NSString stringWithUTF8String:](&OBJC_CLASS___NSString, "stringWithUTF8String:", v18);
v7 = +[NSArray arrayWithContentsOfFile:](&OBJC_CLASS___NSArray, "arrayWithContentsOfFile:", v6);
v8 = operator new(0x40u);
sub_1007FE7B0(v8);
v16 = 0;
v15 = 0;
v14 = 0;
v13 = 0;
v9 = -[NSArray countByEnumeratingWithState:objects:count:](
v7,
"countByEnumeratingWithState:objects:count:",
&v13,
v20,
16);
if ( v9 )
{
v10 = *(_QWORD *)v14;
do
{
for ( i = nullptr; i != v9; i = (char *)i + 1 )
{
if ( *(_QWORD *)v14 != v10 )
objc_enumerationMutation(v7);
sub_1006E6910(*(id *)(*((_QWORD *)&v13 + 1) + 8LL * (_QWORD)i));
}
v9 = -[NSArray countByEnumeratingWithState:objects:count:](
v7,
"countByEnumeratingWithState:objects:count:",
&v13,
v20,
16);
}
while ( v9 );
}
if ( (v17 & 1) != 0 )
operator delete(__p);
return v8;
}