//
// BIO_accept_ex from 0x7cfa80 to 0x7cfb54 (212 bytes)
//
// 2 xrefs:
// > BIO_accept @ 0x7cf100
// > ??> @ 0x5f68c
//
// 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_accept_ex(int a1)
{
struct sockaddr *v2; // r0
int v3; // r0
int v4; // r4
bool v5; // zf
int result; // r0
_DWORD *v7; // r0
socklen_t v8; // [sp+Ch] [bp-74h] BYREF
v8 = 112;
BIO_ADDR_sockaddr_noconst();
v3 = accept(a1, v2, &v8);
v4 = v3;
if ( v3 == -1 )
{
if ( !BIO_sock_should_retry() )
{
v7 = (_DWORD *)_errno();
ERR_put_error(2, 8, *v7, "crypto/bio/b_sock2.c", 246);
ERR_put_error(32, 137, 100, "crypto/bio/b_sock2.c", 247);
return -1;
}
return -1;
}
v5 = !BIO_socket_nbio(v3);
result = v4;
if ( v5 )
{
close(v4);
return -1;
}
return result;
}