//
// DES_set_key_checked from 0x7ddb8c to 0x7ddbd8 (76 bytes)
//
// 2 xrefs:
// > DES_set_key @ 0x7ddc00
// > ??> @ 0x6085c
//
// 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 DES_set_key_checked(unsigned __int8 *a1, int a2)
{
_BOOL4 is_weak_key; // r5
if ( !DES_check_key_parity(a1) )
return -1;
is_weak_key = DES_is_weak_key(a1);
if ( is_weak_key )
return -2;
DES_set_key_unchecked(a1, a2);
return is_weak_key;
}