//
// sub_D8C8B0 from 0xd8c8b0 to 0xd8ca44 (404 bytes)
//
// 1 xrefs:
// > ??> @ 0x1122e90
//
// 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
//
__int64 __fastcall sub_D8C8B0(__int64 a1, __int64 a2, unsigned int a3)
{
__int64 v4; // x19
__int64 v6; // x20
unsigned int conv_form; // w0
__int64 v8; // x19
unsigned int v9; // w20
int v11; // w0
__int64 v12; // [xsp+38h] [xbp+38h] BYREF
v12 = 0;
v4 = *(_QWORD *)(a2 + 32);
if ( v4 )
{
v6 = EC_KEY_get0_group(*(_QWORD *)(a2 + 32));
if ( v6 )
{
if ( EC_KEY_get0_public_key(v4) )
{
conv_form = EC_KEY_get_conv_form(v4);
v8 = EC_KEY_key2buf(v4, conv_form, &v12, 0);
if ( !v8 )
goto LABEL_5;
}
else
{
v8 = 0;
}
if ( (unsigned int)BIO_indent(a1, a3, 128) )
{
v11 = EC_GROUP_order_bits(v6);
if ( (int)BIO_printf(a1, "%s: (%d bit)\n", "Public-Key", v11) > 0
&& (!v8
|| (int)BIO_printf(a1, "%*spub:\n", a3, &byte_F288A0) > 0
&& (unsigned int)ASN1_buf_print(a1, v12, v8, a3 + 4)) )
{
if ( (unsigned int)ECPKParameters_print(a1, v6, a3) )
{
v9 = 1;
goto LABEL_6;
}
}
}
LABEL_5:
v9 = 0;
ERR_put_error(16, 221, 16, "crypto/ec/ec_ameth.c", 392);
LABEL_6:
CRYPTO_clear_free(0, 0, "crypto/ec/ec_ameth.c", 393);
CRYPTO_free(v12, "crypto/ec/ec_ameth.c", 394);
return v9;
}
}
ERR_put_error(16, 221, 67, "crypto/ec/ec_ameth.c", 344);
return 0;
}