//
// DH_set_method from 0xd87cd4 to 0xd87d28 (84 bytes)
//
// 1 xrefs:
// > ??> @ 0x85440
//
// 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 DH_set_method(__int64 a1, __int64 a2)
{
void (*v4)(void); // x1
void (__fastcall *v5)(__int64); // x1
v4 = *(void (**)(void))(*(_QWORD *)(a1 + 120) + 40LL);
if ( v4 )
v4();
ENGINE_finish(*(_QWORD *)(a1 + 128));
v5 = *(void (__fastcall **)(__int64))(a2 + 32);
*(_QWORD *)(a1 + 128) = 0;
*(_QWORD *)(a1 + 120) = a2;
if ( v5 )
v5(a1);
return 1;
}