Giana’s Return ZDA: Difference between revisions
Jump to navigation
Jump to search
imported>Ikskoks |
imported>Ikskoks |
||
| Line 42: | Line 42: | ||
=== Notes and Comments === | === Notes and Comments === | ||
* Files inside those archives are compressed with ZLIB and encrypted with | * Files inside those archives are compressed with ZLIB and encrypted with custom XOR encryption. | ||
=== Decryption method === | |||
Implementation for decryption method written in Python: | |||
<pre> | |||
def decrypt_data(in_data): | |||
xor_res = b'\xBB' | |||
data_size = len(in_data) | |||
out_data = bytearray() | |||
for curr_offset in range(data_size): | |||
data_byte = struct.pack("B", in_data[curr_offset]) | |||
xor_res = xore(xor_res, data_byte) | |||
out_data.extend(xor_res) | |||
return out_data | |||
</pre> | |||
=== Compatible Programs === | === Compatible Programs === | ||
Revision as of 00:00, 28 November 2020
ZDA
- Game : Giana’s Return
- Format Type : Archive
- Endian Order : Little Endian
Format Specifications
// Giana's Return
// ZDA file format
// little endian
// Note: Files are compressed with ZLIB
//header
4 bytes (char) - magic // "ZDA\x00"
4 bytes (uint32) - number of files
4 bytes (uint32) - data start offset
num_of_files *
{
40 bytes (char) - filename + padding
4 bytes (uint32) - uncompressed size
4 bytes (uint32) - compressed size
4 bytes (uint32) - relative file offset
}
num_of_files *
{
x bytes - file data
}
MultiEx BMS Script
Not written yet.
Notes and Comments
- Files inside those archives are compressed with ZLIB and encrypted with custom XOR encryption.
Decryption method
Implementation for decryption method written in Python:
def decrypt_data(in_data):
xor_res = b'\xBB'
data_size = len(in_data)
out_data = bytearray()
for curr_offset in range(data_size):
data_byte = struct.pack("B", in_data[curr_offset])
xor_res = xore(xor_res, data_byte)
out_data.extend(xor_res)
return out_data
Compatible Programs