//
// GENERAL_NAME_print from 0xa65748 to 0xa65934 (492 bytes)
//
// 7 xrefs:
// > OCSP_REQUEST_print @ 0xa33c4c
// > sub_A6A534 @ 0xa6a754
// > sub_A6A534 @ 0xa6a804
// > sub_A6A8A0 @ 0xa6ab08
// > sub_A6C5AC @ 0xa6c640
// > sub_ACEDD0 @ 0xacee9c
// > ??> @ 0x7e77c
//
// 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 GENERAL_NAME_print(int a1, _DWORD *a2)
{
_DWORD *v4; // r3
unsigned __int8 *v5; // r6
int result; // r0
int v7; // r2
int v8; // r3
unsigned __int8 *v9; // r4
unsigned __int8 *v10; // r6
int v11; // r2
switch ( *a2 )
{
case 0:
BIO_printf(a1, "othername:");
result = 1;
break;
case 1:
BIO_printf(a1, "email:%s", *(const char **)(a2[1] + 8));
result = 1;
break;
case 2:
BIO_printf(a1, "DNS:%s", *(const char **)(a2[1] + 8));
result = 1;
break;
case 3:
BIO_printf(a1, "X400Name:");
result = 1;
break;
case 4:
BIO_printf(a1, "DirName:");
X509_NAME_print_ex(a1, a2[1], 0, 8520479);
result = 1;
break;
case 5:
BIO_printf(a1, "EdiPartyName:");
result = 1;
break;
case 6:
BIO_printf(a1, "URI:%s", *(const char **)(a2[1] + 8));
result = 1;
break;
case 7:
v4 = (_DWORD *)a2[1];
v5 = (unsigned __int8 *)v4[2];
if ( *v4 == 4 )
{
BIO_printf(a1, "IP Address:%d.%d.%d.%d", *v5, v5[1], v5[2], v5[3]);
}
else if ( *v4 == 16 )
{
BIO_printf(a1, "IP Address");
v9 = v5 + 2;
v10 = v5 + 18;
do
{
v11 = *(v9 - 1) | (*(v9 - 2) << 8);
v9 += 2;
BIO_printf(a1, ":%X", v11);
}
while ( v9 != v10 );
BIO_puts(a1, (int)"\n");
}
else
{
BIO_printf(a1, "IP Address:");
}
goto LABEL_5;
case 8:
BIO_printf(a1, "Registered ID:");
i2a_ASN1_OBJECT(a1, a2[1], v7, v8);
result = 1;
break;
default:
LABEL_5:
result = 1;
break;
}
return result;
}