//
// BN_mod_mul from 0x870350 to 0x8703e0 (144 bytes)
//
// 37 xrefs:
// > sub_7E255C @ 0x7e271c
// > sub_7E255C @ 0x7e273c
// > sub_7E28B8 @ 0x7e2c40
// > sub_7E28B8 @ 0x7e2ca4
// > ossl_ecdsa_sign_sig @ 0x7ee314
// > ossl_ecdsa_sign_sig @ 0x7ee350
// > ossl_ecdsa_verify_sig @ 0x7eec68
// > ossl_ecdsa_verify_sig @ 0x7eedc4
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f2314
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f236c
// > ec_GFp_simple_field_mul @ 0x7f3188
// > ec_GFp_simple_group_check_discriminant @ 0x7f3330
// > ec_GFp_simple_point_get_affine_coordinates @ 0x7f37a8
// > SRP_Calc_server_key @ 0x836a0c
// > SRP_Calc_B @ 0x836b68
// > SRP_Calc_client_key @ 0x836ee4
// > BN_BLINDING_invert_ex @ 0x86b938
// > BN_BLINDING_invert_ex @ 0x86b960
// > BN_BLINDING_update @ 0x86bd8c
// > BN_BLINDING_update @ 0x86bdf4
// > BN_BLINDING_convert_ex @ 0x86bebc
// > BN_mod_exp_simple @ 0x86e4bc
// > BN_mod_exp_simple @ 0x86e504
// > BN_mod_exp_simple @ 0x86e5dc
// > BN_mod_exp_simple @ 0x86e614
// > BN_mod_exp_simple @ 0x86e6dc
// > BN_mod_sqrt @ 0x871964
// > BN_mod_sqrt @ 0x871998
// > BN_mod_sqrt @ 0x8719b8
// > BN_mod_sqrt @ 0x871c88
// > BN_mod_sqrt @ 0x871ca8
// > BN_mod_sqrt @ 0x871d1c
// > BN_mod_sqrt @ 0x871df0
// > BN_mod_sqrt @ 0x871e10
// > BN_mod_sqrt @ 0x871e30
// > BN_is_prime_fasttest_ex @ 0x8cacc8
// > ??> @ 0x60f5c
//
// 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 BN_mod_mul(int *a1, int **a2, int **a3, int *a4, int ***a5)
{
int **v9; // r0
int *v10; // r6
_BOOL4 v11; // r4
int savedregs; // [sp+0h] [bp+0h]
BN_CTX_start((int)a5);
v9 = BN_CTX_get(a5);
v10 = (int *)v9;
if ( !v9 )
goto LABEL_7;
if ( a2 == a3 )
{
if ( BN_sqr((int)v9, a2, (int)a5) )
goto LABEL_4;
LABEL_7:
v11 = 0;
goto LABEL_5;
}
if ( !BN_mul(v9, a2, a3, (int)a5) )
goto LABEL_7;
LABEL_4:
v11 = BN_nnmod(a1, v10, a4, a5, savedregs) != 0;
LABEL_5:
BN_CTX_end(a5);
return v11;
}