//
// BIO_socket from 0x9e4008 to 0x9e409c (148 bytes)
//
// 5 xrefs:
// > BIO_get_accept_socket @ 0x9e3ca4
// > sub_9E60BC @ 0x9e6214
// > sub_9E6944 @ 0x9e6b08
// > sub_9E6E44 @ 0x9e7010
// > ??> @ 0x790cc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:07:22 +0000
//
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;
}