//
// BN_set_word from 0x7d4d70 to 0x7d4dc0 (80 bytes)
//
// 98 xrefs:
// > ssl_get_auto_dh @ 0x7b4bf8
// > a2d_ASN1_OBJECT @ 0x7bd42c
// > BN_MONT_CTX_set @ 0x7d5804
// > BN_MONT_CTX_set @ 0x7d5918
// > BN_mul @ 0x7d70d0
// > BN_hex2bn @ 0x7d786c
// > BN_dec2bn @ 0x7d79cc
// > BN_rshift1 @ 0x7d80d0
// > BN_rshift @ 0x7d823c
// > BN_sub_word @ 0x7d897c
// > BN_add_word @ 0x7d8a9c
// > BN_mul_word @ 0x7d8adc
// > EC_GROUP_new_by_curve_name @ 0x7e82c8
// > EC_GROUP_set_generator @ 0x7eba18
// > EC_GROUP_set_generator @ 0x7eba30
// > ossl_ecdsa_sign_setup @ 0x7edcfc
// > ossl_ecdsa_sign_sig @ 0x7ee548
// > ec_GFp_simple_point_set_to_infinity @ 0x7f33d0
// > ec_GFp_simple_dbl @ 0x7f3bc8
// > ec_GFp_simple_add @ 0x7f4828
// > ec_GFp_simple_points_make_affine @ 0x7f4f00
// > ec_GFp_simple_points_make_affine @ 0x7f518c
// > OBJ_obj2txt @ 0x81c9c0
// > sub_8303D4 @ 0x83047c
// > BN_CTX_get @ 0x86c24c
// > BN_div @ 0x86c89c
// > BN_exp @ 0x86cd48
// > BN_mod_exp_recp @ 0x86ce74
// > BN_mod_exp_recp @ 0x86ceb4
// > BN_mod_exp_recp @ 0x86cfac
// > BN_mod_exp_recp @ 0x86d0d8
// > BN_mod_exp_mont_consttime @ 0x86d358
// > BN_mod_exp_mont_consttime @ 0x86d39c
// > BN_mod_exp_mont @ 0x86d944
// > BN_mod_exp_mont @ 0x86d9b8
// > BN_mod_exp_mont @ 0x86da18
// > BN_mod_exp_mont_word @ 0x86def8
// > BN_mod_exp_mont_word @ 0x86df8c
// > BN_mod_exp_mont_word @ 0x86e060
// > BN_mod_exp_mont_word @ 0x86e0dc
// > BN_mod_exp_mont_word @ 0x86e1ac
// > BN_mod_exp_mont_word @ 0x86e25c
// > BN_mod_exp_simple @ 0x86e410
// > BN_mod_exp_simple @ 0x86e458
// > BN_mod_exp_simple @ 0x86e524
// > BN_mod_exp_simple @ 0x86e64c
// > BN_mod_exp2_mont @ 0x86e830
// > BN_mod_exp2_mont @ 0x86eab8
// > int_bn_mod_inverse @ 0x86f1b0
// > int_bn_mod_inverse @ 0x86f1bc
// > int_bn_mod_inverse @ 0x86f408
// > int_bn_mod_inverse @ 0x86f414
// > int_bn_mod_inverse @ 0x86f5b4
// > int_bn_mod_inverse @ 0x86f5c0
// > int_bn_mod_inverse @ 0x86f608
// > int_bn_mod_inverse @ 0x86f614
// > int_bn_mod_inverse @ 0x86f64c
// > int_bn_mod_inverse @ 0x86f730
// > int_bn_mod_inverse @ 0x86f7c8
// > BN_rand @ 0x87079c
// > BN_pseudo_rand @ 0x870964
// > BN_bntest_rand @ 0x870b04
// > BN_rand_range @ 0x870da8
// > BN_pseudo_rand_range @ 0x870f8c
// > BN_RECP_CTX_set @ 0x8712b4
// > BN_div_recp @ 0x87151c
// > BN_mod_sqrt @ 0x8716d0
// > BN_mod_sqrt @ 0x871704
// > BN_mod_sqrt @ 0x871894
// > BN_mod_sqrt @ 0x871c4c
// > BN_mod_sqrt @ 0x871dd8
// > DH_check_pub_key @ 0x87f7b0
// > dsa_builtin_paramgen @ 0x880724
// > dsa_builtin_paramgen @ 0x8809e0
// > dsa_builtin_paramgen2 @ 0x881254
// > dsa_builtin_paramgen2 @ 0x8814e4
// > ec_GF2m_simple_point_set_to_infinity @ 0x889c08
// > ec_GF2m_simple_make_affine @ 0x88a1e4
// > BN_GF2m_mod_arr @ 0x8c94c0
// > BN_GF2m_mod_exp_arr @ 0x8c9878
// > BN_GF2m_mod_sqrt_arr @ 0x8c9974
// > BN_GF2m_mod_solve_quad_arr @ 0x8c9a2c
// > BN_GF2m_mod_solve_quad_arr @ 0x8c9ad0
// > BN_GF2m_mod_solve_quad_arr @ 0x8c9c34
// > BN_GF2m_arr2poly @ 0x8ca75c
// > DH_generate_parameters_ex @ 0x8d0940
// > DH_generate_parameters_ex @ 0x8d0954
// > DH_generate_parameters_ex @ 0x8d09a4
// > DH_generate_parameters_ex @ 0x8d09e8
// > DH_generate_parameters_ex @ 0x8d09fc
// > DH_generate_parameters_ex @ 0x8d0a94
// > DH_generate_parameters_ex @ 0x8d0aa8
// > sub_8D1010 @ 0x8d1150
// > sub_8D1010 @ 0x8d160c
// > sub_8D1010 @ 0x8d1648
// > sub_8D1010 @ 0x8d1654
// > sub_8D1010 @ 0x8d16a4
// > ??> @ 0x5da2c
//
// 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_set_word(int **a1, int a2)
{
int v4; // r3
int *v5; // r2
int result; // r0
if ( (int)a1[2] > 0 || (result = bn_expand2((int)a1, 1)) != 0 )
{
v4 = a2;
v5 = *a1;
if ( a2 )
v4 = 1;
a1[3] = nullptr;
*v5 = a2;
a1[1] = (int *)v4;
return 1;
}
return result;
}