//
// BIO_ADDR_rawaddress from 0xd71aa4 to 0xd71b54 (176 bytes)
//
// 3 xrefs:
// > BIO_get_host_ip @ 0xd74c8c
// > BIO_get_host_ip @ 0xd74cb0
// > ??> @ 0x51c60
//
// 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_ADDR_rawaddress(const char *a1, void *a2, size_t *a3)
{
int v5; // w4
__int64 result; // x0
const void *v7; // x19
size_t v8; // x21
void *v9; // [xsp+38h] [xbp+38h]
v5 = *(unsigned __int16 *)a1;
if ( v5 == 2 )
{
v7 = a1 + 4;
v8 = 4;
}
else if ( v5 == 10 )
{
v7 = a1 + 8;
v8 = 16;
}
else
{
result = 0;
if ( v5 != 1 )
return result;
v7 = a1 + 2;
v9 = a2;
v8 = strlen(a1 + 2);
a2 = v9;
}
if ( a2 )
memcpy(a2, v7, v8);
if ( a3 )
*a3 = v8;
return 1;
}