//
// d2i_ECPKParameters from 0xd8e4e8 to 0xd8e5b4 (204 bytes)
//
// 6 xrefs:
// > d2i_ECParameters @ 0xd8eba8
// > d2i_ECParameters @ 0xd8ebe0
// > ??> @ 0x35178
// > PEM_read_bio_ECPKParameters @ 0xdc68b0
// > PEM_read_ECPKParameters @ 0xdc68dc
// > ??> @ 0x12299a0
//
// 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
//
__int64 __fastcall d2i_ECPKParameters(__int64 *a1, char **a2, __int64 a3)
{
int *v5; // x0
__int64 v6; // x21
__int64 v7; // x19
char *v9; // [xsp+38h] [xbp+38h] BYREF
v9 = *a2;
v5 = (int *)d2i_ECPKPARAMETERS(nullptr, &v9, a3);
v6 = (__int64)v5;
if ( v5 )
{
v7 = EC_GROUP_new_from_ecpkparameters(v5);
if ( v7 )
{
if ( a1 )
{
EC_GROUP_clear_free(*a1);
*a1 = v7;
}
ECPKPARAMETERS_free(v6);
*a2 = v9;
return v7;
}
else
{
ERR_put_error(16, 145, 127, "crypto/ec/ec_asn1.c", 881);
ECPKPARAMETERS_free(v6);
return 0;
}
}
else
{
ERR_put_error(16, 145, 117, "crypto/ec/ec_asn1.c", 875);
ECPKPARAMETERS_free(0);
return 0;
}
}