//
// cocos2d::CCFileUtils::getFileData from 0x7e7c14 to 0x7e7cd6 (194 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:55 +0000
//
void *__fastcall cocos2d::CCFileUtils::getFileData(
cocos2d::CCFileUtils *this,
char *a2,
const char *a3,
unsigned int *a4)
{
char *v7; // r0
FILE *v8; // r0
FILE *v9; // r4
void *v10; // r8
_DWORD *v11; // r0
int v13[2]; // [sp+0h] [bp-14h] BYREF
char *filename; // [sp+8h] [bp-Ch]
*a4 = 0;
(*(void (__fastcall **)(int *, cocos2d::CCFileUtils *, char *))(*(_DWORD *)this + 24))(v13, this, a2);
if ( (v13[0] & 1) != 0 )
v7 = filename;
else
v7 = (char *)v13 + 1;
v8 = fopen(v7, a3);
v9 = v8;
if ( v8 )
{
fseek(v8, 0, 2);
*a4 = ftell(v9);
fseek(v9, 0, 0);
v10 = (void *)operator new[](*a4);
*a4 = fread(v10, 1u, *a4, v9);
fclose(v9);
}
else
{
std::string::~string((int)v13);
v13[0] = 0;
v13[1] = 0;
filename = nullptr;
std::string::__init(v13, "Get data from file(", 0x13u);
v11 = std::string::append(v13, a2);
v10 = nullptr;
std::string::append(v11, ") failed!");
}
std::string::~string((int)v13);
return v10;
}