//
// BIO_get_host_ip from 0x7ced30 to 0x7cee40 (272 bytes)
//
// 1 xrefs:
// > ??> @ 0x5f5fc
//
// 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_get_host_ip(const char *a1, void *a2)
{
int v4; // r5
int v6; // r0
const char *v7; // r0
const char *v8; // r0
struct addrinfo *v9; // [sp+8h] [bp-8h] BYREF
size_t v10; // [sp+Ch] [bp-4h] BYREF
v9 = nullptr;
if ( BIO_sock_init() != 1 )
return 0;
v6 = BIO_lookup(a1, nullptr, 0, 2u, 1, &v9);
v4 = v6;
if ( v6 )
{
if ( BIO_ADDRINFO_family((int)v9) == 2 )
{
v7 = (const char *)BIO_ADDRINFO_address((int)v9);
BIO_ADDR_rawaddress(v7, nullptr, &v10);
if ( v10 != 4 )
OPENSSL_die("assertion failed: l == 4", "crypto/bio/b_sock.c", 50);
v8 = (const char *)BIO_ADDRINFO_address((int)v9);
BIO_ADDR_rawaddress(v8, a2, &v10);
v4 = 1;
}
else
{
v4 = 0;
ERR_put_error(32, 106, 107, "crypto/bio/b_sock.c", 45);
}
BIO_ADDRINFO_free(v9);
}
else
{
ERR_add_error_data(2, "host=", a1);
}
return v4;
}