//
// X509_aux_print from 0xde5300 to 0xde55d8 (728 bytes)
//
// 2 xrefs:
// > X509_print_ex @ 0xde566c
// > ??> @ 0x665a0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__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
__int64 v18; // x21
int i; // w20
int v20; // [xsp+6Ch] [xbp+6Ch] BYREF
char v21[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_F288A0, a3 + 2, &byte_F288A0);
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(v21, 80, v12, 0);
BIO_puts(a1, (__int64)v21);
}
BIO_puts(a1, (__int64)&byte_F1AB78);
}
else
{
BIO_printf(a1, "%*sNo Trusted Uses.\n", a3, &byte_F288A0);
}
if ( v8 )
{
v13 = 0;
v14 = 1;
BIO_printf(a1, "%*sRejected Uses:\n%*s", a3, &byte_F288A0, a3 + 2, &byte_F288A0);
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(v21, 80, v16, 0);
BIO_puts(a1, (__int64)v21);
}
BIO_puts(a1, (__int64)&byte_F1AB78);
}
else
{
BIO_printf(a1, "%*sNo Rejected Uses.\n", a3, &byte_F288A0);
}
v17 = (const char *)X509_alias_get0(a2, 0);
if ( v17 )
BIO_printf(a1, "%*sAlias: %s\n", a3, &byte_F288A0, v17);
v18 = X509_keyid_get0(a2, &v20);
if ( !v18 )
return 1;
BIO_printf(a1, "%*sKey Id: ", a3, &byte_F288A0);
if ( v20 > 0 )
{
for ( i = 0; i < v20; ++i )
{
++v18;
BIO_printf(a1, "%s%02X");
}
}
BIO_write(a1, (__int64)&byte_F1AB78, 1u);
return 1;
}