//
// sub_88AED0 from 0x88aed0 to 0x88afa4 (212 bytes)
//
// 1 xrefs:
// > ??> @ 0xa3a304
//
// 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 sub_88AED0(int a1, int a2, int *a3, int a4, int a5)
{
int v7; // r4
int v8; // r9
unsigned int v9; // r6
int v11; // r0
int v12; // r0
int v13; // r0
int v14; // r3
int v16; // [sp+Ch] [bp-8h] BYREF
v7 = *(_DWORD *)(*(_DWORD *)(a1 + 8) + 20);
v8 = *(_DWORD *)(a1 + 20);
if ( a2 )
{
v9 = *a3;
if ( v9 < ECDSA_size(*(_DWORD *)(*(_DWORD *)(a1 + 8) + 20)) )
{
ERR_put_error(16, 218, 100, (int)"crypto/ec/ec_pmeth.c", 110);
return 0;
}
else
{
v11 = *(_DWORD *)(v8 + 4);
if ( v11 )
v12 = EVP_MD_type(v11);
else
v12 = 64;
v13 = ECDSA_sign(v12, a4, a5, a2, (int)&v16, v7);
if ( v13 <= 0 )
{
v14 = v13;
}
else
{
v14 = v16;
*a3 = v16;
}
if ( v13 > 0 )
return 1;
return v14;
}
}
else
{
*a3 = ECDSA_size(*(_DWORD *)(*(_DWORD *)(a1 + 8) + 20));
return 1;
}
}