Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Resident Evil 4 FEN_decompress (*.fen) on PS4

Featured Replies

  • Author
  • Localization

shadow_lonely, posted Fri Jan 26, 2018 3:07 am (31919)


Hi, i started with Resident Evil 4 on PS4, if have a litte different, PC used lfs and PS4 used fen, to decompress lfs file, i used quickbms script:

Code:
comtype xmemdecompress
get name basename
log MEMORY_FILE 0 0
goto 0x10
get chunks long
append
for i = 0 < chunks
get zsize short
get size short
if size = 0
    math size = 0x10000
endif
get offset long
math offset 0x13
clog MEMORY_FILE offset zsize size
next i
append
get size asize MEMORY_FILE
log name 0x00 size MEMORY_FILE


Anyone please help me decompress those files from ps4. Many thanks!

My example files: https://drive.google.com/file/d/1zUyRQW ... sp=sharing
  • Author
  • Localization

aluigi, posted Sun Jan 28, 2018 7:02 am (31988)


yes and no.
Basically they are just "segs" files with a "ZLDR" magic at the beginning, so it's enough to strip the first 8 bytes and it's done.
But there is a problem with the obtained segs file because it uses lzma compression instead of deflate (no problem here) and some chunks can't be decompressed for some unknown reasons not depending by the algorithm or quickbms, the first byte of the lzma stream should be 0 or 1 while it's a "random" number in these particular chunks.
So both this and the segs scripts have been updated but you can't extract the data.

Long story short: no.
  • Author
  • Localization

Nameless32, posted Sun Jan 28, 2018 10:49 am (31996)


aluigi wrote:
yes and no.
Basically they are just "segs" files with a "ZLDR" magic at the beginning, so it's enough to strip the first 8 bytes and it's done.
But there is a problem with the obtained segs file because it uses lzma compression instead of deflate (no problem here) and some chunks can't be decompressed for some unknown reasons not depending by the algorithm or quickbms, the first byte of the lzma stream should be 0 or 1 while it's a "random" number in these particular chunks.
So both this and the segs scripts have been updated but you can't extract the data.

Long story short: no.


sad....

T-T

thanks anyway o/
  • Author
  • Localization

shadow_lonely, posted Sat May 12, 2018 3:48 am (34892)


aluigi wrote:
yes and no.
Basically they are just "segs" files with a "ZLDR" magic at the beginning, so it's enough to strip the first 8 bytes and it's done.
But there is a problem with the obtained segs file because it uses lzma compression instead of deflate (no problem here) and some chunks can't be decompressed for some unknown reasons not depending by the algorithm or quickbms, the first byte of the lzma stream should be 0 or 1 while it's a "random" number in these particular chunks.
So both this and the segs scripts have been updated but you can't extract the data.

Long story short: no.


Hi aluigi. Could you help me unpack *.pack file in Resident Evil 4 (PS4 version) by quickbms script, please? My example file: https://1drv.ms/u/s!AqHXyzDaH_sGiUeSH_M4RiejLiF9

Thanks!
  • Author
  • Localization

aluigi, posted Sat May 12, 2018 9:16 am (34899)


Script 0.1.2
  • Author
  • Localization

shadow_lonely, posted Sat May 12, 2018 12:50 pm (34902)


aluigi wrote:
Script 0.1.2

Thanks! That's great!
  • Author
  • Localization

shadow_lonely, posted Tue May 15, 2018 12:47 am (34926)


I tested, it working, could you help again with .udas files?
Old script working on pc:

Code:
goto 0x400
get files long
getdstring dummy 0xc
math extoffset = files
math extoffset * 4
math extoffset 0x410
for i = 0 < files
get name basename
#get name2 basename
log MEMORY_FILE 0 0
put i byte MEMORY_FILE
goto 0x00 MEMORY_FILE
getvarchr index MEMORY_FILE 0
get offset long
savepos TMP
get nextoffset long
math nextoffset - offset
math offset 0x400
goto extoffset
getdstring ext 3
get dummy byte
savepos extoffset
goto TMP
#string name "/"
#string name name2
string name "_"
string name index
string name "."
string name ext
if ext = "MDT"
log name offset nextoffset
endif
next i


My example files: https://1drv.ms/u/s!AqHXyzDaH_sGiUiROpQa4q_u6TO_
Thanks!
  • Author
  • Localization

aluigi, posted Tue May 15, 2018 1:19 pm (34940)


udas seems a very messy format
  • Author
  • Localization

shadow_lonely, posted Tue May 15, 2018 11:19 pm (34952)


aluigi wrote:
udas seems a very messy format

Thanks. I only use .mdt files for translate. Hope you can help, please.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.