//
// cocos2d::CCFileUtilsAndroid::doGetFileData from 0x7eb08c to 0x7eb1fe (370 bytes)
//
// 2 xrefs:
// > cocos2d::CCFileUtilsAndroid::getFileData @ 0x7eb21a
// > cocos2d::CCFileUtilsAndroid::getFileDataForAsync @ 0x7eb228
//
// 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:59 +0000
//
void *__fastcall cocos2d::CCFileUtilsAndroid::doGetFileData(
cocos2d::CCFileUtilsAndroid *this,
char *a2,
const char *a3,
unsigned int *a4,
bool a5)
{
void *result; // r0
char *v10; // r3
char *v11; // r4
size_t v12; // r0
int FileData; // r0
int v14; // r10
char *v15; // r4
size_t v16; // r0
void *v17; // r4
char *v18; // r0
FILE *v19; // r0
FILE *v20; // r8
_DWORD *v21; // r0
unsigned int v22; // r6
size_t v23; // r6
char v24; // [sp+4h] [bp-1Ch] BYREF
char filename[7]; // [sp+5h] [bp-1Bh] BYREF
char *v26; // [sp+Ch] [bp-14h]
int v27; // [sp+10h] [bp-10h] BYREF
int v28; // [sp+14h] [bp-Ch]
int v29; // [sp+18h] [bp-8h]
if ( !a2 )
return nullptr;
if ( a3 )
{
result = (void *)(unsigned __int8)*a2;
if ( !*a2 )
return result;
(*(void (__fastcall **)(char *, cocos2d::CCFileUtilsAndroid *, char *, _DWORD))(*(_DWORD *)this + 24))(
&v24,
this,
a2,
0);
if ( (v24 & 1) != 0 )
v10 = v26;
else
v10 = filename;
if ( *v10 == 47 )
{
if ( (v24 & 1) != 0 )
v18 = v26;
else
v18 = filename;
v19 = fopen(v18, a3);
v20 = v19;
if ( v19 )
{
fseek(v19, 0, 2);
v22 = ftell(v20);
fseek(v20, 0, 0);
v17 = (void *)operator new[](v22);
v23 = fread(v17, 1u, v22, v20);
fclose(v20);
if ( a4 )
*a4 = v23;
goto LABEL_26;
}
}
else
{
if ( a5 )
{
if ( (v24 & 1) != 0 )
v11 = v26;
else
v11 = filename;
v27 = 0;
v28 = 0;
v29 = 0;
v12 = strlen(v11);
std::string::__init(&v27, v11, v12);
FileData = cocos2d::ZipFile::getFileData(dword_D2F7D4, &v27, a4, *(_DWORD *)(dword_D2F7D4 + 8));
}
else
{
v14 = dword_D2F7D4;
if ( (v24 & 1) != 0 )
v15 = v26;
else
v15 = filename;
v27 = 0;
v28 = 0;
v29 = 0;
v16 = strlen(v15);
std::string::__init(&v27, v15, v16);
FileData = cocos2d::ZipFile::getFileData(v14, &v27, a4);
}
v17 = (void *)FileData;
std::string::~string((int)&v27);
if ( v17 )
goto LABEL_26;
}
v17 = nullptr;
v27 = 0;
v28 = 0;
v29 = 0;
std::string::__init(&v27, "Get data from file(", 0x13u);
v21 = std::string::append(&v27, a2);
std::string::append(v21, ") failed!");
std::string::~string((int)&v27);
LABEL_26:
std::string::~string((int)&v24);
return v17;
}
return nullptr;
}