Re: Information pending...
If someone wants to try spirolone's "decryption", here's the C# code which applies it to the whole file:
EDIT: I just looked at the source code from the old Gibbed Tools and noticed that Pack and Unpack already use "Zlib" for compressed WAD files. WAD files have a recognizable header even when their content is compressed, though, so I don't know what to think about ZED files. I'm pretty sure that we just need to find where the actual zipped data starts, and figure out why only the central directory becomes readable after spirolone's "decryption". I would expect to find the file headers somewhere, which start with "50 4B 03 04", rather than "50 4B 01 02" as we see in the central directory.
EDIT 2: I wanted to take a closer look at a couple of old WADs, but I can't find traces of a central directory, even though they should be zipped as well. Not even after applying spirolone's "decryption". Are we missing something obvious?
Did someone else try and understand more from the old Gibbed Tools? To be honest I have never had to manage binary files, so it's difficult for me to follow the code flow, maybe someone else is more used to it.
- Code: Select all
byte[] source = File.ReadAllBytes(@"C:\<your_dotp2015_path>\DATA_000.ZED");
List<byte> destList = new List<byte>();
byte prev = 0;
for (int i=0; i<source.Length; i++)
{
byte curr = source[i];
curr ^= prev;
destList.Add(curr);
prev = source[i];
}
File.WriteAllBytes(@".\TEST_000.BIN", destList.ToArray<byte>());
EDIT: I just looked at the source code from the old Gibbed Tools and noticed that Pack and Unpack already use "Zlib" for compressed WAD files. WAD files have a recognizable header even when their content is compressed, though, so I don't know what to think about ZED files. I'm pretty sure that we just need to find where the actual zipped data starts, and figure out why only the central directory becomes readable after spirolone's "decryption". I would expect to find the file headers somewhere, which start with "50 4B 03 04", rather than "50 4B 01 02" as we see in the central directory.
EDIT 2: I wanted to take a closer look at a couple of old WADs, but I can't find traces of a central directory, even though they should be zipped as well. Not even after applying spirolone's "decryption". Are we missing something obvious?
Did someone else try and understand more from the old Gibbed Tools? To be honest I have never had to manage binary files, so it's difficult for me to follow the code flow, maybe someone else is more used to it.
