//
// ASN1_PRINTABLE_type from 0xd64600 to 0xd646c0 (192 bytes)
//
// 3 xrefs:
// > ASN1_UNIVERSALSTRING_to_string @ 0xd647b0
// > X509_NAME_ENTRY_set_data @ 0xdef7a0
// > ??> @ 0x6c240
//
// 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 ASN1_PRINTABLE_type(unsigned __int8 *a1, int a2)
{
int v2; // w3
int v3; // w4
unsigned __int8 *v4; // x1
int v5; // w7
bool v6; // zf
unsigned int v7; // w5
unsigned __int8 *v8; // x0
unsigned __int8 i; // w2
unsigned int v10; // w2
unsigned int v11; // w6
unsigned int v12; // w3
__int64 result; // x0
if ( a2 <= 0 )
a2 = -1;
if ( !a1 )
return 19;
v2 = *a1;
v3 = 0;
v4 = &a1[a2];
v5 = 0;
v6 = a1 == v4;
v7 = v2 & 0xFFFFFF80;
v8 = a1 + 1;
for ( i = (v2 & 0xDF) - 65; v2; i = (v2 & 0xDF) - 65 )
{
if ( v6 )
break;
if ( i > 0x19u )
{
v10 = (unsigned __int8)(v2 - 39);
v11 = (unsigned __int8)(v2 - 43);
if ( v2 != 32 )
{
v12 = v2 & 0xFFFFFFFD;
if ( v10 > 2 && v11 > 0xF && v12 != 61 )
v5 = 1;
}
}
v2 = *v8;
if ( v7 )
v3 = 1;
v6 = v8++ == v4;
v7 = v2 & 0xFFFFFF80;
}
result = 20;
if ( !v3 )
{
if ( v5 )
return 22;
else
return 19;
}
return result;
}