//
// BIO_sock_error from 0xd74b68 to 0xd74bb0 (72 bytes)
//
// 4 xrefs:
// > sub_D773BC @ 0xd77570
// > sub_D77C14 @ 0xd77e08
// > sub_D780A0 @ 0xd7827c
// > ??> @ 0x99450
//
// 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 BIO_sock_error(int a1)
{
unsigned int v2; // [xsp+18h] [xbp+18h] BYREF
socklen_t v3; // [xsp+1Ch] [xbp+1Ch] BYREF
v2 = 0;
v3 = 4;
if ( getsockopt(a1, 1, 4, &v2, &v3) < 0 )
return *(unsigned int *)__errno();
else
return v2;
}