Can't reimport this file (LZMA)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
kvn
Posts: 21
Joined: Sat Aug 29, 2015 11:43 pm

Can't reimport this file (LZMA)

Post by kvn »

Hi
I created this script to extract this file

Code: Select all

comtype lzma
get NAME filename
string NAME += ".assets"
clog NAME 0x70 0x3ff87 0x208ad0


But when i use reimport.bat with unmodified file, i got this problem,
something is not right?
Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Can't reimport this file (LZMA)

Post by aluigi »

quickbms already uses the latest version of the lzma sdk and uses the most extreme compression setting, so there is not much I can do.

The settings of compression algorithms sometimes don't work as you expect, for example sometimes with some types of files you can get better performances using a normal compression level rather than an extreme one. These settings are hardcoded in quickbms so you can't change them and there is no "brute forcing" mechanism like instead is implemented for the deflate/zlib algorithms (long story).
kvn
Posts: 21
Joined: Sat Aug 29, 2015 11:43 pm

Re: Can't reimport this file (LZMA)

Post by kvn »

Ok, there any way I can compress files back to lzma?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Can't reimport this file (LZMA)

Post by aluigi »

An easy solution that doesn't involve programming and manual reinjection of the new manually compressed data back in the archive at the exact offset and repeated for all the files to reimport? :D

If you open quickbms.exe 0.7.5 with a hex editor and go at offset 0xdd25 you will find the byte 0x1b, you can try to replace it with 0x18 and retrying the reimporting but I don't think it will change much because there are many other low level lzma settings used by quickbms.
kvn
Posts: 21
Joined: Sat Aug 29, 2015 11:43 pm

Re: Can't reimport this file (LZMA)

Post by kvn »

Doesn't work, but still thanks.
This archive start with a magic: 0x5D 0x00 0x00 0x08, not same with reimported file
Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Can't reimport this file (LZMA)

Post by aluigi »

It's correct because it's NOT a magic, that one is an header with information in it about the parameters of the compression, the dictionary size and so on.