//
// BIO_socket from 0xd7523c to 0xd752e4 (168 bytes)
//
// 5 xrefs:
// > BIO_get_accept_socket @ 0xd74f1c
// > sub_D773BC @ 0xd774ec
// > sub_D77C14 @ 0xd77d84
// > sub_D780A0 @ 0xd78210
// > ??> @ 0x58c20
//
// 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_socket(int a1, int a2, int a3)
{
unsigned int v4; // w19
unsigned int *v6; // x0
if ( (unsigned int)BIO_sock_init() != 1 )
return 0xFFFFFFFFLL;
v4 = socket(a1, a2, a3);
if ( v4 == -1 )
{
v6 = (unsigned int *)__errno();
ERR_put_error(2, 4, *v6, "crypto/bio/b_sock2.c", 49);
ERR_put_error(32, 140, 118, "crypto/bio/b_sock2.c", 50);
}
return v4;
}