//
// cocos2d::CCFileUtilsAndroid::isFileExist from 0x7eb354 to 0x7eb4f6 (418 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:59 +0000
//
int __fastcall cocos2d::CCFileUtilsAndroid::isFileExist(int a1, unsigned __int8 *a2)
{
unsigned int v4; // r3
int v5; // r2
int v6; // r4
_BYTE *v7; // r3
size_t v8; // r1
void *v9; // r2
unsigned __int8 *v10; // r8
size_t v11; // r0
int v12; // r2
unsigned int v13; // r2
unsigned __int8 *v14; // r3
unsigned __int8 *v15; // r4
int v16; // r9
size_t v17; // r4
size_t v18; // r9
char *v19; // r8
unsigned int v20; // r1
char *v21; // r7
size_t v22; // r4
const char *v23; // r0
FILE *v24; // r0
unsigned __int8 *v26; // [sp+10h] [bp-1Ch] BYREF
int v27; // [sp+18h] [bp-14h] BYREF
size_t v28; // [sp+1Ch] [bp-10h]
void *v29; // [sp+20h] [bp-Ch]
v4 = *a2;
v5 = v4 & 1;
if ( (v4 & 1) != 0 )
{
if ( !*((_DWORD *)a2 + 1) )
return 0;
v7 = *((_BYTE **)a2 + 2);
}
else
{
if ( !(v4 >> 1) )
return 0;
v7 = a2 + 1;
}
if ( *v7 == 47 )
{
if ( v5 )
v23 = *((const char **)a2 + 2);
else
v23 = (const char *)(a2 + 1);
v24 = fopen(v23, (const char *)&a1i2r3e45s789g[3]);
if ( v24 )
{
fclose(v24);
return 1;
}
return 0;
}
v27 = 0;
v28 = 0;
v29 = nullptr;
if ( v5 )
{
std::string::__init(&v27, *((const void **)a2 + 2), *((_DWORD *)a2 + 1));
}
else
{
v8 = *((_DWORD *)a2 + 1);
v9 = *((void **)a2 + 2);
v27 = *(_DWORD *)a2;
v28 = v8;
v29 = v9;
}
if ( (v27 & 1) != 0 )
{
v10 = (unsigned __int8 *)v29;
v11 = v28;
}
else
{
v11 = (int)(unsigned __int8)v27 >> 1;
v10 = (unsigned __int8 *)&v27 + 1;
}
v12 = *(unsigned __int8 *)(a1 + 32);
if ( (v12 & 1) != 0 )
{
v13 = *(_DWORD *)(a1 + 36);
v14 = *(unsigned __int8 **)(a1 + 40);
}
else
{
v13 = v12 >> 1;
v14 = (unsigned __int8 *)(a1 + 33);
}
if ( v11 < v13
|| v13
&& ((v15 = &v10[v11],
std::__search(
&v26,
v10,
&v10[v11],
v14,
&v14[v13],
(int (__fastcall *)(int, _DWORD))std::char_traits::eq),
v26 == v15)
|| v26 != v10) )
{
v16 = *(unsigned __int8 *)(a1 + 32);
v17 = (unsigned __int8)v27;
if ( (v16 & 1) != 0 )
{
v18 = *(_DWORD *)(a1 + 36);
v19 = *(char **)(a1 + 40);
}
else
{
v18 = v16 >> 1;
v19 = (char *)(a1 + 33);
}
if ( (v27 & 1) != 0 )
a1 = v27;
else
v17 = (int)(unsigned __int8)v27 >> 1;
if ( (v27 & 1) != 0 )
{
v17 = v28;
v20 = (a1 & 0xFFFFFFFE) - 1;
}
else
{
v20 = 10;
}
if ( v20 - v17 < v18 )
{
std::string::__grow_by_and_replace((int)&v27, v20, v17 + v18 - v20, v17, 0, 0, v18, v19);
}
else if ( v18 )
{
if ( (v27 & 1) != 0 )
v21 = (char *)v29;
else
v21 = (char *)&v27 + 1;
if ( v17 )
{
if ( v21 <= v19 && v19 < &v21[v17] )
v19 += v18;
memmove(&v21[v18], v21, v17);
}
v22 = v17 + v18;
memmove(v21, v19, v18);
if ( (v27 & 1) != 0 )
v28 = v22;
else
LOBYTE(v27) = 2 * v22;
v21[v22] = 0;
}
}
v6 = cocos2d::ZipFile::fileExists(dword_D2F7D4, &v27);
std::string::~string((int)&v27);
return v6;
}