//
// sub_82B858 from 0x82b858 to 0x82ba20 (456 bytes)
//
// 1 xrefs:
// > ??> @ 0xa38d20
//
// 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_82B858(int a1, int a2, int a3)
{
_DWORD *v3; // r6
_DWORD *v5; // r0
int v7; // r4
const char *v8; // r4
const char *v9; // r1
v3 = *(_DWORD **)(a2 + 20);
v5 = (_DWORD *)v3[4];
if ( v5 )
v7 = BN_num_bits(v5);
else
v7 = 0;
if ( !BIO_indent(a1, a3, 128) )
return 0;
if ( !v3[6] )
{
if ( BIO_printf(a1, "Public-Key: (%d bit)\n", v7) > 0 )
{
v8 = "Exponent:";
v9 = "Modulus:";
goto LABEL_8;
}
return 0;
}
if ( BIO_printf(a1, "Private-Key: (%d bit)\n", v7) <= 0 )
return 0;
v8 = "publicExponent:";
v9 = "modulus:";
LABEL_8:
if ( !ASN1_bn_print(a1, v9, v3[4], 0, a3)
|| !ASN1_bn_print(a1, v8, v3[5], 0, a3)
|| !ASN1_bn_print(a1, "privateExponent:", v3[6], 0, a3)
|| !ASN1_bn_print(a1, "prime1:", v3[7], 0, a3)
|| !ASN1_bn_print(a1, "prime2:", v3[8], 0, a3)
|| !ASN1_bn_print(a1, "exponent1:", v3[9], 0, a3)
|| !ASN1_bn_print(a1, "exponent2:", v3[10], 0, a3) )
{
return 0;
}
return ASN1_bn_print(a1, "coefficient:", v3[11], 0, a3) != 0;
}