Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by Alpha1001 »

Hi, I would like to know if someone can write for me a tool or a bms script to decompress/recompress this archive? https://drive.google.com/file/d/1sHDLKH ... p=drivesdk
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tool/script to unpack/repack unknown format

Post by aluigi »

Name of the game?
Remember to write ever the name of the game in the title.
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Tool/script to unpack/repack unknown format

Post by Alpha1001 »

Mortal Kombat Shaolin Monks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tool/script to unpack/repack unknown format

Post by aluigi »

Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Tool/script to unpack/repack unknown format

Post by Alpha1001 »

Thanks!
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Tool/script to unpack/repack unknown format

Post by Alpha1001 »

Hey aluigi, the script works fine to decompress the EWDF, but the recompression/reimport won't work "the file is too big" after decompressed. I've searched on the Wikipedia about the Deflate algorithm, the ZIP format uses it, I've tested with the Winrar and the PKZIP but the game crashes. I think that because of header in the ZIP archives are differents, the filesize is in other offset... So, you can make/implement an small tool to recompress this Deflate version specifically to the game?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by aluigi »

I have updated the script for automatically acting as rebuilder if the input file doesn't have the ewdf extension.

Usually I never write rebuilders but this format was very simple :)
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by Alpha1001 »

Hi, the script works to rebuild the ewdf decompressed, but if I translate all the texts of a file that I have here, keeping the original filesize (4390 bytes) after rebuild the ewdf becomes larger and the game freezes, now if I translate an small text block the game works fine. There is something with the repeated strings or chars (amount details) even keeping the original filesize? Is possible to achieve always the same size of original archive keeping the same size in the modified file (improve the compression level)?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by aluigi »

I have just noticed 2 additional fields at the end of the ewdf archive.
Script 0.1.2
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by Alpha1001 »

I've tested here, but this message error is showed after select the ewdf decompressed http://imgur.com/ZvkAhuN
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by aluigi »

Here everything works perfectly:
quickbms.exe mksm_ewdf.bms y_hud_v01.P2N
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by Alpha1001 »

Now is working here too, thanks!
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by Alpha1001 »

I've inserted several files and so far it has worked fine, but now I've found that file https://drive.google.com/file/d/11z_Rtw ... p=drivesdk that is making the game freeze after recompression. Maybe there is a difference in compressing this file to others or does the script have to be adapted to it? You can check this file, the decompression works normal, but after. recompress the game freezes
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by aluigi »

Give it an ewdf extension because the script is instructed to extract the files with such extension and repacking those with any other extension (or no extension at all like your sample).
Alpha1001
Posts: 37
Joined: Tue Nov 06, 2018 10:11 am

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by Alpha1001 »

After I decompress this file the extension is .bin (a text file called h.bin). The problem is with the recompression, I don't know if the game uses CRC checking for this file to detect changes in the original content, because the others ewdf works fine recompressed.
phantaton
Posts: 20
Joined: Wed Dec 19, 2018 8:17 pm

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by phantaton »

I tried using the script to unpack GAMEDATA.WAD from the E3 build of the game and it's not working. Not really sure what is different about the older build's .wad file but here it is if anyone wants to mess with it:
https://drive.google.com/file/d/1hVNSFhMbe358Y1da5hRDjPTToCsCoCS7/view?usp=sharing
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by aluigi »

1.2Gb? Remember to use the filecutter script with big files, it makes analysis a lot faster:
http://aluigi.org/bms/filecutter.bms
TotalMK
Posts: 12
Joined: Wed Mar 04, 2020 11:48 am

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by TotalMK »

Need some Further help with this script I am using version 1.0.4

The bms unpacks GAMEDATA.WAD, in those files there are additional .WAD files (example: ES_00000047.WAD)
I tried running the script again on these but get the Error (see attached image)

Tried changing the extension to .ewdf also didn't work.

Download file for further analysis:
http://www.totalmk.me/ES_00000047.rar
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by aluigi »

@TotalMK
I updated the script to skip that additional byte.
Let me know if it works better.
http://aluigi.org/bms/mksm_ewdf.bms
TotalMK
Posts: 12
Joined: Wed Mar 04, 2020 11:48 am

Re: Tool/script to unpack/repack unknown format [Mortal Kombat Shaolin Monks ewdf]

Post by TotalMK »

I gave it a go on the wad I posted and another .wad but unfortunately it didn't work