//
// d2i_ECParameters from 0x9fc608 to 0x9fc754 (332 bytes)
//
// 3 xrefs:
// > sub_9F8864 @ 0x9f8920
// > sub_9F974C @ 0x9f975c
// > ??> @ 0x7ab5c
//
// 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:35 +0000
//
int __fastcall d2i_ECParameters(int *a1, unsigned __int8 **a2, int a3)
{
int v6; // r4
int v8; // r0
if ( a2 && *a2 )
{
if ( a1 )
{
v6 = *a1;
if ( *a1 )
{
if ( d2i_ECPKParameters((int *)(v6 + 12), a2, a3) )
{
LABEL_6:
*a1 = v6;
return v6;
}
ERR_put_error(16, 144, 16, "crypto/ec/ec_asn1.c", 1093);
goto LABEL_13;
}
}
v8 = EC_KEY_new();
v6 = v8;
if ( v8 )
{
if ( !d2i_ECPKParameters((int *)(v8 + 12), a2, a3) )
{
ERR_put_error(16, 144, 16, "crypto/ec/ec_asn1.c", 1093);
if ( !a1 )
{
LABEL_15:
EC_KEY_free(v6);
return 0;
}
LABEL_13:
if ( *a1 == v6 )
return 0;
goto LABEL_15;
}
if ( a1 )
goto LABEL_6;
return v6;
}
else
{
ERR_put_error(16, 144, 65, "crypto/ec/ec_asn1.c", 1086);
return 0;
}
}
else
{
ERR_put_error(16, 144, 67, "crypto/ec/ec_asn1.c", 1080);
return 0;
}
}