diff --git a/libs/fastfile/WiiU/fastfile_cod10_wiiu.cpp b/libs/fastfile/WiiU/fastfile_cod10_wiiu.cpp index 9f32e1b..f6b34ca 100644 --- a/libs/fastfile/WiiU/fastfile_cod10_wiiu.cpp +++ b/libs/fastfile/WiiU/fastfile_cod10_wiiu.cpp @@ -115,7 +115,7 @@ bool FastFile_COD10_WiiU::Load(const QByteArray aData) { if (GetPlatform() == "360") { //decompressedData = Compressor::cod9_decryptFastFile(aData); } else if (GetPlatform() == "PC") { - decompressedData = Encryption::decryptFastFile_BO2(aData); + //decompressedData = Encryption::decryptFastFile_BO2(aData); } // For COD9, write out the complete decompressed zone for testing. diff --git a/libs/fastfile/WiiU/fastfile_cod9_wiiu.cpp b/libs/fastfile/WiiU/fastfile_cod9_wiiu.cpp index 9cb48ea..de6b99c 100644 --- a/libs/fastfile/WiiU/fastfile_cod9_wiiu.cpp +++ b/libs/fastfile/WiiU/fastfile_cod9_wiiu.cpp @@ -115,7 +115,7 @@ bool FastFile_COD9_WiiU::Load(const QByteArray aData) { if (GetPlatform() == "360") { //decompressedData = Compressor::cod9_decryptFastFile(aData); } else if (GetPlatform() == "PC") { - decompressedData = Encryption::decryptFastFile_BO2(aData); + //decompressedData = Encryption::decryptFastFile_BO2(aData); } // For COD9, write out the complete decompressed zone for testing. diff --git a/libs/fastfile/fastfile.cpp b/libs/fastfile/fastfile.cpp index 4bc6d43..685efad 100644 --- a/libs/fastfile/fastfile.cpp +++ b/libs/fastfile/fastfile.cpp @@ -267,7 +267,7 @@ FastFile* FastFile::Open(const QString &aFilePath) { const QString fastFileStem = aFilePath.section("/", -1, -1); LogManager::instance().addEntry(QString("Stem: %1").arg(fastFileStem)); - FastFile* fastFile = FastFileFactory::Create(data); + FastFile* fastFile = FastFileFactory::Create(data, fastFileStem); fastFile->SetStem(fastFileStem); return fastFile; diff --git a/libs/fastfile/fastfile_factory.h b/libs/fastfile/fastfile_factory.h index d185a4d..162be37 100644 --- a/libs/fastfile/fastfile_factory.h +++ b/libs/fastfile/fastfile_factory.h @@ -7,6 +7,7 @@ #include "360/fastfile_cod5_360.h" #include "360/fastfile_cod6_360.h" #include "360/fastfile_cod7_360.h" +#include "360/fastfile_cod7_5_360.h" #include "360/fastfile_cod8_360.h" #include "360/fastfile_cod9_360.h" #include "360/fastfile_cod10_360.h" @@ -60,17 +61,18 @@ enum FastFile_Platform { }; enum FastFile_Game { - GAME_NONE = 0x00, - GAME_COD2 = 0x01, - GAME_COD4 = 0x02, - GAME_COD5 = 0x03, - GAME_COD6 = 0x04, - GAME_COD7 = 0x05, - GAME_COD8 = 0x06, - GAME_COD9 = 0x07, - GAME_COD10 = 0x08, - GAME_COD11 = 0x09, - GAME_COD12 = 0x010 + GAME_NONE = 0x00, + GAME_COD2 = 0x01, + GAME_COD4 = 0x02, + GAME_COD5 = 0x03, + GAME_COD6 = 0x04, + GAME_COD7 = 0x05, + GAME_COD7_5 = 0x06, + GAME_COD8 = 0x07, + GAME_COD9 = 0x08, + GAME_COD10 = 0x09, + GAME_COD11 = 0x10, + GAME_COD12 = 0x11 }; class FastFileFactory { @@ -185,83 +187,86 @@ public: if (aPlatform == PLATFORM_360) { if (aGame == GAME_COD2) { - resultFF = new FastFile_COD2_360(aData); + resultFF = new FastFile_COD2_360(); } else if (aGame == GAME_COD4) { - resultFF = new FastFile_COD4_360(aData); + resultFF = new FastFile_COD4_360(); } else if (aGame == GAME_COD5) { - resultFF = new FastFile_COD5_360(aData); + resultFF = new FastFile_COD5_360(); } else if (aGame == GAME_COD6) { - resultFF = new FastFile_COD6_360(aData); + resultFF = new FastFile_COD6_360(); } else if (aGame == GAME_COD7) { - resultFF = new FastFile_COD7_360(aData); + resultFF = new FastFile_COD7_360(); + } else if (aGame == GAME_COD7_5) { + resultFF = new FastFile_COD7_5_360(); } else if (aGame == GAME_COD8) { - resultFF = new FastFile_COD8_360(aData); + resultFF = new FastFile_COD8_360(); } else if (aGame == GAME_COD9) { - resultFF = new FastFile_COD9_360(aData); + resultFF = new FastFile_COD9_360(); } else if (aGame == GAME_COD10) { - resultFF = new FastFile_COD10_360(aData); + resultFF = new FastFile_COD10_360(); } else if (aGame == GAME_COD11) { - resultFF = new FastFile_COD11_360(aData); + resultFF = new FastFile_COD11_360(); } else if (aGame == GAME_COD12) { - resultFF = new FastFile_COD12_360(aData); + resultFF = new FastFile_COD12_360(); } } else if (aPlatform == PLATFORM_PC) { if (aGame == GAME_COD4) { - resultFF = new FastFile_COD4_PC(aData); + resultFF = new FastFile_COD4_PC(); } else if (aGame == GAME_COD5) { - resultFF = new FastFile_COD5_PC(aData); + resultFF = new FastFile_COD5_PC(); } else if (aGame == GAME_COD6) { - resultFF = new FastFile_COD6_PC(aData); + resultFF = new FastFile_COD6_PC(); } else if (aGame == GAME_COD7) { - resultFF = new FastFile_COD7_PC(aData); + resultFF = new FastFile_COD7_PC(); } else if (aGame == GAME_COD8) { - resultFF = new FastFile_COD8_PC(aData); + resultFF = new FastFile_COD8_PC(); } else if (aGame == GAME_COD9) { - resultFF = new FastFile_COD9_PC(aData); + resultFF = new FastFile_COD9_PC(); } else if (aGame == GAME_COD10) { - resultFF = new FastFile_COD10_PC(aData); + resultFF = new FastFile_COD10_PC(); } else if (aGame == GAME_COD11) { - resultFF = new FastFile_COD11_PC(aData); + resultFF = new FastFile_COD11_PC(); } else if (aGame == GAME_COD12) { - resultFF = new FastFile_COD12_PC(aData); + resultFF = new FastFile_COD12_PC(); } } else if (aPlatform == PLATFORM_PS3) { if (aGame == GAME_COD4) { - resultFF = new FastFile_COD4_PS3(aData); + resultFF = new FastFile_COD4_PS3(); } else if (aGame == GAME_COD5) { - resultFF = new FastFile_COD5_PS3(aData); + resultFF = new FastFile_COD5_PS3(); } else if (aGame == GAME_COD6) { - resultFF = new FastFile_COD6_PS3(aData); + resultFF = new FastFile_COD6_PS3(); } else if (aGame == GAME_COD7) { - resultFF = new FastFile_COD7_PS3(aData); + resultFF = new FastFile_COD7_PS3(); } else if (aGame == GAME_COD8) { - resultFF = new FastFile_COD8_PS3(aData); + resultFF = new FastFile_COD8_PS3(); } else if (aGame == GAME_COD9) { - resultFF = new FastFile_COD9_PS3(aData); + resultFF = new FastFile_COD9_PS3(); } else if (aGame == GAME_COD10) { - resultFF = new FastFile_COD10_PS3(aData); + resultFF = new FastFile_COD10_PS3(); } else if (aGame == GAME_COD11) { - resultFF = new FastFile_COD11_PS3(aData); + resultFF = new FastFile_COD11_PS3(); } else if (aGame == GAME_COD12) { - resultFF = new FastFile_COD12_PS3(aData); + resultFF = new FastFile_COD12_PS3(); } } else if (aPlatform == PLATFORM_WII) { if (aGame == GAME_COD4) { - resultFF = new FastFile_COD4_Wii(aData); + resultFF = new FastFile_COD4_Wii(); } else if (aGame == GAME_COD7) { - resultFF = new FastFile_COD7_Wii(aData); + resultFF = new FastFile_COD7_Wii(); } else if (aGame == GAME_COD8) { - resultFF = new FastFile_COD8_Wii(aData); + resultFF = new FastFile_COD8_Wii(); } } else if (aPlatform == PLATFORM_WIIU) { if (aGame == GAME_COD9) { - resultFF = new FastFile_COD9_WiiU(aData); + resultFF = new FastFile_COD9_WiiU(); } else if (aGame == GAME_COD10) { - resultFF = new FastFile_COD10_WiiU(aData); + resultFF = new FastFile_COD10_WiiU(); } } if (resultFF) { resultFF->SetStem(aStem); + resultFF->Load(aData); } return resultFF; } @@ -283,7 +288,7 @@ private: static FastFile_Platform pGetPlatform(const QByteArray& aData) { const QStringList sections = pGetDataSections(aData); - if (sections[0] == "0000") { + if (sections[0] == "0000" || sections[0] == "4E58") { return PLATFORM_360; } else if (sections[4] == "0000") { if (sections[5] == "0001" && sections[6] == "78DA") { @@ -292,6 +297,8 @@ private: return PLATFORM_360; } else if (sections[5] == "0183" && sections[6] == "7801") { return PLATFORM_360; + } else if (sections[5] == "01D9" && sections[6] == "0000") { + return PLATFORM_360; } else if (sections[6] == "0101" && sections[7] == "CA3E") { return PLATFORM_360; } else if (sections[6] == "0000" && sections[7] == "0001") { @@ -333,6 +340,8 @@ private: return GAME_COD6; } else if (sections[4] == "D901" || sections[5] == "01DD" || sections[5] == "01D9") { return GAME_COD7; + } else if (sections[0] == "4E58") { + return GAME_COD7_5; } else if (sections[4] == "0100" || sections[5] == "006B" || sections[5] == "0070") { return GAME_COD8; } else if (sections[4] == "9300" || sections[5] == "0092"