//
// ECDSA_size from 0x7e7f04 to 0x7e7f8c (136 bytes)
//
// 4 xrefs:
// > sub_7E484C @ 0x7e4850
// > sub_88AED0 @ 0x88aefc
// > sub_88AED0 @ 0x88af8c
// > ??> @ 0x6118c
//
// 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 ECDSA_size(int a1)
{
int v1; // r0
int v2; // r0
int v4; // r3
int v5; // r0
char v6; // [sp+4h] [bp-1Ch] BYREF
size_t v7[6]; // [sp+8h] [bp-18h] BYREF
if ( !a1 )
return 0;
v1 = EC_KEY_get0_group(a1);
if ( !v1 )
return 0;
v2 = EC_GROUP_order_bits(v1);
if ( !v2 )
return 0;
v4 = v2 + 7;
if ( v2 + 7 < 0 )
v4 = v2 + 14;
v7[0] = v4 >> 3;
v7[2] = (size_t)&v6;
v7[1] = 2;
v6 = -1;
v5 = i2d_ASN1_INTEGER(v7, nullptr);
return ASN1_object_size(1, 2 * v5, 16);
}