//
// d2i_ECParameters from 0x100ced0 to 0x100d00c (316 bytes)
//
// 3 xrefs:
// > sub_100970C @ 0x10097d4
// > sub_100A588 @ 0x100a5a0
// > ??> @ 0x75bf8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:00 +0000
//
__int64 __fastcall d2i_ECParameters(__int64 *a1, char **a2, __int64 a3)
{
__int64 v6; // x19
__int64 result; // x0
__int64 v8; // x0
if ( !a2 || !*a2 )
{
ERR_put_error(16, 144, 67, "crypto/ec/ec_asn1.c", 1080);
return 0;
}
if ( a1 )
{
v6 = *a1;
if ( *a1 )
{
if ( d2i_ECPKParameters((__int64 *)(v6 + 24), a2, a3) )
{
LABEL_6:
*a1 = v6;
return v6;
}
ERR_put_error(16, 144, 16, "crypto/ec/ec_asn1.c", 1093);
LABEL_13:
if ( *a1 == v6 )
return 0;
LABEL_14:
EC_KEY_free(v6);
return 0;
}
}
v8 = EC_KEY_new();
v6 = v8;
if ( !v8 )
{
ERR_put_error(16, 144, 65, "crypto/ec/ec_asn1.c", 1086);
return 0;
}
if ( !d2i_ECPKParameters((__int64 *)(v8 + 24), a2, a3) )
{
ERR_put_error(16, 144, 16, "crypto/ec/ec_asn1.c", 1093);
if ( !a1 )
goto LABEL_14;
goto LABEL_13;
}
result = v6;
if ( a1 )
goto LABEL_6;
return result;
}