Resident Evil 4 .fen Files!

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Scofield_TR
Posts: 99
Joined: Wed Dec 03, 2014 12:44 pm

Resident Evil 4 .fen Files!

Post by Scofield_TR »

I think the problem is in compression.Can you write a script that will compress this file to Aluigi?

Sample File: https://www101.zippyshare.com/v/zmhrSeAg/file.html

Script

Code: Select all

# Resident Evil 4 lfs fen (script 0.1.2)
# script for QuickBMS http://quickbms.aluigi.org

get NAME basename
get EXT extension
if EXT == "lfs"

    idstring "RDLX"
    get DUMMY long  # 0xfeeebaaa
    get SIZE long
    get ZSIZE long
    get ZIP long
    get DUMMY long
    get DUMMY long
    get ZERO long
    get ZERO long
    savepos OFFSET
    comtype xmemdecompress
    clog NAME OFFSET ZSIZE SIZE

elif EXT == "fen"

    get SIZE long
    savepos OFFSET
    get ZSIZE asize
    math ZSIZE - OFFSET
    clog NAME OFFSET ZSIZE SIZE

elif EXT == "dat"   # ss_file.dat

    get FILES long
    goto 0x10
    for i = 0 < FILES
        get OFFSET long
        putarray 0 i OFFSET
    next i
        get OFFSET asize
        putarray 0 i OFFSET
    for i = 0 < FILES
        getdstring NAME 4
        getarray OFFSET 0 i
        math i + 1
        getarray SIZE   0 i
        math SIZE - OFFSET
        string NAME + /
        log NAME OFFSET SIZE
    next

elif EXT == "crc"

    idstring "ZLDR"
    get SIZE long   # seems wrong
    savepos OFFSET
    get SIZE asize
    math SIZE - OFFSET
    string NAME + ".segs"
    log NAME OFFSET SIZE

elif EXT == "pack"

    get DUMMY long
    get FILES long
    for i = 0 < FILES
        get OFFSET longlong
        savepos TMP
        goto OFFSET
        get SIZE long
        get XSIZE long  # -1, it may be a decompressed size (no samples)
        get DUMMY long  # same as the first 32bit in pack
        get ZERO long
        savepos OFFSET
        if XSIZE == 0xffffffff
            log "" OFFSET SIZE
        else
            clog "" OFFSET SIZE XSIZE
        endif
        goto TMP
    next i

endif
Last edited by Scofield_TR on Sun Jan 27, 2019 1:05 pm, edited 1 time in total.
Scofield_TR
Posts: 99
Joined: Wed Dec 03, 2014 12:44 pm

Re: RE4 .fen Files!

Post by Scofield_TR »

Aluigi please look topic :)
Scofield_TR
Posts: 99
Joined: Wed Dec 03, 2014 12:44 pm

Re: Resident Evil 4 .fen Files!

Post by Scofield_TR »

Up
Scofield_TR
Posts: 99
Joined: Wed Dec 03, 2014 12:44 pm

Re: Resident Evil 4 .fen Files!

Post by Scofield_TR »

Aluigi .fen file reimport, not working. Will you please look.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Resident Evil 4 .fen Files!

Post by aluigi »

Here everything works well with your sample in both reimport and reimport2 mode.