Constructor (2017) .FIL archives header decryption

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Siberian GRemlin
Posts: 22
Joined: Tue Aug 02, 2016 7:46 am

Constructor (2017) .FIL archives header decryption

Post by Siberian GRemlin »

Good Day.

Looks game uses some kind of cycled XOR encription for archives header. I found some regularity and tryed to rebuild xor sequence, but no luck with bytes different from zero.

Code: Select all

  xo1:=$d9;
  for k:=0 to $FF do begin
    cryp[k]:=xo1;
    if k mod 2=1 then xo1:=xo1-1;
    if k mod 8=0 then xo1:=xo1+$B;
    if k mod 8=2 then xo1:=xo1+$3;
    if k mod 8=4 then xo1:=xo1-$5;
    if k mod 8=6 then xo1:=xo1+$3;
    if k mod 16=7 then begin
      if ((k shr 4) mod 4)=0 then xo1:=xo1-$30-$10;
      if ((k shr 4) mod 4)=2 then xo1:=xo1+$50-$10;
    end;
  end;


Can anybody help with decryption? Free Demo available on Steam http://store.steampowered.com/app/619760/

Seems first value in header is file count, after that goes 0x30 bytes blocks for each file, that contained padded filename, offset and size.

Raw archive.
Image Image

False decrypted header.
Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Constructor (2017) .FIL archives header decryption

Post by aluigi »

Yes, useful information but it's an old format (*.fil) and a slightly different encryption (cn.ini).
Script:
http://aluigi.org/bms/constructor.bms

Please let me know if there is any problem with any FIL archive because I had to "guess" if the archive uses the old or new format.
Gano
Posts: 6
Joined: Sat Dec 26, 2015 6:36 pm

Re: Constructor (2017) .FIL archives header decryption

Post by Gano »

FIL archives and cn.ini work without any problems. (Tested with my purchased game)
The TEXT.* files are not decrypted at least not as plain text.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Constructor (2017) .FIL archives header decryption

Post by aluigi »

Can you upload a couple of these TEXT files?
There are no *.TEXT in the demo
Gano
Posts: 6
Joined: Sat Dec 26, 2015 6:36 pm

Re: Constructor (2017) .FIL archives header decryption

Post by Gano »

Sure. Here you go
Gano
Posts: 6
Joined: Sat Dec 26, 2015 6:36 pm

Re: Constructor (2017) .FIL archives header decryption

Post by Gano »

Any news ? :)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Constructor (2017) .FIL archives header decryption

Post by aluigi »

I did just a "one minute" quick check by using the original obfuscation algorithm with different constants but no luck.
I have only updated the script to catch the "TEXT.*" files because the original script checked the "*.TEXT", anyway these files are NOT supported at the moment.
odinboss
Posts: 6
Joined: Thu Aug 17, 2017 7:30 am

Re: Constructor (2017) .FIL archives header decryption

Post by odinboss »

Hi! I have a file ".fil". That I would like to unzip and recompress the files it contains(or is that I suppose).It contains files ".dat", ".bin", ".tiz" and others. It is a file from the year 1999. Is there any possibility of extracting the files?

Image


aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Constructor (2017) .FIL archives header decryption

Post by aluigi »

@odinboss
You are off-topic here because your files are from another game:
https://github.com/studio-lucia/lunarda ... ATA.FIL.md