//
// sub_107ACCC from 0x107accc to 0x107afb4 (744 bytes)
//
// 1 xrefs:
// > ??> @ 0x153cb38
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:17:06 +0000
//
__int64 __fastcall sub_107ACCC(__int64 a1, int *a2, __int64 a3, int a4)
{
__int64 v4; // x21
int v8; // w19
__int64 v9; // x21
int v10; // w22
unsigned int *v11; // x19
unsigned int v13; // w27
unsigned int *v14; // x21
int v15; // w1
__int64 v16; // x0
__int64 v17; // [xsp+68h] [xbp+68h] BYREF
v4 = *(_QWORD *)a2;
if ( *(_QWORD *)a2 )
{
v8 = *(_DWORD *)v4;
if ( *(_DWORD *)v4 )
{
v17 = *(_QWORD *)(v4 + 8);
BIO_printf(a3, "%*sRelative Name:\n%*s", a4, &byte_11B8890, a4 + 2, &byte_11B8890);
X509_NAME_print_ex(a3, (__int64)&v17, 0, 8520479);
BIO_puts(a3, (__int64)&byte_11AAA48);
}
else
{
v13 = a4 + 2;
BIO_printf(a3, "%*sFull Name:\n", a4, &byte_11B8890);
v14 = *(unsigned int **)(v4 + 8);
while ( v8 < (int)OPENSSL_sk_num(v14) )
{
BIO_printf(a3, "%*s", v13, &byte_11B8890);
v15 = v8++;
v16 = OPENSSL_sk_value((__int64)v14, v15);
GENERAL_NAME_print(a3, v16);
BIO_puts(a3, (__int64)&byte_11AAA48);
}
}
}
if ( a2[2] > 0 )
BIO_printf(a3, "%*sOnly User Certificates\n", a4, &byte_11B8890);
if ( a2[3] > 0 )
BIO_printf(a3, "%*sOnly CA Certificates\n", a4, &byte_11B8890);
if ( a2[6] > 0 )
BIO_printf(a3, "%*sIndirect CRL\n", a4, &byte_11B8890);
v9 = *((_QWORD *)a2 + 2);
if ( v9 )
{
v10 = 1;
BIO_printf(a3, "%*s%s:\n%*s", a4, &byte_11B8890, "Only Some Reasons", a4 + 2, &byte_11B8890);
v11 = (unsigned int *)&unk_140EAC8;
do
{
if ( (unsigned int)ASN1_BIT_STRING_get_bit(v9, *v11) )
{
if ( !v10 )
BIO_puts(a3, (__int64)", ");
v10 = 0;
BIO_puts(a3, *((_QWORD *)v11 + 1));
}
v11 += 6;
}
while ( *((_QWORD *)v11 + 1) );
if ( v10 )
BIO_puts(a3, (__int64)"\n");
else
BIO_puts(a3, (__int64)&byte_11AAA48);
}
if ( a2[7] > 0 )
BIO_printf(a3, "%*sOnly Attribute Certificates\n", a4, &byte_11B8890);
if ( !*(_QWORD *)a2 && a2[2] <= 0 && a2[3] <= 0 && a2[6] <= 0 && !*((_QWORD *)a2 + 2) && a2[7] <= 0 )
BIO_printf(a3, "%*s\n", a4, &byte_11B8890);
return 1;
}