//
// bn_probable_prime_dh_retry from 0x8cad84 to 0x8cadf8 (116 bytes)
//
// 1 xrefs:
// > ??> @ 0x6ba9c
//
// 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_probable_prime_dh_retry(int *a1, int a2)
{
unsigned __int16 *v4; // r4
unsigned int v5; // t1
unsigned int v6; // r0
LABEL_1:
if ( BN_rand(a1, a2, 0, 1) )
{
v4 = (unsigned __int16 *)&unk_A23158;
while ( 1 )
{
v5 = v4[1];
++v4;
v6 = BN_mod_word(a1, v5);
if ( v6 == -1 )
break;
if ( v6 <= 1 )
goto LABEL_1;
if ( v4 == (unsigned __int16 *)&unk_A24156 )
return 1;
}
}
return 0;
}