//
// BN_set_word from 0xff9290 to 0xff92f0 (96 bytes)
//
// 101 xrefs:
// > ssl_get_auto_dh @ 0xfd9d20
// > a2d_ASN1_OBJECT @ 0xfe1bf8
// > BN_MONT_CTX_set @ 0xffa158
// > BN_MONT_CTX_set @ 0xffa210
// > BN_MONT_CTX_set @ 0xffa254
// > BN_mul @ 0xffb978
// > BN_hex2bn @ 0xffc284
// > BN_dec2bn @ 0xffc450
// > BN_rshift1 @ 0xffcdec
// > BN_rshift @ 0xffd1a0
// > BN_sub_word @ 0xffd9c0
// > BN_add_word @ 0xffdb18
// > BN_mul_word @ 0xffdb60
// > EC_GROUP_new_by_curve_name @ 0x100d75c
// > EC_GROUP_set_generator @ 0x1010b98
// > EC_GROUP_set_generator @ 0x1010bb4
// > ossl_ecdsa_sign_setup @ 0x1012c0c
// > ossl_ecdsa_sign_sig @ 0x101337c
// > ec_GFp_simple_point_set_to_infinity @ 0x1017a7c
// > ec_GFp_simple_dbl @ 0x10181f4
// > ec_GFp_simple_add @ 0x1018dd0
// > ec_GFp_simple_points_make_affine @ 0x1019464
// > ec_GFp_simple_points_make_affine @ 0x1019680
// > OBJ_obj2txt @ 0x1040968
// > sub_1054A18 @ 0x1054aec
// > BN_CTX_get @ 0x1093cb4
// > BN_div @ 0x1093fd4
// > sub_10945E0 @ 0x1094638
// > sub_10945E0 @ 0x1094770
// > sub_10945E0 @ 0x1094860
// > sub_10945E0 @ 0x10948f8
// > BN_exp @ 0x1094afc
// > BN_mod_exp_mont_consttime @ 0x1094d90
// > BN_mod_exp_mont_consttime @ 0x1094df0
// > BN_mod_exp_mont @ 0x10953ac
// > BN_mod_exp_mont @ 0x1095458
// > BN_mod_exp_mont @ 0x10954ac
// > BN_mod_exp_mont_word @ 0x1095990
// > BN_mod_exp_mont_word @ 0x1095a00
// > BN_mod_exp_mont_word @ 0x1095a54
// > BN_mod_exp_mont_word @ 0x1095af4
// > BN_mod_exp_mont_word @ 0x1095bd0
// > BN_mod_exp_mont_word @ 0x1095c64
// > BN_mod_exp_simple @ 0x1095e14
// > BN_mod_exp_simple @ 0x1095ea0
// > BN_mod_exp_simple @ 0x1095f40
// > BN_mod_exp_simple @ 0x1096034
// > BN_mod_exp2_mont @ 0x1096230
// > BN_mod_exp2_mont @ 0x10964cc
// > int_bn_mod_inverse @ 0x1096af4
// > int_bn_mod_inverse @ 0x1096b00
// > int_bn_mod_inverse @ 0x1096d14
// > int_bn_mod_inverse @ 0x1096d20
// > int_bn_mod_inverse @ 0x1096e94
// > int_bn_mod_inverse @ 0x1096ea0
// > int_bn_mod_inverse @ 0x1096edc
// > int_bn_mod_inverse @ 0x1096ee8
// > int_bn_mod_inverse @ 0x1096f18
// > int_bn_mod_inverse @ 0x1096fd8
// > int_bn_mod_inverse @ 0x1097064
// > BN_rand @ 0x1098094
// > BN_pseudo_rand @ 0x10982a4
// > BN_bntest_rand @ 0x1098488
// > BN_rand_range @ 0x1098730
// > BN_pseudo_rand_range @ 0x10988ec
// > BN_RECP_CTX_set @ 0x1098c54
// > BN_div_recp @ 0x1098e40
// > BN_mod_sqrt @ 0x10990a4
// > BN_mod_sqrt @ 0x10990d0
// > BN_mod_sqrt @ 0x1099128
// > BN_mod_sqrt @ 0x1099264
// > BN_mod_sqrt @ 0x10994ec
// > BN_mod_sqrt @ 0x10995a8
// > BN_mod_sqrt @ 0x1099704
// > DH_check_pub_key @ 0x10a7d2c
// > dsa_builtin_paramgen @ 0x10a8e38
// > dsa_builtin_paramgen @ 0x10a8f20
// > dsa_builtin_paramgen2 @ 0x10a98bc
// > dsa_builtin_paramgen2 @ 0x10a9b04
// > ec_GF2m_simple_point_set_to_infinity @ 0x10b179c
// > ec_GF2m_simple_make_affine @ 0x10b1e04
// > BN_GF2m_mod_arr @ 0x10f2c84
// > BN_GF2m_mod_exp_arr @ 0x10f3b60
// > BN_GF2m_mod_sqrt_arr @ 0x10f3c60
// > BN_GF2m_mod_solve_quad_arr @ 0x10f3d4c
// > BN_GF2m_mod_solve_quad_arr @ 0x10f3dec
// > BN_GF2m_mod_solve_quad_arr @ 0x10f3f2c
// > BN_GF2m_arr2poly @ 0x10f4bf0
// > DH_generate_parameters_ex @ 0x10fa588
// > DH_generate_parameters_ex @ 0x10fa598
// > DH_generate_parameters_ex @ 0x10fa5dc
// > DH_generate_parameters_ex @ 0x10fa614
// > DH_generate_parameters_ex @ 0x10fa624
// > DH_generate_parameters_ex @ 0x10fa6bc
// > DH_generate_parameters_ex @ 0x10fa6cc
// > sub_10FAC48 @ 0x10fadbc
// > sub_10FAC48 @ 0x10fb1e8
// > sub_10FAC48 @ 0x10fb220
// > sub_10FAC48 @ 0x10fb22c
// > sub_10FAC48 @ 0x10fb278
// > ??> @ 0x5e1c8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:50 +0000
//
unsigned __int64 *__fastcall BN_set_word(__int64 a1, __int64 a2)
{
_QWORD *v4; // x2
unsigned __int64 *result; // x0
if ( *(int *)(a1 + 12) > 0 || (result = bn_expand2((unsigned __int64 *)a1, 1)) != nullptr )
{
v4 = *(_QWORD **)a1;
*(_DWORD *)(a1 + 16) = 0;
*v4 = a2;
*(_DWORD *)(a1 + 8) = a2 != 0;
return (_QWORD *)(dword_0 + 1);
}
return result;
}