//
// ec_GFp_simple_group_get_curve from 0xa07a98 to 0xa07be4 (332 bytes)
//
// 4 xrefs:
// > ??> @ 0x7b8ac
// > ??> @ 0xd16d98
// > ??> @ 0xd16e5c
// > ??> @ 0xd16f20
//
// 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:07:41 +0000
//
bool __fastcall ec_GFp_simple_group_get_curve(int a1, int a2, int a3, int a4, int a5)
{
int *v5; // r5
int v8; // r4
int v9; // r7
int v10; // r9
_BOOL4 v11; // r4
int v13; // r0
v5 = (int *)a1;
if ( a2 )
{
a1 = BN_copy(a2, *(_DWORD *)(a1 + 36));
if ( !a1 )
return 0;
}
v8 = a3;
if ( a3 )
v8 = 1;
v9 = a4;
if ( a4 )
v9 = 1;
if ( !(v8 | v9) )
goto LABEL_19;
if ( !*(_DWORD *)(*v5 + 152) )
{
if ( v8 && !BN_copy(a3, v5[16]) )
{
v10 = 0;
v11 = 0;
goto LABEL_18;
}
if ( v9 )
{
v10 = 0;
v11 = BN_copy(a4, v5[17]) != 0;
goto LABEL_18;
}
LABEL_19:
v10 = 0;
v11 = 1;
LABEL_18:
BN_CTX_free(v10);
return v11;
}
if ( a5 )
{
v10 = 0;
LABEL_12:
if ( !v8 || (*(int (__fastcall **)(int *, int, int, int))(*v5 + 152))(v5, a3, v5[16], a5) )
{
if ( v9 )
v11 = (*(int (__fastcall **)(int *, int, int, int))(*v5 + 152))(v5, a4, v5[17], a5) != 0;
else
v11 = 1;
}
else
{
v11 = 0;
}
goto LABEL_18;
}
v13 = BN_CTX_new(a1);
a5 = v13;
if ( v13 )
{
v10 = v13;
goto LABEL_12;
}
return 0;
}