//
// bn_probable_prime_dh_retry from 0x10f5234 to 0x10f52d4 (160 bytes)
//
// 1 xrefs:
// > ??> @ 0xaf888
//
// 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:18:09 +0000
//
__int64 __fastcall bn_probable_prime_dh_retry(__int64 a1, int a2)
{
unsigned __int16 *v4; // x19
unsigned __int64 v5; // x1
unsigned __int64 v6; // x0
LABEL_1:
if ( (unsigned int)BN_rand(a1, a2, 0, 1) )
{
v4 = (unsigned __int16 *)&unk_1227D42;
while ( 1 )
{
v5 = *v4++;
v6 = BN_mod_word(a1, v5);
if ( v6 == -1 )
break;
if ( v6 <= 1 )
goto LABEL_1;
if ( v4 == (unsigned __int16 *)&unk_1228D40 )
return 1;
}
}
return 0;
}