//
// X509_aux_print from 0x1063640 to 0x1063918 (728 bytes)
//
// 2 xrefs:
// > X509_print_ex @ 0x10639ac
// > ??> @ 0x8af10
//
// 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:16:52 +0000
//
__int64 __fastcall X509_aux_print(__int64 a1, __int64 a2, int a3)
{
unsigned int *v7; // x23
unsigned int *v8; // x21
int v9; // w20
int v10; // w25
int v11; // w1
__int64 v12; // x0
int v13; // w20
int v14; // w24
int v15; // w1
__int64 v16; // x0
const char *v17; // x4
unsigned __int8 *v18; // x21
const char *v19; // x2
int v20; // w20
int v21; // w3
int v22; // [xsp+6Ch] [xbp+6Ch] BYREF
char v23[80]; // [xsp+70h] [xbp+70h] BYREF
if ( !(unsigned int)X509_trusted(a2) )
return 1;
v7 = (unsigned int *)X509_get0_trust_objects(a2);
v8 = (unsigned int *)X509_get0_reject_objects(a2);
if ( v7 )
{
v9 = 0;
v10 = 1;
BIO_printf(a1, "%*sTrusted Uses:\n%*s", a3, &byte_11B8890, a3 + 2, &byte_11B8890);
while ( v9 < (int)OPENSSL_sk_num(v7) )
{
if ( !v10 )
BIO_puts(a1, (__int64)", ");
v11 = v9;
v10 = 0;
++v9;
v12 = OPENSSL_sk_value((__int64)v7, v11);
OBJ_obj2txt(v23, 80, v12, 0);
BIO_puts(a1, (__int64)v23);
}
BIO_puts(a1, (__int64)&byte_11AAA48);
}
else
{
BIO_printf(a1, "%*sNo Trusted Uses.\n", a3, &byte_11B8890);
}
if ( v8 )
{
v13 = 0;
v14 = 1;
BIO_printf(a1, "%*sRejected Uses:\n%*s", a3, &byte_11B8890, a3 + 2, &byte_11B8890);
while ( v13 < (int)OPENSSL_sk_num(v8) )
{
if ( !v14 )
BIO_puts(a1, (__int64)", ");
v15 = v13;
v14 = 0;
++v13;
v16 = OPENSSL_sk_value((__int64)v8, v15);
OBJ_obj2txt(v23, 80, v16, 0);
BIO_puts(a1, (__int64)v23);
}
BIO_puts(a1, (__int64)&byte_11AAA48);
}
else
{
BIO_printf(a1, "%*sNo Rejected Uses.\n", a3, &byte_11B8890);
}
v17 = (const char *)X509_alias_get0(a2, 0);
if ( v17 )
BIO_printf(a1, "%*sAlias: %s\n", a3, &byte_11B8890, v17);
v18 = (unsigned __int8 *)X509_keyid_get0(a2, &v22);
if ( !v18 )
return 1;
BIO_printf(a1, "%*sKey Id: ", a3, &byte_11B8890);
if ( v22 > 0 )
{
v19 = &byte_11B8890;
v20 = 0;
while ( 1 )
{
v21 = *v18;
++v20;
++v18;
BIO_printf(a1, "%s%02X", v19, v21);
if ( v20 >= v22 )
break;
if ( v20 )
v19 = ":";
else
v19 = &byte_11B8890;
}
}
BIO_write(a1, (__int64)&byte_11AAA48, 1u);
return 1;
}