//
// sub_61788 from 0x61788 to 0x61878 (240 bytes)
//
// 1 xrefs:
// > sub_618D4 @ 0x619a4
//
// 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_61788(int a1)
{
int v2; // w8
unsigned int v3; // w20
int v5; // [xsp+0h] [xbp-20h] BYREF
int v6; // [xsp+4h] [xbp-1Ch] BYREF
int v7; // [xsp+8h] [xbp-18h] BYREF
int optval; // [xsp+Ch] [xbp-14h] BYREF
optval = 1;
if ( setsockopt(a1, 1, 9, &optval, 4u) == -1 )
return 43;
v7 = 10;
if ( setsockopt(a1, 6, 6, &v7, 4u) == -1 )
{
return 43;
}
else
{
if ( dword_11A7AC / v7 <= 1999 )
v2 = 1;
else
v2 = dword_11A7AC / v7 / 1000;
v6 = v2;
v3 = 43;
if ( setsockopt(a1, 6, 4, &v6, 4u) != -1 )
{
v5 = v6;
if ( setsockopt(a1, 6, 5, &v5, 4u) == -1 )
return 43;
else
return 0;
}
}
return v3;
}