//
// sub_867B28 from 0x867b28 to 0x867c70 (328 bytes)
//
// 9 xrefs:
// > sub_867C80 @ 0x867e60
// > sub_867C80 @ 0x868378
// > sub_867C80 @ 0x8684c0
// > sub_867C80 @ 0x868548
// > sub_867C80 @ 0x868850
// > ASN1_item_print @ 0x868f80
// > ASN1_item_print @ 0x868fdc
// > ASN1_item_print @ 0x869128
// > ASN1_item_print @ 0x8691dc
//
// 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 sub_867B28(int a1, int a2, int a3, const char *a4, int *a5)
{
int i; // r4
int v10; // r3
bool v11; // r3
int v12; // r3
for ( i = a2; i > 20; i -= 20 )
{
if ( BIO_write(a1, (int)" ", 20) != 20 )
return 0;
}
if ( i != BIO_write(a1, (int)" ", i) )
return 0;
v10 = *a5;
if ( (*a5 & 0x100) != 0 )
{
a4 = (const char *)(*a5 & 0x40);
if ( (v10 & 0x40) != 0 )
return 1;
v11 = 1;
}
else
{
if ( (v10 & 0x40) != 0 )
{
if ( a4 )
goto LABEL_24;
return 1;
}
v11 = a4 == nullptr;
}
if ( a3 )
v12 = 0;
else
v12 = v11;
if ( !v12 )
{
if ( a3 )
{
if ( BIO_puts(a1, a3) > 0 && (!a4 || BIO_printf(a1, " (%s)", a4) > 0) )
return BIO_write(a1, (int)": ", 2) == 2;
return 0;
}
if ( !a4 )
return BIO_write(a1, (int)": ", 2) == 2;
LABEL_24:
if ( BIO_puts(a1, (int)a4) <= 0 )
return 0;
return BIO_write(a1, (int)": ", 2) == 2;
}
return 1;
}