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
Amagakuro
Posts: 46
Joined: Wed Sep 23, 2015 4:47 pm

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

Post by Amagakuro »

spiritovod wrote:^ Thanks. The only downside is that the list with keys will not be updated frequently like before. I encourage all people using GHFear's or my key finders to post their results if that key is not present in the list or outdated there. It will be especially helpful in case of protected games (like UWP games).

Anyway, now I'm looking into aes keys in mobile games built with UE4. If you know any such game with known or unknown keys, let me know. The games I'm already aware of: M.A.D. 8 (key known), Injustice 2 Mobile (key known), Dead by Daylight (key unknown). If you'll mention some asian games which are hard to get, you can also PM me lib\arm64-xxx\libUE4.so from extracted apk, and a sample pak. Can't promise anything though, because it's more for research purposes at the moment, but it will be appreciated.
I know a little about that stuff, but it's probably good exercise for neural networks / deep learning devs, considering specifics of that "brute-force" approach to keys.


If you don't mind then, i'll try to reinstall both Bless Mobile and Traha and provide you the files tomorrow.
Blade And Soul Revolution and Blade II also have known key.
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

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

Post by spiritovod »

@Amagakuro: Other person already provided required files for Traha and Bless Mobile, I'll edit my post to avoid confusion and future suggestions of those games. And I'll check Blade And Soul Revolution and Blade II, since they're available in play market without region restrictions. Thanks for the suggestions, I totally forgot about those two games, considering they are in the list with known keys.
Also, Bless Mobile has slightly modified pak format, so current bms script or umodel will not work even if key will be found.
client1676
Posts: 4
Joined: Sun Jan 19, 2020 7:30 pm

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

Post by client1676 »

Hello!

Can't get access to Auto Chess (UE4 v4.22.3.0) game resources.

unreal_tournament_4.bms (script 0.4.24b) asks for a key.

@GHFear: AES Key Finder 1.8 doesn't help - key.txt is empty.
@spiritovod: AES finder - key.txt says "Key not found, sorry."

EXE: https://mega.nz/file/DAxDUCyS#Ij49mOOCK ... 6YGrzwcfTc

Thank you in advance! ;)
WollieWoltaz
Posts: 41
Joined: Mon Dec 04, 2017 5:48 pm

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

Post by WollieWoltaz »

Client1676 is right. An AES key is required now after the latest update.
Hope this key can be found.
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

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

Post by spiritovod »

@client1676: That's because the exe is protected. I've added simple detection of protection to version 0.9d.

Update: rin forums are now up again, so key added to the list. Please ask any keys related questions there and keep this topic for more general stuff (pak format, bms scripts and so on).
Last edited by spiritovod on Sun May 03, 2020 6:48 pm, edited 2 times in total.
client1676
Posts: 4
Joined: Sun Jan 19, 2020 7:30 pm

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

Post by client1676 »

spiritovod wrote:@client1676: That's because the exe is protected. I've added simple detection of protection to version 0.9d. Since rin forum is not up yet (it should start working in a day btw), here is key: 0x14CAE532C500DE84709358A69EC4962B9CA29EA1F19A4CE48A8D964F807FDEA5


Thank you very much! It works now! :D
keeknr
Posts: 4
Joined: Mon May 04, 2020 11:26 am

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

Post by keeknr »

spiritovod wrote:Wrote some POC for aes keys finder (one exe -> one key or not found). JRE 8 or above is required to run it. Readme is included in the archive (please read it carefully to avoid issues). Virustotal report for those who care: link.
Bleeding Edge is supported, unless they'll change something related in the code. Last Oasis is also supported in version 0.9c. Finder can detect protected games starting from version 0.9d.

Known unsupported games: PUBG, Sea of Thieves, all mobile games (because optimized dalvik code doesn't have any recognizable patterns).

-----------------------------------------------------------------------

I've desided to move all modified scripts to one post (this one). The reason why they can't be merged is because currently there is no way to distinguish them by archives names. Current method with scanning folder name for a pattern is not very effective, since pak archives can be moved anywhere.

Original post with modified script by ssh: viewtopic.php?t=1005&start=1200#p51805 (0.4.23.1a).
Latest official version of the script by aluigi: http://aluigi.org/bms/unreal_tournament_4.bms (0.4.24b at the moment).

Supported games (with specific scripts): Sea of Thieves (SOT), State of Decay 2 (SOD2, latest versions), PUBG Lite.


I have used your SOT script but it doesn't work. It's still asking for the AES Key. "The archive is encrypted, select the number of the key to use or type yours:"

Any idea what I'm doing wrong?
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

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

Post by spiritovod »

@keeknr: It's asking for the key, because archives are encrypted. You can find the key in the list, check my signature.
keeknr
Posts: 4
Joined: Mon May 04, 2020 11:26 am

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

Post by keeknr »

spiritovod wrote:@keeknr: It's asking for the key, because archives are encrypted. You can find the key in the list, check my signature.


Thanks, I just made the mistake to export all instead of just the .pak files. It works now.
keeknr
Posts: 4
Joined: Mon May 04, 2020 11:26 am

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

Post by keeknr »

Any idea of how I can export multiple .pak files with entering the encryption key just once (with quickbms)?
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

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

Post by spiritovod »

@keeknr: Open script in any text editor, find [set AES_KEY binary ""] string and place the key in quotes, like [set AES_KEY binary "0xAAAA..."].
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

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

Post by spiritovod »

Test version of PUBG Mobile script in the same post with other scripts (read my signature). It works a bit longer for big archives like base pak, I'll probably fix that in the future.
Tested with version 0.17.0. Mobile Lite has slightly different version of pak with internal compression type set to 6 (probably custom solution), and the script doesn't work with it. I'll check those paks later.

Update: Found out the compression type in Mobile Lite, it's zstd. Fixed the script, v2 now works with all mobile versions.
Last edited by spiritovod on Wed May 06, 2020 1:07 pm, edited 3 times in total.
keeknr
Posts: 4
Joined: Mon May 04, 2020 11:26 am

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

Post by keeknr »

spiritovod wrote:@keeknr: Open script in any text editor, find [set AES_KEY binary ""] string and place the key in quotes, like [set AES_KEY binary "0xAAAA..."].


I did this but I still have to enter the content select number for every pack. Did I miss to activate something?
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

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

Post by spiritovod »

@keeknr: Oh, I got you. Then change format of the key from "0xAAAA..." to "\xAA\xAA..." in the same string and also change below [math AES_KEY_IS_SET = 0] -> = 1.
soopytwist
Posts: 3
Joined: Sun May 10, 2020 12:37 pm

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

Post by soopytwist »

Hi, new here. Not new to modding in general though I am new to modding UE4. I've just unpacked all of The Walking Dead Saints and Sinners. When I've finished whatever it is I want to do with it how do I pack it all up again? Or do I need to? Other mods I've made work fine as long as the files stick to the same folder structure.
soopytwist
Posts: 3
Joined: Sun May 10, 2020 12:37 pm

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

Post by soopytwist »

I can't add Walking Dead Saints and Sinners uasset files to my UE4 project to modify stuff. They don't show up and if I drag the file into the content window a message says the file format is not supported? How can the file format not be supported?! I've unpacked all the .pak files with no issues, QuickBMS did the lot.
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

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

Post by spiritovod »

@soopytwist: You can start with this tutorial, where some basic UE4 stuff is explained.
TGGAMING
Posts: 7
Joined: Wed Apr 22, 2020 5:10 pm

Pubg mobile extract

Post by TGGAMING »

Can anybody tell me how to extract pubg mobile base.pak encrypted file contents .
I have tried many ways but didn't got anything.

Thank you in advance !
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

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

Post by spiritovod »

@TGGAMING: Both Mobile and Mobile Lite versions are not encrypted. I've tested current script (v2) and it works fine with 0.18.0 version of the game. You can find it on previous page or via my signature.
Savage
Posts: 176
Joined: Thu Oct 02, 2014 4:58 pm

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

Post by Savage »

I tried the script with the data of "life is strange 2", the script can extract the files but not decompress them
I used the 0.10.1 version of quickbms and the latest version of the script (0.4.24b), they used the unreal engine 4.16

Here is the file
lis2-windowsnoeditor-savegames.pak 11.6 MB
https://mega.nz/file/U4NnAQBB#L9Mcu2TOn ... qa0iPaKa3U