//
// sub_B8B1B0 from 0xb8b1b0 to 0xb8b28c (220 bytes)
//
// 7 xrefs:
// > sub_B70330 @ 0xb70708
// > sub_B70330 @ 0xb707a8
// > sub_B70330 @ 0xb707f0
// > sub_B928E0 @ 0xb92b98
// > sub_B9C364 @ 0xb9d0f8
// > sub_BA2648 @ 0xba27a4
// > sub_BAA0F4 @ 0xbaa1b0
//
// 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_B8B1B0(_QWORD *a1, __int64 a2, __int64 a3)
{
__int64 v6; // x2
__int64 *v7; // x20
unsigned int v8; // w20
__int64 v10; // x0
__int64 v11; // x0
__int64 v12; // x3
if ( (a1[301] & 0x8000000000000000LL) == 0 && a1[115] )
{
v7 = a1 + 348;
nullsub_5();
v6 = a1[114];
if ( v10 && a1[301] < v6 )
{
v11 = sub_B70BFC(a2, a3, *v7, a1[349]);
v12 = a1[115];
if ( 1000 * v12 - v11 <= 0 )
{
v8 = 28;
sub_B7B690(
(__int64)a1,
"Operation too slow. Less than %ld bytes/sec transferred the last %ld seconds",
a1[114],
v12);
}
else
{
v8 = 0;
sub_B9BE34(a1);
}
return v8;
}
}
else
{
v6 = a1[114];
v7 = a1 + 348;
}
*v7 = a2;
v7[1] = a3;
v8 = 0;
if ( v6 )
sub_B9BE34(a1);
return v8;
}