Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

dec: Add support for XOR-cipher Valkyria ODN archives #195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

dec: Add support for XOR-cipher Valkyria ODN archives #195

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 26, 2021

This variant is used for all script archives

Having access to the plain-text scripts could allow for fan translations

This variant is used for all script archives
while (true)
{
auto entry = std::make_unique<dec::PlainArchiveEntry>();
entry->path = input_stream.read(8).str();
entry->offset = hex_to_int(input_stream.read(8));
if (entry->path.str().substr(0, 4) == "END_")
if (entry->path == "END_ffff" || entry->path == "ffffffff")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are apparently several variants for the terminator. I added the variation I saw after decryption of the archive.

@@ -113,6 +113,7 @@ static void read_meta_v1(
dec::ArchiveMeta *meta,
io::BaseByteStream &input_stream)
{
input_stream.seek(0);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed a small issue where the decoder was skipping over the first file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants