//
// DES_set_key_checked from 0x1003944 to 0x10039a4 (96 bytes)
//
// 2 xrefs:
// > DES_set_key @ 0x10039dc
// > ??> @ 0x59278
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:15:55 +0000
//
__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;
}