//
// DH_get_1024_160 from 0x7e09e8 to 0x7e0a58 (112 bytes)
//
// 3 xrefs:
// > ssl_get_auto_dh @ 0x7b4bac
// > sub_87FC88 @ 0x87fdc0
// > ??> @ 0x5d9fc
//
// 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 *DH_get_1024_160()
{
_DWORD *v0; // r4
int v1; // r0
int v2; // r3
bool v3; // zf
_DWORD *result; // r0
v0 = DH_new();
if ( !v0 )
return nullptr;
v0[2] = BN_dup((int)&bignum_dh1024_160_p);
v0[3] = BN_dup((int)&bignum_dh1024_160_g);
v1 = BN_dup((int)&bignum_dh1024_160_q);
v2 = v0[2];
v3 = v2 == 0;
if ( v2 )
v3 = v1 == 0;
v0[9] = v1;
result = v0;
if ( v3 || !v0[3] )
{
DH_free((int)v0);
return nullptr;
}
return result;
}