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
wasabipham87
Posts: 2
Joined: Fri Oct 23, 2020 10:59 am

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

Post by wasabipham87 »

thanks u so much. So i will try with ue 4.14. How about using u4pak to work with pak?
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 »

@wasabipham87: Please be more specific. Usage of u4pak script is explained on github, but if you're talking about your bat (which is also called u4pak), I don't quite understand its purpose. For example, FluffyQuack's workflow, which are also bat files, contains a single string and provides the same function - packing a folder into pak - via simple drag-n-drop on selected bat. And I've explained differences between mount points for u4pak and unrealpak in this post.
Also, not sure if default compression is properly supported in Tekken, so it's better to create uncompessed packages for tests to avoid possible issues related to the matter.
Idiotgodc
Posts: 7
Joined: Mon Oct 26, 2020 3:54 pm

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

Post by Idiotgodc »

Pubgm Decrypt Not Working Anyone Help Me ?
New Updated File link :
https://drive.google.com/file/d/15_jKdO ... p=drivesdk

Pubm V2 Script have error Please Fix And Update !
Please Help ! Thanks !
Idiotgodc
Posts: 7
Joined: Mon Oct 26, 2020 3:54 pm

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

Post by Idiotgodc »

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. Small fixes in version 0.9e. Additional message in case if a key is not found in version 0.9f.

Update 14.07.2020:
POC for aes keys finder in mobile games added (one game -> 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.
Fixed premature appearance of key.txt, fixed issue when finder could work more than expected, added total execution time to output message in version 0.9c. Some optimizations were removed to improve compatibility with newest games in version 0.9d. More optimizations were removed to improve compatibility with some old games in version 0.9e (previous version is recommended though).

Known unsupported games: PUBG (all versions), Sea of Thieves.

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

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).
Script with initial v9 paks support (for 4.25 games) - "latest_UE4_bms-script".

Supported games (with specific scripts): Sea of Thieves (SOT), State of Decay 2 (SOD2, latest versions), PUBG Lite, PUBG Mobile/Mobile Lite, PUBG Mobile (chinese ver.), Friday 13th Game (F13G), Bless Mobile, Dragon Quest XI (DQ11) + normals fix, Days Gone, Tony Hawk's Pro Skater 1+2 (demo only), Pinball Wicked (thanks to pipopipo/pipoman), Conan Exiles, Tekken 7, Fable Legends.

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

Some experimental scripts are now available in custom_UE4_scripts bundle. For more info please read included readme.

1) custom_extract: Provides the same functionality as native filter of quickbms, but on the script level. Created more for research purposes, but may be helpful in some cases.
2) get_hashes: Allow you to extract hashes (actually guids) and filenames of all assets from a pak. Resulted file can be used with extract_diff script.
3) extract_diff: Allow you to compare paks from different game versions and extract or list only new/updated files.

Basically, get hashes from pak of the old game version, put them near pak of updated game version and extract or list new/updated files. There are additional options in the extract_diff script, but no backward compatibility yet (for example, you can't guess, which files were completely removed in the updated game version). Please note that those scripts are very experimental and may have some bugs/limitations.
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 »

@Idiotgodc: PUBG mobile archives with actually encrypted index are not supported (and probably never will be), because script is using workaround for that part. I don't know how it's even encrypted (aes+xor, or simple aes, or aes ecb with iv) and not sure I want to dig into that, considering that the game library is protected.
But since chunks themself are not encrypted, I'll try to make a specific pubgm version of my upcoming fix for raw extraction functionality.

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

pubg_mobile script updated in the specific scripts bundle. It now properly supports game_patch paks with unencrypted index (previously the script didn't work with them as expected). Strange that the issue was not reported yet.

Update: PUBG mobile v1.1 and above will not be supported for now, because they've started using actual encryption.
Last edited by spiritovod on Tue Oct 27, 2020 5:48 pm, edited 2 times in total.
Idiotgodc
Posts: 7
Joined: Mon Oct 26, 2020 3:54 pm

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

Post by Idiotgodc »

@spiritovod Brother Updated One Still Not Working Showing Pak Format Is Not Supporting And
- 0 Files found in 1 seconds
Coverage file 0 100% 28959401 28934637 . Offset 00000000

And AES Key Updated I Think Can you Update me New Key ? It's Possible ?
Another Sample Obb.Pak
https://drive.google.com/file/d/16Q4OGY ... p=drivesdk

Waiting For Answer ! And Thanks For Replying ! Try To Fix This Brother !
rewold
Posts: 27
Joined: Mon Dec 17, 2018 3:02 am

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

Post by rewold »

Greetings, could someone tell me Ghostrunner AES 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 »

@rewold: The game archive is not encrypted. Just use latest script from my signature.
rewold
Posts: 27
Joined: Mon Dec 17, 2018 3:02 am

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

Post by rewold »

spiritovod wrote:@rewold: The game archive is not encrypted. Just use latest script from my signature.


Thank you for reply. :D
Killnus
Posts: 13
Joined: Tue Jun 16, 2020 3:59 pm

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

Post by Killnus »

i export windows no editor.pak 90.000 file i finish the job for game.locres how to convert .pak ?
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 »

@Killnus: I've just added links to some useful related posts about it in base post (in the very end).
Idiotgodc
Posts: 7
Joined: Mon Oct 26, 2020 3:54 pm

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

Post by Idiotgodc »

Any Update About PUBG MOBILE V1.1 .Pak ?
TGGAMING
Posts: 7
Joined: Wed Apr 22, 2020 5:10 pm

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

Post by TGGAMING »

@spiritovod
Bro getting error in extracting PUBG mobile v1.1

offset filesize filename
--------------------------------------

- error in src\extra\xalloc.c line 703: xdbg_realloc()

Error: memory allocation problem
Access is denied.



Fix it please !
FanofSpiritovod
Posts: 1
Joined: Sun Nov 01, 2020 3:42 pm

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

Post by FanofSpiritovod »

@spiritovod
need new script for pubg mobile
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 »

^ I know people are waiting for some PUBGM solution, but like I've said before, it's kind of troublesome because of the encryption and game protection, I'm not that fluent in debugging android stuff.

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

Anyway, unrelated to this - script for Kingdoms Reborn "paka". While main game package is usual pak, that additional one is not a native UE4 package, but more like self-invented mix of latest utoc/ucas and bnk/pck-like container for oggs. Strange stuff, if someone already saw something like that elsewhere, let me know, maybe I'm just reinventing the wheel.

Update: Ok, so this is XBNK container, compressed in chunks, where all filenames and stream information (codec, offset, frequency, etc) are stored in the header. For more info see this script by aluigi. Though in that case information is stored sequentially before each data chunk.
Last edited by spiritovod on Sat Nov 07, 2020 12:56 pm, edited 1 time in total.
mouserat11
Posts: 2
Joined: Fri Nov 06, 2020 2:38 am

Unpacking error with UnrealTournament script

Post by mouserat11 »

Hey there, i make mods for UE4 games. A special method i use is packing up the mods with ue4, then unpacking the pak with quickbms. When i try to extract a certain pak i get this error:
Error: incomplete input file -10:
Can't read 2 bytes from offset 000000c6.
Anyway don't worry, it's possible that the BMS script has been written
to exit in this way if it's reached the end of the archive so check it
or contact its author or verify that all the files have been extracted.
Please check the following coverage information to know if it's ok.

coverage file -10 100% 198 198 . offset 000000c6

Last script line before the error or that produced the error:
139 get CHUNK_OFFSET longlong TOC_FILE

Any help? Thank you :D
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 »

@mouserat11: Usually this error means that the index has custom format, but looking at the offset value it's probably something different - for example, if you are using outdated UE4 script with some modern game (check latest UE4 script via my signature). Provide more info about the game or at least sample pak. Also, take a look at games with specific scripts from my base post, maybe it's one of them.

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

custom_extract script from custom_UE4_scripts bundle updated. It now properly works with all possible filters (before it actually worked only with extensions as filters, which I didn't notice), including unicode strings - for example, you can now find something like "Intérior" in filenames, considering that you're editing bms script in a unicode compatible editor.
Kein
Posts: 32
Joined: Wed Jan 08, 2020 11:22 pm

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

Post by Kein »

Anyone got updated BMS script for 4.25 paks? It is version9 it seems
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 »

@Kein: Use latest UE4 script from my signature.

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

get_hashes script from custom_UE4_scripts bundle updated (including ones for specific games). It now works almost twice as fast as before.
TGGAMING
Posts: 7
Joined: Wed Apr 22, 2020 5:10 pm

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

Post by TGGAMING »

@spiritovod so there is no way to extract pak contents of pubg mobile?
And are you trying to make a new script or finding other ways for it or not doing anything bro ?