-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loads wrong values from a file in diabdat.mpq #13
Comments
glebm
added a commit
to glebm/libmpq
that referenced
this issue
Oct 31, 2021
Previously, libmpq tried to brute-force the decryption key based on know contents, and only for packed files. This caused issues, such as mbroemme#13. Adds a new function, `libmpq__block_open_offset_with_filename`, that uses the filename to obtain the decryption key.
glebm
added a commit
to glebm/libmpq
that referenced
this issue
Nov 1, 2021
Previously, libmpq tried to brute-force the decryption key based on know contents, and only for packed files. This caused issues, such as mbroemme#13. Adds a new function, `libmpq__block_open_offset_with_filename`, that uses the filename to obtain the decryption key.
glebm
added a commit
to glebm/libmpq
that referenced
this issue
Nov 1, 2021
Previously, libmpq tried to brute-force the decryption key based on know contents, and only for packed files. This caused issues, such as mbroemme#13. Adds a new function, `libmpq__block_open_offset_with_filename`, that uses the filename to obtain the decryption key.
glebm
added a commit
to glebm/libmpq
that referenced
this issue
Nov 1, 2021
Previously, libmpq tried to brute-force the decryption key based on know contents, and only for packed files. This caused issues, such as mbroemme#13. Adds a new function, `libmpq__block_open_offset_with_filename`, that uses the filename to obtain the decryption key.
glebm
added a commit
to glebm/libmpq
that referenced
this issue
Nov 1, 2021
Previously, libmpq tried to brute-force the decryption key based on know contents, and only for packed files. This caused issues, such as mbroemme#13. Adds a new function, `libmpq__block_open_offset_with_filename`, that uses the filename to obtain the decryption key.
glebm
added a commit
to glebm/libmpq
that referenced
this issue
Nov 1, 2021
Previously, libmpq tried to brute-force the decryption key based on know contents, and only for packed files. This caused issues, such as mbroemme#13. Adds a new function, `libmpq__block_open_offset_with_filename`, that uses the filename to obtain the decryption key.
glebm
added a commit
to diasurgical/libmpq
that referenced
this issue
Nov 2, 2021
Previously, libmpq tried to brute-force the decryption key based on know contents, and only for packed files. This caused issues, such as mbroemme#13. Adds a new function, `libmpq__block_open_offset_with_filename`, that uses the filename to obtain the decryption key.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
File
Sfx\Items\Titlemov.wav
inDIABDAT.MPQ
from Diablo 1 is read incorrectly with this library.Correct values:
Values read by libmpq:
Upon inspecting, I can see that the file is encrypted but not compressed (flags are 0x80010000).
This means
libmpq__decrypt_key
is never called, so the decryption seed then ends up being 0.According to StormLib, the correct key here is 2227372475.
Looks like StormLib generates the decryption key from the filename (although it does also have a heuristic to decrypt WAV files).
There should be a way to do something similar here as well.
The text was updated successfully, but these errors were encountered: