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
lolwatt
Posts: 36
Joined: Sat May 14, 2016 8:03 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by lolwatt »

Thanks aluigi.
I have uploaded the big exe, two samples and a dll (just in case lol).
If it's too much work, just let it be. No need to stress over it at all.

https://drive.google.com/file/d/0B2yGnR ... ZVMWM/view

Thank you very much again.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

Are you sure you are using quickbms 0.8.1 and script 0.4.10 (0.4.9 is ok too)?

Then what's the error you get?

The cuts are too small to check, I need at least 5 Mb that you can obtain by editing the filecutter script setting the METABYTES variable from 2 to 5
godskin
Posts: 192
Joined: Sun Oct 04, 2015 2:27 am

Re: Unreal Engine 4 pak-file Unpacker

Post by godskin »

aluigi wrote:Are you sure you are using quickbms 0.8.1 and script 0.4.10 (0.4.9 is ok too)?

Then what's the error you get?

The cuts are too small to check, I need at least 5 Mb that you can obtain by editing the filecutter script setting the METABYTES variable from 2 to 5


http://prntscr.com/h4if8n
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

ok it's using the oodle compression but it has a ZIP field set to 3 instead of 0x10.
I can make a work-around but I'm not sure if it will break the compatibility with other games.
Let's try, script 0.4.11.
lolwatt
Posts: 36
Joined: Sat May 14, 2016 8:03 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by lolwatt »

This indeed works with Faith. Thanks!
godskin
Posts: 192
Joined: Sun Oct 04, 2015 2:27 am

Re: Unreal Engine 4 pak-file Unpacker

Post by godskin »

aluigi wrote:ok it's using the oodle compression but it has a ZIP field set to 3 instead of 0x10.
I can make a work-around but I'm not sure if it will break the compatibility with other games.
Let's try, script 0.4.11.


PLS project-Z

viewtopic.php?f=9&t=5150
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

I already answered you in that topic and that's not a UE4 archive, so you are OT here for that game.
Nelly
Posts: 4
Joined: Thu Nov 02, 2017 7:55 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by Nelly »

Hey aluigi !

I'm actually trying to extract .pak data from the DLC Neoplan Skyliner of Fernbus Simulator. This game is using UE4, so I've tested with the BMS script Unreal Tournament, but it's not working :( Got this error :

Code: Select all

KEY: no key, encryption disabled

Error: the compressed zlib/deflate input is wrong or incomplete (-3)
Info:  algorithm   1
       offset      00000059
       input size  0x000026f0 9968
       output size 0x00010000 65536
       result      0xffffffff -1

Error: the uncompressed data (-1) is bigger than the allocated buffer (65536)

Last script line before the error or that produced the error:
  130 clog MEMORY_FILE CHUNK_OFFSET CHUNK_ZSIZE CHUNK_SIZE
 


How I can extract the data inside this archive ? Is there any script or others way to extract it ?

Here is the .pak : https://drive.google.com/open?id=0B4pyF ... jh4NkEyOGc

Thanks in advance !
Best regards
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

Eh because you need the correct key :)
Upload the big executable and hopefully we can retrieve it.
Nelly
Posts: 4
Joined: Thu Nov 02, 2017 7:55 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by Nelly »

Congratulations for the 7000 posts ! ;)

Here it is : https://drive.google.com/open?id=1woyOg ... ocZ8ydhgys

Thanks a lot :D Hope you can do something ! :)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

This is the key:

Code: Select all

I0vV6wr0TFbg3m23QuSIwnYC1sI0AIDq
Nelly
Posts: 4
Joined: Thu Nov 02, 2017 7:55 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by Nelly »

Thanks a lot ! It works :D Data have been extracted :) But just a question, how did you get this key ? You just see the .exe with an hex editor or something ?

Thank you again ! :)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

Yes, just by viewing the executable. No analysis or debugging or any reverse engineering.
Nelly
Posts: 4
Joined: Thu Nov 02, 2017 7:55 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by Nelly »

Ok ! Looks easy :) Hope I can do it by myself next time so I don't have to disturb you ;)

Thanks again ;)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

Don't worry for that, feel free to ask everytime. I maintain a public collection of game passwords inside some scripts (like this one of UE4) and on my website.
xLumexMoonx
Posts: 48
Joined: Sat Sep 13, 2014 1:22 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by xLumexMoonx »

Infernales Game can't unpack correct with this script.

here *.exe file with filecutter Simple:

http://www.mediafire.com/file/y6z5oasaz ... ipping.rar

and here Pics Error:

http://www.mediafire.com/view/uqlfadwyz ... bMuch.jpg#
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

Download the following script, open it with a text editor and replace "MEGABYTES = 2" with "MEGABYTES = 10":
http://aluigi.org/bms/filecutter.bms
Then run it with quickbms on the pak archive and upload the 2 files it has generated.
xLumexMoonx
Posts: 48
Joined: Sat Sep 13, 2014 1:22 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by xLumexMoonx »

aluigi wrote:Download the following script, open it with a text editor and replace "MEGABYTES = 2" with "MEGABYTES = 10":
http://aluigi.org/bms/filecutter.bms
Then run it with quickbms on the pak archive and upload the 2 files it has generated.


oh ok here filecutter simple:

http://www.mediafire.com/file/q8uae24jt ... cutter.rar
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by aluigi »

Honestly I don't know what's the exact problem but probably I can guess it.
The following are the details of the involved entries (last entry plus the next one):

Code: Select all

. 00000000000013ce
.
. 00000000009c3358 get     NAMESZ     0x0000000000000029 -1030
. 00000000009c335c getdstr NAME       "Infernales/Content/hell4_BuiltData.ubulk"
 41
    49 6e 66 65 72 6e 61 6c 65 73 2f 43 6f 6e 74 65   Infernales/Conte
    6e 74 2f 68 65 6c 6c 34 5f 42 75 69 6c 74 44 61   nt/hell4_BuiltDa
    74 61 2e 75 62 75 6c 6b 00                        ta.ubulk.
. 00000000009c3385 get     OFFSET     0x00000000e683c000 8
. 00000000009c338d get     ZSIZE      0x00000000502df800 8
. 00000000009c3395 get     SIZE       0x00000000502df800 8
. 00000000009c339d get     ZIP        0x0000000000000000 4
. 00000000009c33a1 getdstr HASH       "" 20
    00 20 75 52 e2 88 8a 10 fc 15 a2 49 f8 43 f4 16   . uR.......I.C..
    35 ff 4e 5c                                       5.N\
. 00000000009c33b5 get     ENCRYPTED  0x0000000000000000 1
. 00000000009c33b6 get     CHUNK_SIZE 0x0000000000000000 4
.
. 00000000000013cf
.
. 00000000009c33ba get     NAMESZ     0x0000000000000028 -1030
. 00000000009c33be getdstr NAME       "Infernales/Content/hell4_BuiltData.uexp"
40
    49 6e 66 65 72 6e 61 6c 65 73 2f 43 6f 6e 74 65   Infernales/Conte
    6e 74 2f 68 65 6c 6c 34 5f 42 75 69 6c 74 44 61   nt/hell4_BuiltDa
    74 61 2e 75 65 78 70 00                           ta.uexp.
. 00000000009c33e6 get     OFFSET     0x0000000136b1c000 8
. 00000000009c33ee get     ZSIZE      0x0000000009af7960 8
. 00000000009c33f6 get     SIZE       0x0000000009af7960 8
. 00000000009c33fe get     ZIP        0x0000000000000000 4
. 00000000009c3402 getdstr HASH       "" 20
    9f a9 35 fc 46 ef b8 29 1c b2 56 8b fc 98 ea 01   ..5.F..)..V.....
    17 e8 ab db                                       ....
. 00000000009c3416 get     ENCRYPTED  0x0000000000000000 1
. 00000000009c3417 get     CHUNK_SIZE 0x0000000000000000 4

As visible there, we have just a non-compressed file.
The script uses Clog instead of Log for working easily with encrypted files without doing a branch of instructions for compressed and one for uncompressed files, probably this choice consumes lot of memory for nothing and this is something I'm going to check in the next version of quickbms.

In short I see no errors in the script and I guess the problem is just in the impossibility to re/allocate the memory necessary for extracting the files, in fact "Infernales/Content/hell4_BuiltData.ubulk" is quite big (1.3 Gb) resulting in too much memory for a 32bit process.

Now, how to fix it in the meantime?
Try running quickbms_4gb_files.exe with the -9 option, if you use the double-click gui you must simply make a shortcut to the exe and adding -9 to the Target property of the shortcut.

Let me know if it works.
If it doesn't work you have to wait the next version of quickbms which is not planned yet.
xLumexMoonx
Posts: 48
Joined: Sat Sep 13, 2014 1:22 pm

Re: Unreal Engine 4 pak-file Unpacker

Post by xLumexMoonx »

aluigi wrote:Honestly I don't know what's the exact problem but probably I can guess it.
The following are the details of the involved entries (last entry plus the next one):

Code: Select all

. 00000000000013ce
.
. 00000000009c3358 get     NAMESZ     0x0000000000000029 -1030
. 00000000009c335c getdstr NAME       "Infernales/Content/hell4_BuiltData.ubulk"
 41
    49 6e 66 65 72 6e 61 6c 65 73 2f 43 6f 6e 74 65   Infernales/Conte
    6e 74 2f 68 65 6c 6c 34 5f 42 75 69 6c 74 44 61   nt/hell4_BuiltDa
    74 61 2e 75 62 75 6c 6b 00                        ta.ubulk.
. 00000000009c3385 get     OFFSET     0x00000000e683c000 8
. 00000000009c338d get     ZSIZE      0x00000000502df800 8
. 00000000009c3395 get     SIZE       0x00000000502df800 8
. 00000000009c339d get     ZIP        0x0000000000000000 4
. 00000000009c33a1 getdstr HASH       "" 20
    00 20 75 52 e2 88 8a 10 fc 15 a2 49 f8 43 f4 16   . uR.......I.C..
    35 ff 4e 5c                                       5.N\
. 00000000009c33b5 get     ENCRYPTED  0x0000000000000000 1
. 00000000009c33b6 get     CHUNK_SIZE 0x0000000000000000 4
.
. 00000000000013cf
.
. 00000000009c33ba get     NAMESZ     0x0000000000000028 -1030
. 00000000009c33be getdstr NAME       "Infernales/Content/hell4_BuiltData.uexp"
40
    49 6e 66 65 72 6e 61 6c 65 73 2f 43 6f 6e 74 65   Infernales/Conte
    6e 74 2f 68 65 6c 6c 34 5f 42 75 69 6c 74 44 61   nt/hell4_BuiltDa
    74 61 2e 75 65 78 70 00                           ta.uexp.
. 00000000009c33e6 get     OFFSET     0x0000000136b1c000 8
. 00000000009c33ee get     ZSIZE      0x0000000009af7960 8
. 00000000009c33f6 get     SIZE       0x0000000009af7960 8
. 00000000009c33fe get     ZIP        0x0000000000000000 4
. 00000000009c3402 getdstr HASH       "" 20
    9f a9 35 fc 46 ef b8 29 1c b2 56 8b fc 98 ea 01   ..5.F..)..V.....
    17 e8 ab db                                       ....
. 00000000009c3416 get     ENCRYPTED  0x0000000000000000 1
. 00000000009c3417 get     CHUNK_SIZE 0x0000000000000000 4

As visible there, we have just a non-compressed file.
The script uses Clog instead of Log for working easily with encrypted files without doing a branch of instructions for compressed and one for uncompressed files, probably this choice consumes lot of memory for nothing and this is something I'm going to check in the next version of quickbms.

In short I see no errors in the script and I guess the problem is just in the impossibility to re/allocate the memory necessary for extracting the files, in fact "Infernales/Content/hell4_BuiltData.ubulk" is quite big (1.3 Gb) resulting in too much memory for a 32bit process.

Now, how to fix it in the meantime?
Try running quickbms_4gb_files.exe with the -9 option, if you use the double-click gui you must simply make a shortcut to the exe and adding -9 to the Target property of the shortcut.

Let me know if it works.
If it doesn't work you have to wait the next version of quickbms which is not planned yet.


ok.

it still doesn't work:

http://www.mediafire.com/view/a082de5bo ... Error.jpg#

but i hope u can make it for the future.