//
// DH_set0_key from 0x7e0954 to 0x7e09b4 (96 bytes)
//
// 4 xrefs:
// > tls_process_key_exchange @ 0x7a3e30
// > tls_process_client_key_exchange @ 0x7ab8f0
// > DSA_dup_DH @ 0x7e22c0
// > ??> @ 0x5d2fc
//
// 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
//
int __fastcall DH_set0_key(int a1, int a2, int a3)
{
int v4; // r0
v4 = *(_DWORD *)(a1 + 20);
if ( !v4 )
{
if ( !a2 )
return 0;
goto LABEL_3;
}
if ( a2 )
{
LABEL_3:
BN_free(v4);
*(_DWORD *)(a1 + 20) = a2;
}
if ( a3 )
{
BN_free(*(_DWORD *)(a1 + 24));
*(_DWORD *)(a1 + 24) = a3;
}
return 1;
}