Need Help!

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Omarios
Posts: 14
Joined: Mon Sep 21, 2020 7:54 am

Need Help!

Post by Omarios »

Hello, can anybody help me with a script for recompressing a file?

Here is the script I used for decompression

comtype LZSS
CLog "decompressed" 0x0c 0xAE4 0x3577

But the problem is that when I use it in the reimport feature, it builds the file in a different way, so the game can't read it :( , can anybody help me with this? I will link the file that contains both the original and decompressed file below.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Need Help!

Post by aluigi »

Try this script with reimport2:

Code: Select all

comtype lzss
get DUMMY long
get DUMMY long  # 1
get SIZE long
savepos OFFSET
get ZSIZE asize
math ZSIZE - OFFSET
clog "decompressed" OFFSET ZSIZE SIZE


But I guess it's better if you build the compressed file from scratch, use this script on the decompressed file:

Code: Select all

get SIZE asize

log MEMORY_FILE 0 0
put 0xd3e9e2e2 long MEMORY_FILE
put 1 long MEMORY_FILE
put SIZE long MEMORY_FILE
log "compressed" 0 12 MEMORY_FILE

comtype lzss_compress
append
clog "compressed" 0 SIZE SIZE
append