//
// a2i_IPADDRESS_NC from 0x85e370 to 0x85e474 (260 bytes)
//
// 2 xrefs:
// > a2i_GENERAL_NAME @ 0x850f60
// > ??> @ 0x688fc
//
// 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 a2i_IPADDRESS_NC(const char *a1)
{
char *v2; // r4
char *v3; // r0
char *v4; // r5
char *v5; // r4
int v6; // r0
int v7; // r7
int v8; // r9
_BOOL4 v9; // r3
int v10; // r0
int v11; // r4
_BYTE v13[36]; // [sp+0h] [bp-24h] BYREF
v2 = strchr(a1, 47);
if ( v2 )
{
v3 = (char *)CRYPTO_strdup(a1, (int)"crypto/x509v3/v3_utl.c", 950);
v4 = v3;
if ( v3 )
{
v3[v2 - a1] = 0;
v5 = &v3[v2 - a1 + 1];
v6 = a2i_ipadd(v13, v3);
v7 = v6;
if ( v6 )
{
v8 = a2i_ipadd(&v13[v6], v5);
CRYPTO_free(v4, (int)"crypto/x509v3/v3_utl.c", 963);
v9 = v8 == 0;
if ( v7 != v8 )
v9 = 1;
if ( v9 || (v10 = ASN1_OCTET_STRING_new(), (v11 = v10) == 0) )
{
v4 = nullptr;
v11 = 0;
}
else
{
if ( ASN1_OCTET_STRING_set(v10, v13, v7 + v8) )
return v11;
v4 = nullptr;
}
}
else
{
v11 = 0;
}
CRYPTO_free(v4, (int)"crypto/x509v3/v3_utl.c", 978);
ASN1_OCTET_STRING_free(v11);
}
}
return 0;
}