//
// BIO_accept_ex from 0xd7585c to 0xd75928 (204 bytes)
//
// 2 xrefs:
// > BIO_accept @ 0xd74f90
// > ??> @ 0x31cc8
//
// 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_accept_ex(int a1)
{
struct sockaddr *v2; // x0
int v3; // w0
unsigned int v4; // w19
unsigned int *v6; // x0
int v7; // w0
socklen_t v8; // [xsp+3Ch] [xbp+3Ch] BYREF
v8 = 112;
BIO_ADDR_sockaddr_noconst();
v3 = accept(a1, v2, &v8);
v4 = v3;
if ( v3 == -1 )
{
if ( !(unsigned int)BIO_sock_should_retry() )
{
v6 = (unsigned int *)__errno();
ERR_put_error(2, 8, *v6, "crypto/bio/b_sock2.c", 246);
ERR_put_error(32, 137, 100, "crypto/bio/b_sock2.c", 247);
}
}
else if ( !BIO_socket_nbio(v3) )
{
v7 = v4;
v4 = -1;
close(v7);
}
return v4;
}