Merge pull request #369 from raven02/patch-8

Log error when flag 0x3c/0x3d EDAT files detected
This commit is contained in:
B1ackDaemon 2014-06-25 22:07:41 +03:00
commit 4cbbbec8b3
2 changed files with 9 additions and 1 deletions

View file

@ -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];

View file

@ -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);
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);