//
// sub_9F9F64 from 0x9f9f64 to 0x9fa184 (544 bytes)
//
// 1 xrefs:
// > ??> @ 0xc77fdc
//
// 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:07:34 +0000
//
int __fastcall sub_9F9F64(int a1, int a2, int a3)
{
int v3; // r4
int v6; // r9
int conv_form; // r0
int v8; // r5
int v9; // r6
int v10; // r5
int v12; // r0
int v13; // [sp+8h] [bp-Ch] BYREF
int v14; // [sp+Ch] [bp-8h] BYREF
v3 = *(_DWORD *)(a2 + 20);
v13 = 0;
v14 = 0;
if ( v3 )
{
v6 = EC_KEY_get0_group(v3);
if ( v6 )
{
if ( EC_KEY_get0_public_key(v3) )
{
conv_form = EC_KEY_get_conv_form(v3);
v8 = EC_KEY_key2buf(v3, conv_form, &v14, 0);
if ( !v8 )
{
LABEL_5:
v9 = 0;
goto LABEL_6;
}
}
else
{
v8 = 0;
}
if ( EC_KEY_get0_private_key(v3) )
{
v9 = EC_KEY_priv2buf(v3, &v13);
if ( !v9 )
goto LABEL_5;
}
else
{
v9 = 0;
}
if ( BIO_indent(a1, a3, 128) )
{
v12 = EC_GROUP_order_bits(v6);
if ( BIO_printf(a1, "%s: (%d bit)\n", "Private-Key", v12) > 0
&& (!v9 || BIO_printf(a1, "%*spriv:\n", a3, &byte_BF4ECA) > 0 && ASN1_buf_print(a1, v13, v9, a3 + 4))
&& (!v8 || BIO_printf(a1, "%*spub:\n", a3, &byte_BF4ECA) > 0 && ASN1_buf_print(a1, v14, v8, a3 + 4))
&& ECPKParameters_print(a1, v6, a3) )
{
v10 = 1;
goto LABEL_7;
}
}
LABEL_6:
ERR_put_error(16, 221, 16, "crypto/ec/ec_ameth.c", 392);
v10 = 0;
LABEL_7:
CRYPTO_clear_free(v13, v9, "crypto/ec/ec_ameth.c", 393);
CRYPTO_free(v14, "crypto/ec/ec_ameth.c", 394);
return v10;
}
}
ERR_put_error(16, 221, 67, "crypto/ec/ec_ameth.c", 344);
return 0;
}