//
// BN_CTX_get from 0x86c1e0 to 0x86c368 (392 bytes)
//
// 227 xrefs:
// > BN_mod_mul_montgomery @ 0x7d5560
// > BN_from_montgomery @ 0x7d5658
// > BN_MONT_CTX_set @ 0x7d5798
// > BN_mul @ 0x7d6fe0
// > BN_mul @ 0x7d7120
// > BN_sqr @ 0x7d8610
// > BN_sqr @ 0x7d874c
// > sub_7E0018 @ 0x7e0054
// > EC_KEY_set_public_key_affine_coordinates @ 0x7e94dc
// > EC_KEY_set_public_key_affine_coordinates @ 0x7e94e8
// > EC_GROUP_cmp @ 0x7eb4b0
// > EC_GROUP_cmp @ 0x7eb4bc
// > EC_GROUP_cmp @ 0x7eb4c8
// > EC_GROUP_cmp @ 0x7eb4d4
// > EC_GROUP_cmp @ 0x7eb4e0
// > EC_GROUP_cmp @ 0x7eb4ec
// > ecdh_simple_compute_key @ 0x7ed654
// > ecdh_simple_compute_key @ 0x7ed660
// > ossl_ecdsa_verify_sig @ 0x7eeae4
// > ossl_ecdsa_verify_sig @ 0x7eeaf0
// > ossl_ecdsa_verify_sig @ 0x7eeafc
// > ossl_ecdsa_verify_sig @ 0x7eeb08
// > sub_7F0594 @ 0x7f14b8
// > sub_7F0594 @ 0x7f1588
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f2264
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f2270
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f227c
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f2288
// > ec_GFp_simple_point2oct @ 0x7f279c
// > ec_GFp_simple_point2oct @ 0x7f27a8
// > ec_GFp_simple_oct2point @ 0x7f2afc
// > ec_GFp_simple_oct2point @ 0x7f2b08
// > ec_GFp_simple_group_check_discriminant @ 0x7f31b4
// > ec_GFp_simple_group_check_discriminant @ 0x7f31c0
// > ec_GFp_simple_group_check_discriminant @ 0x7f31cc
// > ec_GFp_simple_group_check_discriminant @ 0x7f31d8
// > ec_GFp_simple_group_check_discriminant @ 0x7f31e4
// > ec_GFp_simple_point_get_affine_coordinates @ 0x7f35b4
// > ec_GFp_simple_point_get_affine_coordinates @ 0x7f35c0
// > ec_GFp_simple_point_get_affine_coordinates @ 0x7f35cc
// > ec_GFp_simple_point_get_affine_coordinates @ 0x7f35d8
// > ec_GFp_simple_dbl @ 0x7f38ec
// > ec_GFp_simple_dbl @ 0x7f38f8
// > ec_GFp_simple_dbl @ 0x7f3904
// > ec_GFp_simple_dbl @ 0x7f3910
// > ec_GFp_simple_group_set_curve @ 0x7f3e38
// > ec_GFp_simple_cmp @ 0x7f4098
// > ec_GFp_simple_cmp @ 0x7f40a4
// > ec_GFp_simple_cmp @ 0x7f40b0
// > ec_GFp_simple_cmp @ 0x7f40bc
// > ec_GFp_simple_add @ 0x7f4374
// > ec_GFp_simple_add @ 0x7f4380
// > ec_GFp_simple_add @ 0x7f438c
// > ec_GFp_simple_add @ 0x7f4398
// > ec_GFp_simple_add @ 0x7f43a4
// > ec_GFp_simple_add @ 0x7f43b0
// > ec_GFp_simple_add @ 0x7f43bc
// > ec_GFp_simple_is_on_curve @ 0x7f4948
// > ec_GFp_simple_is_on_curve @ 0x7f4954
// > ec_GFp_simple_is_on_curve @ 0x7f4960
// > ec_GFp_simple_is_on_curve @ 0x7f496c
// > ec_GFp_simple_make_affine @ 0x7f4c28
// > ec_GFp_simple_make_affine @ 0x7f4c34
// > ec_GFp_simple_points_make_affine @ 0x7f4d30
// > ec_GFp_simple_points_make_affine @ 0x7f4d3c
// > RSA_setup_blinding @ 0x82d464
// > RSA_setup_blinding @ 0x82d5dc
// > RSA_setup_blinding @ 0x82d5e8
// > RSA_setup_blinding @ 0x82d5f4
// > sub_82DDB0 @ 0x82ddd4
// > sub_82DDB0 @ 0x82dde0
// > sub_82DDB0 @ 0x82ddec
// > sub_82E210 @ 0x82e270
// > sub_82E210 @ 0x82e284
// > sub_82E5F4 @ 0x82e654
// > sub_82E5F4 @ 0x82e660
// > sub_82E968 @ 0x82e994
// > sub_82E968 @ 0x82e9a8
// > sub_82E968 @ 0x82ec90
// > sub_82EE80 @ 0x82eeac
// > sub_82EE80 @ 0x82eec0
// > sub_82EE80 @ 0x82f0b4
// > BN_div @ 0x86c404
// > BN_div @ 0x86c410
// > BN_div @ 0x86c41c
// > BN_div @ 0x86c8d4
// > BN_exp @ 0x86cc30
// > BN_exp @ 0x86cd34
// > BN_mod_exp_recp @ 0x86cdc0
// > BN_mod_exp_recp @ 0x86cdd0
// > BN_mod_exp_recp @ 0x86cf68
// > BN_mod_exp_mont @ 0x86d8a4
// > BN_mod_exp_mont @ 0x86d8b0
// > BN_mod_exp_mont @ 0x86d8bc
// > BN_mod_exp_mont @ 0x86dad0
// > BN_mod_exp_mont_word @ 0x86de88
// > BN_mod_exp_mont_word @ 0x86de94
// > BN_mod_exp_mont_word @ 0x86dea0
// > BN_mod_exp_simple @ 0x86e398
// > BN_mod_exp_simple @ 0x86e3a4
// > BN_mod_exp_simple @ 0x86e4e0
// > BN_mod_exp2_mont @ 0x86e778
// > BN_mod_exp2_mont @ 0x86e784
// > BN_mod_exp2_mont @ 0x86e790
// > BN_mod_exp2_mont @ 0x86e7a0
// > BN_mod_exp2_mont @ 0x86ea50
// > BN_mod_exp2_mont @ 0x86ebc8
// > BN_gcd @ 0x86ef34
// > BN_gcd @ 0x86ef40
// > int_bn_mod_inverse @ 0x86f148
// > int_bn_mod_inverse @ 0x86f154
// > int_bn_mod_inverse @ 0x86f160
// > int_bn_mod_inverse @ 0x86f16c
// > int_bn_mod_inverse @ 0x86f178
// > int_bn_mod_inverse @ 0x86f184
// > int_bn_mod_inverse @ 0x86f190
// > int_bn_mod_inverse @ 0x86f39c
// > int_bn_mod_inverse @ 0x86f3a8
// > int_bn_mod_inverse @ 0x86f3b4
// > int_bn_mod_inverse @ 0x86f3c0
// > int_bn_mod_inverse @ 0x86f3cc
// > int_bn_mod_inverse @ 0x86f3d8
// > int_bn_mod_inverse @ 0x86f3e4
// > BN_kronecker @ 0x86ff74
// > BN_kronecker @ 0x86ff80
// > BN_mod_mul @ 0x870370
// > BN_reciprocal @ 0x8712fc
// > BN_div_recp @ 0x871378
// > BN_div_recp @ 0x871384
// > BN_div_recp @ 0x871548
// > BN_div_recp @ 0x871558
// > BN_mod_mul_reciprocal @ 0x8715dc
// > BN_mod_sqrt @ 0x871788
// > BN_mod_sqrt @ 0x871794
// > BN_mod_sqrt @ 0x8717a0
// > BN_mod_sqrt @ 0x8717ac
// > BN_mod_sqrt @ 0x8717b8
// > BN_mod_sqrt @ 0x8717c4
// > DH_check @ 0x87f518
// > DH_check @ 0x87f528
// > DH_check_pub_key @ 0x87f7a0
// > dsa_builtin_paramgen @ 0x88030c
// > dsa_builtin_paramgen @ 0x880318
// > dsa_builtin_paramgen @ 0x880324
// > dsa_builtin_paramgen @ 0x880330
// > dsa_builtin_paramgen @ 0x88033c
// > dsa_builtin_paramgen @ 0x880348
// > dsa_builtin_paramgen @ 0x880354
// > dsa_builtin_paramgen @ 0x880360
// > dsa_builtin_paramgen2 @ 0x880cb8
// > dsa_builtin_paramgen2 @ 0x880cc4
// > dsa_builtin_paramgen2 @ 0x880cd0
// > dsa_builtin_paramgen2 @ 0x880cdc
// > dsa_builtin_paramgen2 @ 0x880ce8
// > dsa_builtin_paramgen2 @ 0x880cf4
// > dsa_builtin_paramgen2 @ 0x881048
// > dsa_builtin_paramgen2 @ 0x881054
// > ec_GF2m_simple_set_compressed_coordinates @ 0x888e5c
// > ec_GF2m_simple_set_compressed_coordinates @ 0x888e68
// > ec_GF2m_simple_set_compressed_coordinates @ 0x888e74
// > ec_GF2m_simple_set_compressed_coordinates @ 0x888e80
// > ec_GF2m_simple_point2oct @ 0x8891cc
// > ec_GF2m_simple_point2oct @ 0x8891d8
// > ec_GF2m_simple_point2oct @ 0x8891e4
// > ec_GF2m_simple_oct2point @ 0x889570
// > ec_GF2m_simple_oct2point @ 0x88957c
// > ec_GF2m_simple_oct2point @ 0x889588
// > ec_GF2m_simple_group_check_discriminant @ 0x889b5c
// > ec_GF2m_simple_cmp @ 0x889fd4
// > ec_GF2m_simple_cmp @ 0x889fe0
// > ec_GF2m_simple_cmp @ 0x889fec
// > ec_GF2m_simple_cmp @ 0x889ff8
// > ec_GF2m_simple_make_affine @ 0x88a15c
// > ec_GF2m_simple_make_affine @ 0x88a168
// > ec_GF2m_simple_is_on_curve @ 0x88a264
// > ec_GF2m_simple_is_on_curve @ 0x88a270
// > ec_GF2m_simple_add @ 0x88a3f0
// > ec_GF2m_simple_add @ 0x88a3fc
// > ec_GF2m_simple_add @ 0x88a408
// > ec_GF2m_simple_add @ 0x88a414
// > ec_GF2m_simple_add @ 0x88a420
// > ec_GF2m_simple_add @ 0x88a42c
// > ec_GF2m_simple_add @ 0x88a438
// > ec_GF2m_simple_add @ 0x88a444
// > RSA_generate_key_ex @ 0x8bf98c
// > RSA_generate_key_ex @ 0x8bf998
// > RSA_generate_key_ex @ 0x8bf9a4
// > RSA_generate_key_ex @ 0x8bf9b0
// > BN_GF2m_mod_sqr_arr @ 0x8c94ec
// > BN_GF2m_mod_mul_arr @ 0x8c9638
// > BN_GF2m_mod_exp_arr @ 0x8c9814
// > BN_GF2m_mod_sqrt_arr @ 0x8c9938
// > BN_GF2m_mod_solve_quad_arr @ 0x8c99d4
// > BN_GF2m_mod_solve_quad_arr @ 0x8c99e0
// > BN_GF2m_mod_solve_quad_arr @ 0x8c99ec
// > BN_GF2m_mod_solve_quad_arr @ 0x8c9a5c
// > BN_GF2m_mod_solve_quad_arr @ 0x8c9a68
// > BN_GF2m_mod_solve_quad_arr @ 0x8c9a74
// > BN_GF2m_mod_inv @ 0x8c9e90
// > BN_GF2m_mod_inv @ 0x8c9ea4
// > BN_GF2m_mod_inv @ 0x8c9eb8
// > BN_GF2m_mod_inv @ 0x8c9ed0
// > BN_GF2m_mod_div @ 0x8ca36c
// > BN_GF2m_mod_inv_arr @ 0x8ca7b0
// > BN_GF2m_mod_div_arr @ 0x8ca824
// > BN_is_prime_fasttest_ex @ 0x8ca9c8
// > BN_is_prime_fasttest_ex @ 0x8ca9ec
// > BN_is_prime_fasttest_ex @ 0x8ca9f8
// > BN_is_prime_fasttest_ex @ 0x8caa04
// > bn_probable_prime_dh_coprime @ 0x8cae24
// > bn_probable_prime_dh_coprime @ 0x8cae34
// > bn_probable_prime_dh @ 0x8caf9c
// > BN_generate_prime_ex @ 0x8cb1f8
// > BN_generate_prime_ex @ 0x8cb280
// > BN_generate_prime_ex @ 0x8cb28c
// > BN_generate_prime_ex @ 0x8cb298
// > DH_generate_parameters_ex @ 0x8d08e8
// > DH_generate_parameters_ex @ 0x8d08f4
// > sub_8D1010 @ 0x8d10a8
// > sub_8D1010 @ 0x8d10b4
// > sub_8D1010 @ 0x8d12ac
// > sub_8D1010 @ 0x8d12b8
// > sub_8D1010 @ 0x8d1414
// > sub_8D1010 @ 0x8d167c
// > sub_8D1010 @ 0x8d1688
// > sub_8D1010 @ 0x8d1694
// > ??> @ 0x5fd1c
//
// 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
//
int **__fastcall BN_CTX_get(int ***a1)
{
int **v1; // r5
int **v2; // r2
int **v4; // r6
int **v5; // r3
int v6; // r5
_DWORD *v8; // r0
_DWORD *v9; // r7
_DWORD *v10; // r6
_DWORD *v11; // r0
int *v12; // r3
bool v13; // zf
int v14; // r2
int v15; // r3
int v16; // r0
v1 = a1[9];
if ( !v1 )
{
if ( a1[10] )
return v1;
v2 = a1[3];
v4 = a1[11];
if ( v2 == a1[4] )
{
v8 = CRYPTO_malloc(&dword_148, (int)"crypto/bn/bn_ctx.c", 309);
v1 = (int **)v8;
if ( v8 )
{
v13 = ((unsigned __int8)v4 & 8) == 0;
v9 = v8 + 80;
v10 = v8;
if ( v13 )
{
do
{
v11 = v10;
v10 += 5;
bn_init(v11);
}
while ( v10 != v9 );
}
else
{
do
{
bn_init(v10);
v16 = (int)v10;
v10 += 5;
BN_set_flags(v16, 8);
}
while ( v10 != v9 );
}
v12 = (int *)a1[2];
v13 = *a1 == nullptr;
v1[80] = v12;
v1[81] = nullptr;
if ( !v13 )
v12[81] = (int)v1;
v14 = (int)(a1[4] + 4);
v15 = (int)a1[3] + 1;
a1[2] = v1;
a1[1] = v1;
if ( v13 )
*a1 = v1;
a1[4] = (int **)v14;
a1[3] = (int **)v15;
goto LABEL_8;
}
}
else
{
if ( v2 )
{
v5 = a1[1];
v6 = (unsigned int)a1[3] & 0xF;
if ( ((unsigned __int8)v2 & 0xF) == 0 )
{
v5 = (int **)v5[81];
a1[1] = v5;
}
}
else
{
v5 = *a1;
a1[1] = *a1;
v6 = 0;
}
v1 = &v5[5 * v6];
a1[3] = (int **)((char *)v2 + 1);
if ( v1 )
{
LABEL_8:
BN_set_word(v1, 0);
a1[8] = (int **)((char *)a1[8] + 1);
return v1;
}
}
a1[10] = (int **)(&dword_0 + 1);
ERR_put_error(3, 116, 109, (int)"crypto/bn/bn_ctx.c", 225);
return nullptr;
}
return nullptr;
}