diff --git a/rpcs3/Crypto/unedat.cpp b/rpcs3/Crypto/unedat.cpp index f16525c7c..ea8c9bab5 100644 --- a/rpcs3/Crypto/unedat.cpp +++ b/rpcs3/Crypto/unedat.cpp @@ -156,6 +156,12 @@ int decrypt_data(rFile *in, rFile *out, EDAT_SDAT_HEADER *edat, NPD_HEADER *npd, int length = 0; int compression_end = 0; + if ((edat->flags & EDAT_FLAG_0x3C) != 0 || (edat->flags & EDAT_FLAG_0x3D) != 0) + { + ConLog.Error("EDAT: Flag 0x3C/0x3D EDAT files are unsupported yet"); + return -1; + } + if ((edat->flags & EDAT_COMPRESSED_FLAG) != 0) { unsigned char metadata[0x20]; diff --git a/rpcs3/Crypto/unedat.h b/rpcs3/Crypto/unedat.h index 01ce706f3..4d6094979 100644 --- a/rpcs3/Crypto/unedat.h +++ b/rpcs3/Crypto/unedat.h @@ -9,6 +9,8 @@ #define EDAT_FLAG_0x10 0x00000010 #define EDAT_FLAG_0x20 0x00000020 #define EDAT_DEBUG_DATA_FLAG 0x80000000 +#define EDAT_FLAG_0x3C 0x0000003C +#define EDAT_FLAG_0x3D 0x0000003D typedef struct { @@ -31,4 +33,4 @@ typedef struct unsigned long long file_size; } EDAT_SDAT_HEADER; -int DecryptEDAT(const std::string& input_file_name, const std::string& output_file_name, int mode, const std::string& rap_file_name, unsigned char *custom_klic, bool verbose); \ No newline at end of file +int DecryptEDAT(const std::string& input_file_name, const std::string& output_file_name, int mode, const std::string& rap_file_name, unsigned char *custom_klic, bool verbose);