//
// BIO_sock_error from 0x7cecd4 to 0x7ced24 (80 bytes)
//
// 4 xrefs:
// > sub_7D14BC @ 0x7d153c
// > sub_7D1D44 @ 0x7d1dac
// > sub_7D2244 @ 0x7d2370
// > ??> @ 0x5f5dc
//
// 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
//
int __fastcall BIO_sock_error(int a1)
{
int v2; // [sp+8h] [bp-Ch] BYREF
socklen_t v3[2]; // [sp+Ch] [bp-8h] BYREF
v3[0] = 4;
v2 = 0;
if ( getsockopt(a1, 1, 4, &v2, v3) < 0 )
return *(_DWORD *)_errno();
else
return v2;
}