//
// DES_set_key_checked from 0xd855e4 to 0xd85644 (96 bytes)
//
// 2 xrefs:
// > DES_set_key @ 0xd8567c
// > ??> @ 0x3db30
//
// 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 DES_set_key_checked(void *a1, _DWORD *a2)
{
_BOOL4 is_weak_key; // w19
if ( DES_check_key_parity((unsigned __int8 *)a1) )
{
is_weak_key = DES_is_weak_key(a1);
if ( is_weak_key )
return -2;
else
DES_set_key_unchecked((unsigned __int64)a1, a2);
}
else
{
return -1;
}
return is_weak_key;
}