//
// ASN1_UNIVERSALSTRING_to_string from 0x9d2a7c to 0x9d2b94 (280 bytes)
//
// 1 xrefs:
// > ??> @ 0x77cfc
//
// 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:07:12 +0000
//
int __fastcall ASN1_UNIVERSALSTRING_to_string(int *a1)
{
int v2; // r4
unsigned __int8 *v3; // lr
int v4; // r1
int v5; // r2
_BYTE *v6; // r3
_BYTE *v7; // r2
_BYTE *v8; // r1
int v9; // r3
int v11; // r1
_BYTE *v12; // r0
int v13; // r0
if ( a1[1] != 28 )
return 0;
v2 = *a1;
if ( (*a1 & 3) == 0 )
{
v3 = (unsigned __int8 *)a1[2];
if ( v2 <= 0 )
goto LABEL_20;
v4 = *v3;
if ( !*v3 )
{
if ( v3[1] )
return v4;
v5 = v3[2];
if ( !v3[2] )
{
v6 = (_BYTE *)a1[2];
while ( 1 )
{
v5 += 4;
if ( v2 <= v5 )
break;
if ( v6[4] )
return 0;
v4 = (unsigned __int8)v6[5];
v6 += 4;
if ( v4 )
return 0;
if ( v6[2] )
return v4;
}
if ( v2 > 3 )
{
v7 = (_BYTE *)a1[2];
v8 = v7;
v9 = 3;
while ( 1 )
{
*v7++ = v8[v9];
v9 += 4;
if ( *a1 <= v9 )
break;
v8 = (_BYTE *)a1[2];
}
goto LABEL_17;
}
LABEL_20:
v7 = (_BYTE *)a1[2];
LABEL_17:
*v7 = 0;
v11 = *a1 / 4;
v12 = (_BYTE *)a1[2];
*a1 = v11;
v13 = ASN1_PRINTABLE_type(v12, v11);
v4 = 1;
a1[1] = v13;
return v4;
}
}
}
return 0;
}