//
// d2i_DHxparams from 0x7dfe48 to 0x7dff2c (228 bytes)
//
// 5 xrefs:
// > sub_7DE1CC @ 0x7de338
// > sub_7DE374 @ 0x7de3c8
// > sub_7DE578 @ 0x7de710
// > PEM_read_bio_DHparams @ 0x823ae4
// > ??> @ 0x6090c
//
// 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
//
_DWORD *__fastcall d2i_DHxparams(_DWORD *a1, unsigned __int8 **a2, int a3)
{
_DWORD *v6; // r4
_DWORD *v7; // r5
int *v8; // r2
int v9; // r0
int v10; // r1
int v11; // r3
int v12; // r3
_DWORD *v13; // r1
int v14; // r0
int v15; // r2
v6 = (_DWORD *)DH_new();
if ( !v6 )
return nullptr;
v7 = (_DWORD *)d2i_int_dhx(nullptr, a2, a3);
if ( v7 )
{
if ( a1 )
{
DH_free(*a1);
*a1 = v6;
}
v8 = (int *)v7[4];
v9 = v7[1];
v10 = v7[2];
v11 = v7[3];
v6[2] = *v7;
v6[9] = v9;
v6[3] = v10;
v6[10] = v11;
if ( v8 )
{
v12 = *v8;
v13 = (_DWORD *)v8[1];
v14 = *(_DWORD *)(*v8 + 8);
v15 = *(_DWORD *)*v8;
v6[11] = v14;
v6[13] = v13;
v6[12] = v15;
*(_DWORD *)(v12 + 8) = 0;
ASN1_BIT_STRING_free(v12);
CRYPTO_free(v7[4], "crypto/dh/dh_asn1.c", 110);
v7[4] = 0;
}
CRYPTO_free(v7, "crypto/dh/dh_asn1.c", 114);
return v6;
}
else
{
DH_free(v6);
return nullptr;
}
}