//
// OPENSSL_asc2uni from 0xdcb814 to 0xdcb8cc (184 bytes)
//
// 3 xrefs:
// > PKCS12_key_gen_asc @ 0xdc9ee0
// > OPENSSL_utf82uni @ 0xdcba20
// > ??> @ 0x8ca18
//
// 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
//
_BYTE *__fastcall OPENSSL_asc2uni(const char *a1, int a2, _QWORD *a3, int *a4)
{
int v7; // w20
_BYTE *result; // x0
__int64 i; // x4
int v10; // w6
char *v11; // x5
char *v12; // x21
if ( a2 == -1 )
a2 = strlen(a1);
v7 = 2 * (a2 + 1);
result = CRYPTO_malloc((void *)v7, (__int64)"crypto/pkcs12/p12_utl.c", 25);
if ( result )
{
for ( i = 0; v7 - 2 > (int)i; v11[1] = a1[v10] )
{
v10 = (int)i >> 1;
result[i] = 0;
v11 = &result[i];
i += 2;
}
v12 = &result[v7];
*(v12 - 2) = 0;
*(v12 - 1) = 0;
if ( a4 )
*a4 = v7;
if ( a3 )
*a3 = result;
}
return result;
}