//
// BN_GF2m_mod_sqrt_arr from 0x8c9908 to 0x8c99a4 (156 bytes)
//
// 3 xrefs:
// > ec_GF2m_simple_set_compressed_coordinates @ 0x888eec
// > BN_GF2m_mod_sqrt @ 0x8ca60c
// > ??> @ 0x6a83c
//
// 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_GF2m_mod_sqrt_arr(int **a1, int **a2, int *a3, int ***a4)
{
int *v8; // r0
int *v9; // r8
int v10; // r4
if ( *a3 )
{
BN_CTX_start((int)a4);
v8 = (int *)BN_CTX_get(a4);
v9 = v8;
if ( v8 && BN_set_bit(v8, *a3 - 1) )
v10 = BN_GF2m_mod_exp_arr(a1, a2, v9, a3, a4);
else
v10 = 0;
BN_CTX_end(a4);
return v10;
}
else
{
BN_set_word(a1, 0);
return 1;
}
}