//
// OPENSSL_buf2hexstr from 0xdc07c0 to 0xdc08bc (252 bytes)
//
// 4 xrefs:
// > i2s_ASN1_OCTET_STRING @ 0xe01d20
// > sub_E6FC74 @ 0xe6fc98
// > sub_E6FC74 @ 0xe6fcf0
// > ??> @ 0x82b60
//
// 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
//
char *__fastcall OPENSSL_buf2hexstr(unsigned __int8 *a1, __int64 a2)
{
__int64 v4; // x22
char *v5; // x0
char *v6; // x21
unsigned __int8 *v7; // x1
char *v8; // x2
char v9; // t1
char *v10; // x22
if ( !a2 )
return (char *)CRYPTO_zalloc((char *)dword_0 + 1, (__int64)"crypto/o_str.c", 203);
v4 = 3 * a2;
v5 = (char *)CRYPTO_malloc((void *)(3 * a2), (__int64)"crypto/o_str.c", 206);
v6 = v5;
if ( v5 )
{
if ( a2 <= 0 )
{
v10 = v5;
}
else
{
v7 = &a1[a2];
v8 = v5;
do
{
v8 += 3;
*(v8 - 3) = byte_F70320[(*a1 >> 4) + 64];
v9 = *a1++;
*(v8 - 1) = 58;
*(v8 - 2) = byte_F70320[(v9 & 0xF) + 64];
}
while ( a1 != v7 );
v10 = &v5[v4];
}
*(v10 - 1) = 0;
}
else
{
ERR_put_error(15, 117, 65, (__int64)"crypto/o_str.c", 207);
}
return v6;
}