//
// BN_mul_word from 0xd7f7bc to 0xd7f840 (132 bytes)
//
// 9 xrefs:
// > a2d_ASN1_OBJECT @ 0xd638ac
// > BN_dec2bn @ 0xd7e178
// > ec_GFp_simple_group_check_discriminant @ 0xd996cc
// > BN_mod_exp_mont_word @ 0xe1781c
// > BN_mod_exp_mont_word @ 0xe17860
// > BN_mod_exp_mont_word @ 0xe17930
// > int_bn_mod_inverse @ 0xe18d4c
// > bn_probable_prime_dh_coprime @ 0xe773c0
// > ??> @ 0x7f740
//
// 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
//
unsigned __int64 *__fastcall BN_mul_word(unsigned __int64 *a1, __int64 a2)
{
__int64 v2; // x2
__int64 v4; // x20
unsigned __int64 *result; // x0
int v6; // w1
unsigned __int64 v7; // x2
v2 = *((unsigned int *)a1 + 2);
if ( !(_DWORD)v2 )
return (_QWORD *)(dword_0 + 1);
if ( !a2 )
{
BN_set_word((__int64)a1, 0);
return (_QWORD *)(dword_0 + 1);
}
v4 = bn_mul_words(*a1, *a1, v2, a2);
if ( !v4 )
return (_QWORD *)(dword_0 + 1);
result = bn_wexpand(a1, *((_DWORD *)a1 + 2) + 1);
if ( result )
{
v6 = *((_DWORD *)a1 + 2);
v7 = *a1;
*((_DWORD *)a1 + 2) = v6 + 1;
*(_QWORD *)(v7 + 8LL * v6) = v4;
return (_QWORD *)(dword_0 + 1);
}
return result;
}