//
// BN_GF2m_mod_exp from 0xadf4a8 to 0xadf57c (212 bytes)
//
// 1 xrefs:
// > ??> @ 0x854bc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:09:33 +0000
//
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;
}