//
// BN_GF2m_mod_exp from 0x8ca4a8 to 0x8ca57c (212 bytes)
//
// 1 xrefs:
// > ??> @ 0x6ba3c
//
// 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_exp(int **a1, int **a2, _DWORD *a3, int **a4, int ***a5)
{
int v9; // r5
int *v10; // r10
int v11; // r4
int v12; // r0
_BOOL4 v13; // r12
v9 = BN_num_bits(a4) + 1;
v10 = (int *)CRYPTO_malloc((void *)(4 * v9), (int)"crypto/bn/bn_gf2m.c", 964);
if ( v10 )
{
v12 = BN_GF2m_poly2arr(a4, (int)v10, v9);
v13 = v12 == 0;
if ( v12 > v9 )
v13 = 1;
v11 = v12;
if ( v13 )
ERR_put_error(3, 132, 106, (int)"crypto/bn/bn_gf2m.c", 968);
else
v11 = BN_GF2m_mod_exp_arr(a1, a2, a3, v10, a5);
}
else
{
v11 = 0;
}
CRYPTO_free(v10, (int)"crypto/bn/bn_gf2m.c", 974);
return v11;
}