//
// OPENSSL_uni2asc from 0x82602c to 0x8260c8 (156 bytes)
//
// 2 xrefs:
// > OPENSSL_uni2utf8 @ 0x826478
// > ??> @ 0x6597c
//
// 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(int a1, int a2)
{
int v2; // r6
_BYTE *result; // r0
int v6; // r3
if ( (a2 & 1) != 0 )
return nullptr;
v2 = a2 / 2;
if ( !a2 || *(_BYTE *)(a1 + a2 - 1) )
++v2;
result = CRYPTO_malloc((void *)v2, (int)"crypto/pkcs12/p12_utl.c", 53);
if ( !result )
return nullptr;
if ( a2 > 0 )
{
v6 = 0;
do
{
result[v6 >> 1] = *(_BYTE *)(a1 + v6 + 1);
v6 += 2;
}
while ( a2 > v6 );
}
result[v2 - 1] = 0;
return result;
}