StormLib icon indicating copy to clipboard operation
StormLib copied to clipboard

New MPQ protection

Open GlitchLxrd opened this issue 2 years ago • 3 comments

When i try to extract war3map.j , it says that the file is corrupted.

https://user-images.githubusercontent.com/65363348/196037829-0314faba-7796-4ed7-bb48-049a20d34411.mp4

https://drive.google.com/file/d/1myi5n16BGHN2WYp5dCqTp6GRiKqY63xi/view?usp=sharing

GlitchLxrd avatar Oct 16 '22 13:10 GlitchLxrd

I'll take a look, but I am a bit busy at the moment, so give me some time.

ladislav-zezula avatar Oct 18 '22 05:10 ladislav-zezula

Storm.dll is not able to open the file either. Are you sure that the game doesn't use war3map.j that is in the root?

ladislav-zezula avatar Oct 18 '22 07:10 ladislav-zezula

yes, the map doesnt wokr when i use war3map.j in the root

GlitchLxrd avatar Oct 19 '22 16:10 GlitchLxrd

This is Frotty's work and he's working on a proprietary map protector (w3pro), that's now only available as SaaS. I will provide the files if the download links break. I took them from the map's discord server. I tested different map versions with MPQEditor:

  • 0.21w:

    • scripts/war3map.j has a 26B dummy (filled with \x01)
    • the real script is in root
    • 30k files
  • 0.22s:

    • 30269 tracked files (many of them are fake)
    • same as 0.21w
  • 0.23i:

    • 30344 tracked files (many of them are fake)
    • has two script files:
      1. in scripts/ which cannot be extracted and has a different file index
      1. in root: the regular script
  • 0.23p:

    • 30340 tracked files (many of them are fake)
      1. in scripts/ which cannot be extracted
      1. in root: the regular script

I tried to repack the latest in a new MPQ archive, it didn't work in game and I don't care to find out what was missing. Anyhow I think the war3map.j in root is the correct one and the only script file there is. JassHelper reports success on the repacked archive.

So the only issue there is, are the thousands of misleading files (like scripts/war3map.j). Looks like the protector only adds 30k files, but according to MPQEditor's "New MPQ" rules one could put up to 500k files (in base 2) in the MPQ listing, that'd probably cause real issues opening/browsing the archive.

One UX issue I have here: when I try to extract the "scripts/war3map.j" file, the error message cannot be clicked away and it blocks all other of MPQEditor's windows. You can only kill the application or press "SPACE" to close the message box with the error msg. I'll file this as a separate issue if necessary.

Other than the two general issues, this question should be resolved, works as expected (doesn't extract garbage).

Luashine avatar Dec 15 '22 21:12 Luashine

One UX issue I have here: when I try to extract the "scripts/war3map.j" file, the error message cannot be clicked away and it blocks all other of MPQEditor's windows. You can only kill the application or press "SPACE" to close the message box with the error msg. I'll file this as a separate issue if necessary.

Please, tell me the exact steps to reproduce the error message:

  • Which file you opened
  • What exact action you did

Because when I try it, it could be clicked with the mouse or with Enter key.

ladislav-zezula avatar Dec 16 '22 10:12 ladislav-zezula