//
// sub_1006049F4 from 0x1006049f4 to 0x100604ac8 (212 bytes)
//
// 1 xrefs:
// > ??> @ 0x100863d10
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall sub_1006049F4(__int64 a1, int a2, __int64 a3, __int64 a4)
{
int v5; // w0
_BOOL8 result; // x0
const char *v7; // x0
char *v8; // x8
__int64 v9; // x0
const char *v10; // x1
int v11; // w8
if ( a2 != 1 )
return 0;
if ( a4 == 1 )
{
v5 = sub_100604E2C(a1, a3, 1);
return v5 != 0;
}
if ( a4 != 3 )
{
v5 = sub_100604AD4(a1, a3, a4);
return v5 != 0;
}
v7 = sub_1005FEBFC();
v8 = getenv(v7);
if ( v8 )
{
v9 = a1;
v10 = v8;
}
else
{
v10 = sub_1005FEBE4();
v9 = a1;
}
v11 = sub_100604E2C(v9, v10, 1);
result = v11 != 0;
if ( !v11 )
{
sub_1005E0E48(11, 101, 104, (__int64)"by_file.c", 111);
return 0;
}
return result;
}