//
// OPENSSL_uni2asc from 0xdcb8cc to 0xdcb978 (172 bytes)
//
// 2 xrefs:
// > OPENSSL_uni2utf8 @ 0xdcbd94
// > ??> @ 0x8d390
//
// 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_uni2asc(__int64 a1, int a2)
{
int v4; // w0
__int64 v5; // x21
_BYTE *result; // x0
__int64 i; // x2
__int64 v8; // x4
int v9; // w3
if ( (a2 & 1) != 0 )
return nullptr;
v4 = a2 / 2;
if ( !a2 || *(_BYTE *)(a1 + a2 - 1) )
++v4;
v5 = v4;
result = CRYPTO_malloc((void *)v4, (__int64)"crypto/pkcs12/p12_utl.c", 53);
if ( !result )
return nullptr;
for ( i = 0; a2 > (int)i; result[v9] = *(_BYTE *)(v8 + 1) )
{
v8 = a1 + i;
v9 = (int)i >> 1;
i += 2;
}
result[v5 - 1] = 0;
return result;
}