//
// sub_A66720 from 0xa66720 to 0xa66aac (908 bytes)
//
// 1 xrefs:
// > ??> @ 0xd18244
//
// 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:36 +0000
//
int __fastcall sub_A66720(int a1, _DWORD **a2, int a3, int a4)
{
_DWORD *v4; // r4
_DWORD **v5; // r8
signed int v8; // r7
int v9; // r0
int v10; // r9
int v11; // r0
void *v12; // r8
char *v13; // r9
_DWORD *v14; // r4
const char *v16; // r0
char *v17; // r9
signed int i; // r7
int v19; // r0
int v20; // r8
int v21; // r0
char *v22; // r8
const char *v23; // r0
char *v24; // r8
void *v25; // [sp+18h] [bp-Ch]
_DWORD **v26; // [sp+1Ch] [bp-8h]
v4 = *a2;
v5 = a2;
if ( !*a2 )
goto LABEL_13;
BIO_printf(a3, "%*s%s:\n", a4, &byte_BF4ECA, "Autonomous System Numbers");
if ( *v4 )
{
if ( *v4 != 1 )
return 0;
v8 = 0;
v26 = v5;
while ( v8 < OPENSSL_sk_num(v4[1]) )
{
v9 = OPENSSL_sk_value((_DWORD *)v4[1], v8);
v10 = v9;
if ( *(_DWORD *)v9 )
{
if ( *(_DWORD *)v9 != 1 )
return 0;
v11 = i2s_ASN1_INTEGER(0, **(_DWORD **)(v9 + 4));
v12 = (void *)v11;
if ( !v11 )
return 0;
BIO_printf(a3, "%*s%s-", a4 + 2, &byte_BF4ECA, v11);
CRYPTO_free(v12, (int)"crypto/x509v3/v3_asid.c", 88);
v13 = (char *)i2s_ASN1_INTEGER(0, *(_DWORD *)(*(_DWORD *)(v10 + 4) + 4));
if ( !v13 )
return 0;
BIO_printf(a3, "%s\n", v13);
CRYPTO_free(v13, (int)"crypto/x509v3/v3_asid.c", 92);
}
else
{
v16 = (const char *)i2s_ASN1_INTEGER(0, *(_DWORD *)(v9 + 4));
v17 = (char *)v16;
if ( !v16 )
return 0;
BIO_printf(a3, "%*s%s\n", a4 + 2, &byte_BF4ECA, v16);
CRYPTO_free(v17, (int)"crypto/x509v3/v3_asid.c", 82);
}
++v8;
}
v5 = v26;
LABEL_13:
v14 = v5[1];
if ( v14 )
goto LABEL_14;
return 1;
}
BIO_printf(a3, "%*sinherit\n", a4 + 2, &byte_BF4ECA);
v14 = v5[1];
if ( !v14 )
return 1;
LABEL_14:
BIO_printf(a3, "%*s%s:\n", a4, &byte_BF4ECA, "Routing Domain Identifiers");
if ( *v14 )
{
if ( *v14 != 1 )
return 0;
for ( i = 0; i < OPENSSL_sk_num(v14[1]); ++i )
{
v19 = OPENSSL_sk_value((_DWORD *)v14[1], i);
v20 = v19;
if ( *(_DWORD *)v19 )
{
if ( *(_DWORD *)v19 != 1 )
return 0;
v21 = i2s_ASN1_INTEGER(0, **(_DWORD **)(v19 + 4));
if ( !v21 )
return 0;
v25 = (void *)v21;
BIO_printf(a3, "%*s%s-", a4 + 2, &byte_BF4ECA, v21);
CRYPTO_free(v25, (int)"crypto/x509v3/v3_asid.c", 88);
v22 = (char *)i2s_ASN1_INTEGER(0, *(_DWORD *)(*(_DWORD *)(v20 + 4) + 4));
if ( !v22 )
return 0;
BIO_printf(a3, "%s\n", v22);
CRYPTO_free(v22, (int)"crypto/x509v3/v3_asid.c", 92);
}
else
{
v23 = (const char *)i2s_ASN1_INTEGER(0, *(_DWORD *)(v19 + 4));
v24 = (char *)v23;
if ( !v23 )
return 0;
BIO_printf(a3, "%*s%s\n", a4 + 2, &byte_BF4ECA, v23);
CRYPTO_free(v24, (int)"crypto/x509v3/v3_asid.c", 82);
}
}
return 1;
}
BIO_printf(a3, "%*sinherit\n", a4 + 2, &byte_BF4ECA);
return 1;
}