//
// sub_BC2620 from 0xbc2620 to 0xbc2684 (100 bytes)
//
// 1 xrefs:
// > lws_plat_init @ 0xbc2d58
//
// 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_BC2620(int a1, char *file, _QWORD *a3, int oflag)
{
int v5; // w0
unsigned int v6; // w19
__int64 result; // x0
_BYTE v8[48]; // [xsp+20h] [xbp+20h] BYREF
__int64 v9; // [xsp+50h] [xbp+50h]
v5 = open(file, oflag, 436);
v6 = v5;
if ( v5 < 0 )
return 0xFFFFFFFFLL;
if ( fstat(v5, (struct stat *)v8) < 0 )
{
close(v6);
return 0xFFFFFFFFLL;
}
else
{
result = v6;
*a3 = v9;
}
return result;
}