2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-12-16 15:47:47 +00:00

chore: dump fastfile data when xenon t6 fastfile is detected

This commit is contained in:
Jan Laupetin
2025-08-19 13:22:39 +02:00
parent facb95f1cb
commit 802b0f244a
19 changed files with 226 additions and 152 deletions

View File

@@ -44,14 +44,14 @@ namespace
ZoneHeader CreateHeaderForParams(const bool isSecure, const bool isOfficial, const bool isEncrypted)
{
ZoneHeader header{};
header.m_version = ZoneConstants::ZONE_VERSION;
header.m_version = ZoneConstants::ZONE_VERSION_PC;
if (isSecure)
{
if (isOfficial)
memcpy(header.m_magic, ZoneConstants::MAGIC_SIGNED_TREYARCH, sizeof(ZoneHeader::m_magic));
memcpy(header.m_magic, ZoneConstants::MAGIC_SIGNED_PC_TREYARCH, sizeof(ZoneHeader::m_magic));
else
memcpy(header.m_magic, ZoneConstants::MAGIC_SIGNED_OAT, sizeof(ZoneHeader::m_magic));
memcpy(header.m_magic, ZoneConstants::MAGIC_SIGNED_PC_OAT, sizeof(ZoneHeader::m_magic));
}
else
{
@@ -82,7 +82,7 @@ namespace
{
// If zone is encrypted, the decryption is applied before the decompression. T6 Zones always use Salsa20.
auto chunkProcessorSalsa20 = std::make_unique<XChunkProcessorSalsa20Encryption>(
ZoneConstants::STREAM_COUNT, zone.m_name, ZoneConstants::SALSA20_KEY_TREYARCH, sizeof(ZoneConstants::SALSA20_KEY_TREYARCH));
ZoneConstants::STREAM_COUNT, zone.m_name, ZoneConstants::SALSA20_KEY_TREYARCH_PC, sizeof(ZoneConstants::SALSA20_KEY_TREYARCH_PC));
// If there is encryption, the signed data of the zone is the final hash blocks provided by the Salsa20 IV adaption algorithm
if (dataToSignProviderPtr)