//
// ec_precompute_mont_data from 0x7eb8e0 to 0x7eb95c (124 bytes)
//
// 2 xrefs:
// > EC_GROUP_set_generator @ 0x7eba2c
// > ??> @ 0x61b6c
//
// 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 ec_precompute_mont_data(int a1)
{
int v2; // r5
_DWORD *v3; // r0
int v4; // r6
v2 = BN_CTX_new();
BN_MONT_CTX_free(*(_BYTE **)(a1 + 88));
*(_DWORD *)(a1 + 88) = 0;
if ( v2 && (v3 = BN_MONT_CTX_new(), (*(_DWORD *)(a1 + 88) = v3) != 0) )
{
if ( BN_MONT_CTX_set((int)v3, *(int ***)(a1 + 8), v2) )
{
v4 = 1;
}
else
{
BN_MONT_CTX_free(*(_BYTE **)(a1 + 88));
v4 = 0;
*(_DWORD *)(a1 + 88) = 0;
}
}
else
{
v4 = 0;
}
BN_CTX_free(v2);
return v4;
}