//
// sub_E6144 from 0xe6144 to 0xe6200 (188 bytes)
//
// 1 xrefs:
// > ??> @ 0x10f3c8
//
// This function is hookable on this platform (idp: arm, 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:14:59 +0000
//
__int64 __fastcall sub_E6144(__int64 a1, char *a2, _DWORD *a3, int a4)
{
FILE *v6; // x0
FILE *v7; // x21
__int64 *v9; // x0
int v10; // w22
if ( a4 == 1 )
{
v9 = sub_E6308((__int64 *)"wb", a1, a2);
if ( !v9 )
return 18;
v7 = (FILE *)v9;
LABEL_9:
v10 = 0;
LABEL_10:
*(_QWORD *)(a1 + 8) = v7;
*a3 = v10;
return 0;
}
if ( a4 )
{
v7 = nullptr;
goto LABEL_9;
}
v6 = (FILE *)sub_E6308((__int64 *)"rb", a1, a2);
if ( v6 )
{
v7 = v6;
if ( fseek(v6, 0, 2) )
return 13;
v10 = ftell(v7);
if ( v10 < 0 || fseek(v7, 0, 0) )
return 13;
goto LABEL_10;
}
return 18;
}