//
// sub_A6A8A0 from 0xa6a8a0 to 0xa6ab98 (760 bytes)
//
// 1 xrefs:
// > ??> @ 0xd1844c
//
// 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:38 +0000
//
int __fastcall sub_A6A8A0(int a1, int a2, int a3, int a4)
{
signed int *v4; // r7
signed int v8; // r5
int v9; // r7
int v10; // r9
_DWORD *v11; // r5
bool v12; // zf
_DWORD *v14; // r7
_DWORD *v15; // r0
signed int v16[5]; // [sp+1Ch] [bp-18h] BYREF
v4 = *(signed int **)a2;
if ( *(_DWORD *)a2 )
{
v8 = *v4;
if ( *v4 )
{
v16[0] = v4[1];
BIO_printf(a3, "%*sRelative Name:\n%*s", a4, &byte_BF4ECA, a4 + 2, &byte_BF4ECA);
X509_NAME_print_ex(a3, (int)v16, 0, 8520479);
BIO_puts(a3, (int)"\n");
}
else
{
BIO_printf(a3, "%*sFull Name:\n", a4, &byte_BF4ECA);
v14 = (_DWORD *)v4[1];
while ( v8 < OPENSSL_sk_num((int)v14) )
{
BIO_printf(a3, "%*s", a4 + 2, &byte_BF4ECA);
v15 = (_DWORD *)OPENSSL_sk_value(v14, v8++);
GENERAL_NAME_print(a3, v15);
BIO_puts(a3, (int)"\n");
}
}
}
if ( *(int *)(a2 + 4) > 0 )
BIO_printf(a3, "%*sOnly User Certificates\n", a4, &byte_BF4ECA);
if ( *(int *)(a2 + 8) > 0 )
BIO_printf(a3, "%*sOnly CA Certificates\n", a4, &byte_BF4ECA);
if ( *(int *)(a2 + 16) > 0 )
BIO_printf(a3, "%*sIndirect CRL\n", a4, &byte_BF4ECA);
v9 = *(_DWORD *)(a2 + 12);
if ( v9 )
{
BIO_printf(a3, "%*s%s:\n%*s", a4, &byte_BF4ECA, "Only Some Reasons", a4 + 2, &byte_BF4ECA);
v10 = 1;
v11 = &unk_C8070C;
do
{
if ( ASN1_BIT_STRING_get_bit(v9, *(v11 - 3)) )
{
v12 = v10 == 0;
v10 = 0;
if ( v12 )
BIO_puts(a3, (int)", ");
BIO_puts(a3, *(v11 - 2));
}
v11 += 3;
}
while ( *(v11 - 2) );
if ( v10 )
BIO_puts(a3, (int)"\n");
else
BIO_puts(a3, (int)"\n");
}
if ( *(int *)(a2 + 20) > 0 )
BIO_printf(a3, "%*sOnly Attribute Certificates\n", a4, &byte_BF4ECA);
if ( !*(_DWORD *)a2
&& *(int *)(a2 + 4) <= 0
&& *(int *)(a2 + 8) <= 0
&& *(int *)(a2 + 16) <= 0
&& !*(_DWORD *)(a2 + 12)
&& *(int *)(a2 + 20) <= 0 )
{
BIO_printf(a3, "%*s\n", a4, &byte_BF4ECA);
}
return 1;
}