//
// BN_CTX_free from 0x86bfa8 to 0x86c048 (160 bytes)
//
// 80 xrefs:
// > sub_7E0018 @ 0x7e00e8
// > sub_7E01E0 @ 0x7e02b0
// > sub_7E11C4 @ 0x7e127c
// > sub_7E255C @ 0x7e2618
// > sub_7E28B8 @ 0x7e2a40
// > sub_7E28B8 @ 0x7e2ac4
// > sub_7E2D78 @ 0x7e2e24
// > EC_GROUP_new_by_curve_name @ 0x7e8154
// > ec_key_simple_generate_key @ 0x7e8ec4
// > ec_key_simple_check_key @ 0x7e90a0
// > EC_KEY_set_public_key_affine_coordinates @ 0x7e953c
// > EC_GROUP_cmp @ 0x7eb534
// > EC_GROUP_cmp @ 0x7eb69c
// > ec_precompute_mont_data @ 0x7eb934
// > ec_wNAF_mul @ 0x7ebeac
// > ec_wNAF_mul @ 0x7ebfc0
// > ec_wNAF_mul @ 0x7ec090
// > ec_wNAF_mul @ 0x7ec2fc
// > ec_wNAF_mul @ 0x7ec6c8
// > ec_wNAF_mul @ 0x7ec730
// > ec_wNAF_precompute_mult @ 0x7ecc38
// > ec_wNAF_precompute_mult @ 0x7ecd50
// > ec_wNAF_precompute_mult @ 0x7ecef8
// > ec_wNAF_precompute_mult @ 0x7ed07c
// > ecdh_simple_compute_key @ 0x7ed7b4
// > ossl_ecdsa_sign_setup @ 0x7edb88
// > ossl_ecdsa_sign_sig @ 0x7ee244
// > ossl_ecdsa_verify_sig @ 0x7eeb68
// > ECPKParameters_print @ 0x7ef414
// > ec_GFp_mont_group_set_curve @ 0x7efba4
// > sub_7F0594 @ 0x7f1480
// > sub_7F1BA0 @ 0x7f1cb0
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f22c4
// > ec_GFp_simple_point2oct @ 0x7f26d8
// > ec_GFp_simple_point2oct @ 0x7f28a0
// > ec_GFp_simple_oct2point @ 0x7f2b74
// > ec_GFp_simple_group_get_curve @ 0x7f2f60
// > ec_GFp_simple_get_Jprojective_coordinates_GFp @ 0x7f304c
// > ec_GFp_simple_group_check_discriminant @ 0x7f322c
// > ec_GFp_simple_set_Jprojective_coordinates_GFp @ 0x7f342c
// > ec_GFp_simple_point_get_affine_coordinates @ 0x7f36e0
// > ec_GFp_simple_dbl @ 0x7f3964
// > ec_GFp_simple_group_set_curve @ 0x7f3f78
// > ec_GFp_simple_cmp @ 0x7f41a4
// > ec_GFp_simple_add @ 0x7f4518
// > ec_GFp_simple_is_on_curve @ 0x7f49d0
// > ec_GFp_simple_make_affine @ 0x7f4c70
// > ec_GFp_simple_points_make_affine @ 0x7f4d64
// > ec_GFp_simple_points_make_affine @ 0x7f4dcc
// > RSA_setup_blinding @ 0x82d4f4
// > sub_82E210 @ 0x82e378
// > sub_82E5F4 @ 0x82e730
// > sub_82E968 @ 0x82ea44
// > sub_82EE80 @ 0x82f158
// > SRP_Calc_server_key @ 0x8369d4
// > SRP_Calc_B @ 0x836b0c
// > SRP_Calc_A @ 0x836de8
// > SRP_Calc_client_key @ 0x836f30
// > SRP_Verify_B_mod_N @ 0x83703c
// > SRP_create_verifier_BN @ 0x8381f0
// > DH_check @ 0x87f5d4
// > DH_check_pub_key @ 0x87f7cc
// > dsa_builtin_paramgen @ 0x880934
// > dsa_builtin_paramgen2 @ 0x880df8
// > ec_GF2m_simple_set_compressed_coordinates @ 0x888ebc
// > ec_GF2m_simple_point2oct @ 0x889108
// > ec_GF2m_simple_point2oct @ 0x8892ec
// > ec_GF2m_simple_oct2point @ 0x8895f4
// > ec_GF2m_simple_group_check_discriminant @ 0x889b8c
// > ec_GF2m_simple_cmp @ 0x88a038
// > ec_GF2m_simple_make_affine @ 0x88a1a4
// > ec_GF2m_simple_is_on_curve @ 0x88a2a0
// > ec_GF2m_simple_add @ 0x88a6c4
// > RSA_generate_key_ex @ 0x8bfb24
// > BN_is_prime_fasttest_ex @ 0x8cad24
// > BN_generate_prime_ex @ 0x8cb30c
// > DH_generate_parameters_ex @ 0x8d0a38
// > DSA_generate_key @ 0x8d0f28
// > ec_GF2m_simple_mul @ 0x8d19bc
// > ??> @ 0x60a7c
//
// 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
//
void __fastcall BN_CTX_free(void **a1)
{
_DWORD *v2; // r4
bool v3; // zf
_DWORD *v4; // r5
_BYTE *v5; // r0
void *v6; // r0
if ( a1 )
{
CRYPTO_free(a1[5], (int)"crypto/bn/bn_ctx.c", 247);
v2 = *a1;
v3 = *a1 == nullptr;
a1[5] = nullptr;
if ( !v3 )
{
do
{
v4 = v2 + 80;
do
{
v5 = v2;
v3 = *v2 == 0;
v2 += 5;
if ( !v3 )
BN_clear_free(v5);
}
while ( v2 != v4 );
v6 = *a1;
a1[1] = *((void **)*a1 + 81);
CRYPTO_free(v6, (int)"crypto/bn/bn_ctx.c", 296);
v2 = a1[1];
*a1 = v2;
}
while ( v2 );
}
CRYPTO_free(a1, (int)"crypto/bn/bn_ctx.c", 178);
}
}