//
// BIO_sock_error from 0xff2ec8 to 0xff2f10 (72 bytes)
//
// 4 xrefs:
// > sub_FF571C @ 0xff58d0
// > sub_FF5F74 @ 0xff6168
// > sub_FF6400 @ 0xff65dc
// > ??> @ 0xca4c8
//
// This function is hookable on this platform (idp: arm, 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 13:15:46 +0000
//
__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;
}