//
// sub_100605020 from 0x100605020 to 0x1006050bc (156 bytes)
//
// 1 xrefs:
// > ??> @ 0x100863d60
//
// 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
//
__int64 __fastcall sub_100605020(__int64 a1, int a2, __int64 a3, __int64 a4)
{
__int64 v4; // x19
const char *v5; // x0
char *v6; // x8
__int64 v7; // x0
const char *v8; // x1
__int64 result; // x0
if ( a2 != 2 )
return 0;
v4 = *(_QWORD *)(a1 + 16);
if ( a4 != 3 )
return sub_10060556C(*(_QWORD *)(a1 + 16), a3, a4);
v5 = sub_1005FEBF0();
v6 = getenv(v5);
if ( v6 )
{
v7 = v4;
v8 = v6;
}
else
{
v8 = sub_1005FEBD8();
v7 = v4;
}
result = sub_10060556C(v7, v8, 1);
if ( !(_DWORD)result )
{
sub_1005E0E48(11, 102, 103, (__int64)"by_dir.c", 138);
return 0;
}
return result;
}