//
// OPENSSL_buf2hexstr from 0xa2fc1c to 0xa2fd00 (228 bytes)
//
// 4 xrefs:
// > i2s_ASN1_OCTET_STRING @ 0xa700c4
// > sub_AD8F00 @ 0xad8f24
// > sub_AD8F00 @ 0xad8f84
// > ??> @ 0x7dccc
//
// 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:08:04 +0000
//
char *__fastcall OPENSSL_buf2hexstr(unsigned __int8 *a1, int a2)
{
int v2; // r5
char *v5; // r0
char *v6; // r4
char *v7; // r5
unsigned __int8 *v8; // r12
char *v9; // r2
unsigned __int8 *v10; // r0
unsigned int v11; // t1
if ( !a2 )
return (char *)CRYPTO_zalloc((char *)&dword_0 + 1, (int)"crypto/o_str.c", 203);
v2 = 3 * a2;
v5 = (char *)CRYPTO_malloc((void *)(3 * a2), (int)"crypto/o_str.c", 206);
v6 = v5;
if ( v5 )
{
if ( a2 > 0 )
{
v8 = a1;
v9 = v5 + 3;
do
{
v10 = v8;
v11 = *v8++;
v9 += 3;
*(v9 - 6) = byte_C57578[(v11 >> 4) + 56];
*(v9 - 5) = byte_C57578[(*v10 & 0xF) + 56];
*(v9 - 4) = 58;
}
while ( v8 != &a1[a2] );
v7 = &v6[v2];
}
else
{
v7 = v5;
}
*(v7 - 1) = 0;
}
else
{
ERR_put_error(15, 117, 65, (int)"crypto/o_str.c", 207);
}
return v6;
}