//
// sub_1800BF750 from 0x1800bf750 to 0x1800bf7de (142 bytes)
//
// 2 xrefs:
// > ??> @ 0x18016c0e0
// > ??> @ 0x1801fd998
//
// This function is hookable on this platform (idp: pc, 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 10:54:02 +0000
//
__int64 __fastcall sub_1800BF750(__int64 a1, int a2, int a3, _QWORD *a4)
{
int v6; // r8d
unsigned int v8; // r8d
unsigned int v9; // [rsp+40h] [rbp+18h] BYREF
if ( a3 )
{
v6 = a3 - 1;
if ( v6 )
{
if ( v6 != 1 )
return 2147942487LL;
v8 = 2;
}
else
{
v8 = 1;
}
}
else
{
v8 = 0;
}
if ( (unsigned int)sub_1800B3990(*(__int64 **)(a1 + 8), a2, v8) )
return 1;
if ( a4 )
{
sub_1800B3D20(*(_QWORD *)(a1 + 8), &v9);
*a4 = v9;
}
return 0;
}