//
// sub_A62BDC from 0xa62bdc to 0xa62f88 (940 bytes)
//
// 1 xrefs:
// > ??> @ 0xc80534
//
// 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:08:35 +0000
//
int __fastcall sub_A62BDC(int a1, _DWORD *a2, int a3, int a4)
{
signed int v7; // r11
int v8; // r5
_DWORD *afi; // r0
int v10; // r4
unsigned int v11; // r2
int v12; // r3
_DWORD *v13; // r7
signed int v14; // r5
int v15; // r8
_DWORD *v16; // r6
int v18; // [sp+34h] [bp-8h]
v7 = 0;
while ( v7 < OPENSSL_sk_num((int)a2) )
{
v8 = OPENSSL_sk_value(a2, v7);
afi = X509v3_addr_get_afi((_DWORD *)v8);
v10 = (int)afi;
if ( afi == (int *)((char *)&dword_0 + 1) )
{
BIO_printf(a3, "%*sIPv4", a4, &byte_BF4ECA);
}
else if ( afi == (int *)((char *)&dword_0 + 2) )
{
BIO_printf(a3, "%*sIPv6", a4, &byte_BF4ECA);
}
else
{
BIO_printf(a3, "%*sUnknown AFI %u", a4, &byte_BF4ECA, afi);
}
if ( **(int **)v8 <= 2 )
goto LABEL_13;
v11 = *(unsigned __int8 *)(*(_DWORD *)(*(_DWORD *)v8 + 8) + 2);
if ( v11 == 4 )
{
BIO_puts(a3, (int)" (MPLS)");
}
else if ( v11 <= 4 )
{
if ( v11 == 2 )
{
BIO_puts(a3, (int)" (Multicast)");
goto LABEL_13;
}
if ( v11 > 2 )
{
BIO_puts(a3, (int)" (Unicast/Multicast)");
goto LABEL_13;
}
if ( v11 != 1 )
goto LABEL_41;
BIO_puts(a3, (int)" (Unicast)");
}
else if ( v11 == 65 )
{
BIO_puts(a3, (int)" (VPLS)");
}
else if ( v11 <= 0x41 )
{
if ( v11 != 64 )
goto LABEL_41;
BIO_puts(a3, (int)" (Tunnel)");
}
else
{
if ( v11 == 66 )
{
BIO_puts(a3, (int)" (BGP MDT)");
goto LABEL_13;
}
if ( v11 != 128 )
{
LABEL_41:
BIO_printf(a3, " (Unknown SAFI %u)", v11);
goto LABEL_13;
}
BIO_puts(a3, (int)" (MPLS-labeled VPN)");
}
LABEL_13:
v12 = **(_DWORD **)(v8 + 4);
if ( v12 )
{
if ( v12 == 1 )
{
BIO_puts(a3, (int)":\n");
v13 = *(_DWORD **)(*(_DWORD *)(v8 + 4) + 4);
v18 = a4;
v14 = 0;
v15 = a4 + 2;
while ( 1 )
{
while ( 1 )
{
if ( v14 >= OPENSSL_sk_num((int)v13) )
{
a4 = v18;
goto LABEL_23;
}
v16 = (_DWORD *)OPENSSL_sk_value(v13, v14);
BIO_printf(a3, "%*s", v15, &byte_BF4ECA);
if ( *v16 )
break;
if ( !sub_A61D3C(a3, v10, 0, v16[1]) )
return 0;
BIO_printf(a3, "/%d\n", 8 * *(_DWORD *)v16[1] - (*(_DWORD *)(v16[1] + 12) & 7));
++v14;
}
if ( *v16 == 1 )
{
if ( !sub_A61D3C(a3, v10, 0, *(_DWORD *)v16[1]) )
return 0;
BIO_puts(a3, (int)"-");
if ( !sub_A61D3C(a3, v10, 255, *(_DWORD *)(v16[1] + 4)) )
return 0;
BIO_puts(a3, (int)"\n");
}
++v14;
}
}
LABEL_23:
++v7;
}
else
{
BIO_puts(a3, (int)": inherit\n");
++v7;
}
}
return 1;
}