Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
longxa762
Posts: 8
Joined: Mon Apr 23, 2018 3:13 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by longxa762 »

makc_ar wrote:Game 神舞幻想 Faith of Danschant: http://store.steampowered.com/app/724970
Image

Error for quickbms_4gb_files.exe
Image

filecutter 2 and 4mb _Root.pak: http://dropmefiles.com/OG3Qv


Is there any fix for this? I uploaded the pak using filecutter and the exe, the original pak file is 37GB seems to be the problem

https://drive.google.com/file/d/1U2jGoC ... sp=sharing
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

That file is so huge that you must use 32 as value of MEGABYTES in filecutter.bms :)
longxa762
Posts: 8
Joined: Mon Apr 23, 2018 3:13 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by longxa762 »

aluigi wrote:That file is so huge that you must use 32 as value of MEGABYTES in filecutter.bms :)


Sr if I did it wrong, I don't really know what to do so I just took the script on your website and look at what other did :roll:

Edit: I just looked at the previous post this is what you need right 5mb? Or do I need to make it bigger since it's 37GB :)

https://drive.google.com/file/d/1yBmKQZ ... sp=sharing
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

open the filecutter.bms script with a text editor, replace the "2" of MEGABYTES with "32", run it on the pak and then upload the generated files somewhere and put a link here.
longxa762
Posts: 8
Joined: Mon Apr 23, 2018 3:13 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by longxa762 »

aluigi wrote:open the filecutter.bms script with a text editor, replace the "2" of MEGABYTES with "32", run it on the pak and then upload the generated files somewhere and put a link here.


Here I did as you said.

https://drive.google.com/file/d/10PFaGF ... sp=sharing
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

The script was correct but the archived file was very big.
Script 0.4.16, let me know if now everything works correctly.
longxa762
Posts: 8
Joined: Mon Apr 23, 2018 3:13 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by longxa762 »

aluigi wrote:The script was correct but the archived file was very big.
Script 0.4.16, let me know if now everything works correctly.


Thank for the fast fix it's working now :D

Image
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by Ekey »

Key for Darwin Project

Code: Select all

putarray 10 -1 "27C5900B1F371AA94E10DFD3498D7AEA49DE541B11F5E4A7B55CEE3132931F1D"   # Darwin Project


PUBG Mobile - Data not encrypted with AES, It's just XOR > 0x79
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

Do you mean a simple "filexor 0x79" at the beginning of the script?
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by Ekey »

I mean comrpessed chunks is just xored :)
Last edited by Ekey on Tue Apr 24, 2018 4:00 pm, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

Ah so replace the "encryption" line with: encryption xor "\x79"
GoodConduct
Posts: 104
Joined: Fri Jan 20, 2017 10:25 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by GoodConduct »

Hello, I am currently trying to get the sound files for the game Darwin project: https://store.steampowered.com/app/5449 ... n_Project/
However when using Umodel every single sound file is 1KB and when trying to extract them they are a uasset.
http://www.mediafire.com/file/btkb5n6zd ... ing.uasset
http://www.mediafire.com/file/x27syn0t9 ... lling.uexp

But when digging around I couldn't find them, I was wondering if someone could help me find them in the .pak if they even exist in there. The same sound file issue exists in the game "Radical heights' I wonder if the developers are using a new method of sound files or if they are in a separate folder within the mesh.
GHFear
Posts: 290
Joined: Fri Mar 30, 2018 2:48 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by GHFear »

GoodConduct wrote:Hello, I am currently trying to get the sound files for the game Darwin project: https://store.steampowered.com/app/5449 ... n_Project/
However when using Umodel every single sound file is 1KB and when trying to extract them they are a uasset.
http://www.mediafire.com/file/btkb5n6zd ... ing.uasset
http://www.mediafire.com/file/x27syn0t9 ... lling.uexp

But when digging around I couldn't find them, I was wondering if someone could help me find them in the .pak if they even exist in there. The same sound file issue exists in the game "Radical heights' I wonder if the developers are using a new method of sound files or if they are in a separate folder within the mesh.


Radical heights use old file formats like .BNK and .wem and are located in Content/WwiseAudio/Windows and Content/WwiseAudio/Windows/English(US).
The uasset files are just the "encryption key" and shortcut to the file itself.
Could be something similar with Darwin Project.
GoodConduct
Posts: 104
Joined: Fri Jan 20, 2017 10:25 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by GoodConduct »

GHFear wrote:
GoodConduct wrote:Hello, I am currently trying to get the sound files for the game Darwin project: https://store.steampowered.com/app/5449 ... n_Project/
However when using Umodel every single sound file is 1KB and when trying to extract them they are a uasset.
http://www.mediafire.com/file/btkb5n6zd ... ing.uasset
http://www.mediafire.com/file/x27syn0t9 ... lling.uexp

But when digging around I couldn't find them, I was wondering if someone could help me find them in the .pak if they even exist in there. The same sound file issue exists in the game "Radical heights' I wonder if the developers are using a new method of sound files or if they are in a separate folder within the mesh.


Radical heights use old file formats like .BNK and .wem and are located in Content/WwiseAudio/Windows and Content/WwiseAudio/Windows/English(US).
The uasset files are just the "encryption key" and shortcut to the file itself.
Could be something similar with Darwin Project.


Now, whats odd is that I do not see those files mentioned like I see the WwiseAudio however I do not see the Winows/English(US)
https://i.imgur.com/X970pdD.png

Even when I went to the .Pak sound directly it still only showed the 1KB encyption data and nothing else even though the file is 200+MB.
TerryXX
Posts: 15
Joined: Sat Apr 30, 2016 9:01 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by TerryXX »

Hi Aluigi, with the latest patches for street fighter v something is changed and your script does not work at 100% I'll explain better in some pak files the folder hierarchy it is wrong with the consequence that some files are corrupt, such as the materials of the characters.
https://imgur.com/a/VSkR5Xv
Here is a pak file updated to the last patch
https://www.dropbox.com/s/0jw8eu0rv1b5u ... r.pak?dl=0
If you need more let me know, thx.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

I don't see any problem.
The filenames are provided by the archive itselft without being touched by the script/quickbms.
blenux
Posts: 66
Joined: Wed Nov 15, 2017 1:30 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by blenux »

Fortnite Season 4 Battle Pass has changed the Pak file format, uModel can't open it atm.
TerryXX
Posts: 15
Joined: Sat Apr 30, 2016 9:01 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by TerryXX »

[SFV] Hmm it's a very strange thing in the patches before this it did not happen, and in any case the materials are now unusable, I noticed that there are problems with Gildor's Umodel too, I hope it is not there some kind of half-tampering like Denuvo or similar.
Edit:
Ok after several tests something has definitely changed, first the material now they have different bytes here a sample https://www.dropbox.com/s/5l5sqnw6ijwj5 ... l.rar?dl=0
I unpacked the game with this bat: for %%s in (*.pak) do quickbms -Y sf5.bms %%s out
with an old script

Code: Select all

# Unreal Engine 4 - Unreal Tournament 4 (script 0.4)
# Modified by FluffyQuack for better SF5 support
# script for QuickBMS http://quickbms.aluigi.org

# set your AES_KEY here as text or C string ("\x11\x22...")
set AES_KEY binary "_aS4mfZK8M5s5KWC2Lz2VsFnGKI7azgl"

goto -0x2c
idstring "\xe1\x12\x6f\x5a" # 0x5a6f12e1
get VERSION long
get OFFSET longlong
get SIZE longlong
getdstring HASH 20

goto OFFSET

#Acquire base name
get NAMESZ signed_long
math NAMESZ -= 9
getdstring DUMMY 9 #Skip the "..\..\..\" part of the filepath
getdstring BASENAME NAMESZ

get FILES long

for i = 0 < FILES
    callfunction GET_NAME 1
    savepos TMP_OFF

    get OFFSET longlong
    get ZSIZE longlong
    get SIZE longlong
    get ZIP long
    if VERSION <= 1
        get TSTAMP longlong
    endif
    getdstring HASH 20
    math CHUNKS = 0
    if VERSION >= 3
        if ZIP != 0
            get CHUNKS long
            for x = 0 < CHUNKS
                get CHUNK_OFFSET longlong
                get CHUNK_END_OFFSET longlong
                putarray 0 x CHUNK_OFFSET
                putarray 1 x CHUNK_END_OFFSET
            next x
        endif
        get ENCRYPTED byte
        get CHUNK_SIZE long
    endif

    comtype copy    # for AES
    if ZIP & 1
        comtype zlib
    elif ZIP & 2
        comtype gzip
    endif

    if CHUNKS > 0
        putvarchr MEMORY_FILE SIZE 0
        log MEMORY_FILE 0 0
        append
        for x = 0 < CHUNKS
            getarray CHUNK_OFFSET 0 x
            getarray CHUNK_END_OFFSET 1 x
            math CHUNK_ZSIZE = CHUNK_END_OFFSET
            math CHUNK_ZSIZE - CHUNK_OFFSET
            if ENCRYPTED != 0
                encryption aes AES_KEY "" 0 32
                math CHUNK_ZSIZE x 32
            endif
            clog MEMORY_FILE CHUNK_OFFSET CHUNK_ZSIZE CHUNK_SIZE
        next x
        append
        encryption "" ""
        log NAME 0 SIZE MEMORY_FILE
    else
        # the file offset points to an entry containing
        # the "same" OFFSET ZSIZE SIZE ZIP HASH ZERO fields,
        # just an additional backup... so let's skip them
        savepos BASE_OFF
        math BASE_OFF - TMP_OFF
        math OFFSET += BASE_OFF
        if ENCRYPTED != 0
            encryption aes AES_KEY "" 0 32
            math ZSIZE x 32
        endif
        clog NAME OFFSET ZSIZE SIZE
        encryption "" ""
    endif
next i

startfunction GET_NAME
    get NAMESZ signed_long
    if NAMESZ >= 0
        getdstring NAME NAMESZ
    else
        math NAMESZ n NAMESZ
        math NAMESZ * 2
        getdstring NAME NAMESZ
        set NAME unicode NAME
    endif
   set TMP BASENAME
   string TMP += NAME
   set NAME TMP
endfunction


The hierarchy is kept perfectly but the strangeness of the materials remains, I try the same bat file with the unreal engine 4 script (sfv key) but are created dat files in numerical sequence like 0000658 0000659 etc etc
I continue to study if I find a solution at least for the materials.
Exozze
Posts: 2
Joined: Wed May 02, 2018 12:50 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by Exozze »

How fix it? I need open .pak, but i have this problem.
Image
StreetMode
Posts: 15
Joined: Mon Apr 16, 2018 9:03 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by StreetMode »

Hey

I am looking for the key to extract wem files from Rocket League PC

Thanks :)