//
// BIO_get_host_ip from 0x9e3930 to 0x9e3a40 (272 bytes)
//
// 1 xrefs:
// > ??> @ 0x7907c
//
// 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_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;
}