//
// ASN1_buf_print from 0x86781c to 0x867918 (252 bytes)
//
// 10 xrefs:
// > sub_7E51A0 @ 0x7e52e8
// > sub_7E5364 @ 0x7e54e0
// > sub_7E5364 @ 0x7e5574
// > EC_KEY_print @ 0x7e5788
// > EC_KEY_print @ 0x7e57f0
// > sub_7F5620 @ 0x7f5698
// > sub_7F5620 @ 0x7f56d4
// > sub_7F5730 @ 0x7f5798
// > ASN1_bn_print @ 0x867ac4
// > ??> @ 0x611fc
//
// 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
//
bool __fastcall ASN1_buf_print(int a1, int a2, int a3, int a4)
{
int v6; // r5
unsigned int v7; // r9
char *v8; // r3
int v9; // t1
char *v11; // [sp+0h] [bp-Ch]
if ( !a3 )
return BIO_write(a1, (int)"\n", 1) > 0;
v11 = "%02x%s";
v6 = a2 - 1;
v7 = 0;
while ( v7 != 15 * (v7 / 0xF) || (!v7 || BIO_puts(a1, (int)"\n") > 0) && BIO_indent(a1, a4, 128) )
{
v8 = a3 - 1 == v7 ? &byte_9B1912 : ":";
v9 = *(unsigned __int8 *)++v6;
++v7;
if ( BIO_printf(a1, v11, v9, v8, v11) <= 0 )
break;
if ( v7 == a3 )
return BIO_write(a1, (int)"\n", 1) > 0;
}
return 0;
}