//
// BIO_socket from 0x7cf408 to 0x7cf49c (148 bytes)
//
// 5 xrefs:
// > BIO_get_accept_socket @ 0x7cf0a4
// > sub_7D14BC @ 0x7d1614
// > sub_7D1D44 @ 0x7d1f08
// > sub_7D2244 @ 0x7d2410
// > ??> @ 0x5f64c
//
// 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_socket(int a1, int a2, int a3)
{
int result; // r0
_DWORD *v7; // r0
if ( BIO_sock_init() != 1 )
return -1;
result = socket(a1, a2, a3);
if ( result == -1 )
{
v7 = (_DWORD *)_errno();
ERR_put_error(2, 4, *v7, "crypto/bio/b_sock2.c", 49);
ERR_put_error(32, 140, 118, "crypto/bio/b_sock2.c", 50);
return -1;
}
return result;
}