Skip to content
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

wrpl unpacker doesn't work with replays that have a nuclear explosion #77

Open
Yay5379 opened this issue Jan 9, 2023 · 14 comments
Open

Comments

@Yay5379
Copy link

Yay5379 commented Jan 9, 2023

If you try to unpack a replay with a nuclear explosion it will output this error: construct.core.ConstError: parsing expected b'\x00BBF' but parsed b'kill'. This only happens to me when I try to unpack a replay that has a nuclear explosion.

@Yay5379 Yay5379 changed the title wrpl unpacker doesn't work in replays with a nuclear explosion wrpl unpacker doesn't work with replays that have a nuclear explosion Jan 9, 2023
@OshidaBCF
Copy link

Hi, do you know what you can do with the .bin after extraction ?
I'm trying to use the replays but the bin is unreadable.

@Yay5379
Copy link
Author

Yay5379 commented Jan 16, 2023

If you use zlib to decompress the bin file there should be more human readable text in the new decompressed bin file.

@OshidaBCF
Copy link

ohhhhhh

Elaborate, this is getting interesting

I don't really know how to "use" zlib, any help appreciated

@Yay5379
Copy link
Author

Yay5379 commented Jan 16, 2023

Basically I used This program to decompress the wrplu.bin. You basically change the name of the wrplu.bin to wrplu.zlib and then drag and drop it onto the program. I attached a few examples of what the file might look like after decompression.
Wrplu Examples.zip

@OshidaBCF
Copy link

OshidaBCF commented Jan 16, 2023

"invalid or incomplete deflate data"
Both for mine or yours files

@Yay5379
Copy link
Author

Yay5379 commented Jan 16, 2023

My files are already decompressed. It worked for me but it could be because i used a different version of wt tools.

@OshidaBCF
Copy link

i see... i used the last tools i have/modified from kotiq

it can uncompress the whole replay file but not the bin one

@OshidaBCF
Copy link

Wait no...
The bin is already what i get from the tools...

ah

@OshidaBCF
Copy link

i thought you had a tool that would make that bin even more readable

@Yay5379
Copy link
Author

Yay5379 commented Jan 16, 2023

Try to decompress the bin file you get after using the tools. (remember to change the .bin to .zlib) It will make some data readable but there will still be a whole bunch of unreadable text. I also used Keksilton's WT tools on the replays before I decompressed the wrplu.bin.

@TaLajans
Copy link

@Yay5379 do you have any stuctures to share that would help to parse that .bin file?

@Yay5379
Copy link
Author

Yay5379 commented Jan 25, 2023

I don't have any structures but I have a hexdump file that might contain some useful information such as patterns. I also think part of the file might be encrypted but I am not 100% sure. The main things that I noticed when looking at the file in a hex editor is that most sections with readable strings end with 02 58 39 D0 01 00. I also noticed that a big chink of the readable strings are just mission parameters that you would find in a mission editor blk file.

@Keksilton
Copy link

Keksilton commented Jan 25, 2023

@Yay5379 Regarding an issue parsing replays in my web ui: I believe the issue is in the way mres.blk is being extracted from replay file, looks like it has 2 extra bytes in the beginning.
There is also an issue with NameMap is being parsed from mres.blk, it promises 35 strings, but in reality it only has 34.
At least that's what I have been able to find atm. I will try to have a look during the weekend.

@Yay5379
Copy link
Author

Yay5379 commented Jan 29, 2023

@Keksilton If you decompress the wrplu.bin file you get after using the wrpl unpacker with some sort of zlib decompression program there will be more readable strings in the new decompressed file with most referring to mission data that you would see in a war thunder cdk mission blk (capture zones, respawn points, etc.). I attached some examples of what the wrplu files might look like after decompression so they can be analyzed. I have no idea if this is enough information to get a rough idea on how the wrplu files are structured but I hope that this is enough for a starting point. I am not 100% sure what to look for when analyzing binary files so I can't really help with anything besides providing these decompressed files as a starting point.
decompressed wrplus.zip

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

No branches or pull requests

4 participants