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
JackDev
Posts: 39
Joined: Tue Dec 26, 2017 6:36 am

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

Post by JackDev »

ssh wrote:NARUTO TO BORUTO: SHINOBI STRIKER

Code: Select all

L%#)TuTw=n@fYRZa=~l>~ENkUE%i/>S(


Pls AES key of the game https://apkpure.com/m-a-d-8-heroes-batt ... udios.mad8
infogram
Posts: 20
Joined: Fri Nov 03, 2017 8:31 pm

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

Post by infogram »

So with Dragon Quest XI it turns out they don't actually use AES at all, it's just XOR all the way:
- unicode filenames inside the index are XOR'd with key DEADFADE BEEFCAFE (lel)
- file data is zlibbed, then XOR'd with above key, then data gets NOT'd (so to unpack: NOT data -> XOR with key -> decompress)

Managed to update aluigi's unreal_tournament_4.bms script to work with it, but there's just a small problem with filenames having extra characters on the end, like:
"Engine/Content/EditorResources/S_Actor.uassetï"
Not really sure how to get rid of that, does anyone have any idea how to fix it?
(edit: d'oh, figured out I could just use the "string" command to remove the last char from the filename, would have been nice to find the real reason this extra char is being added but meh)

Download DragonQuest_XI.bms v2: https://pastebin.com/ktqAvXXx

Edit: also for anyone interested in tweaking the games cvars, I've dumped a list of all the ones DQXI recognizes here: https://pastebin.com/GXh7MN2W
You'll have to edit the Engine.ini file and add them under a [SystemSettings] section to change them, since it looks like the ingame console is disabled...
I dumped a list of console commands too, but there's not really any way to use them atm: https://pastebin.com/0CMmPm31
Last edited by infogram on Fri Sep 14, 2018 2:20 pm, edited 3 times in total.
sade1212
Posts: 4
Joined: Mon Sep 10, 2018 10:05 pm

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

Post by sade1212 »

infogram wrote:So with Dragon Quest XI...


Thank you very much for working this out!
Like, I imagine, many others interested in modding this game, I'm trying to replace the game's background music (ignoring the hurdle of actually getting it back into a pak file for now).
Some of the sound effects seem to be in a fairly standard Ogg format, like JackGame\Content\Sounds\SE\CM_Battle\SWAV_btl001_attack_pc.uexp, and can be extracted/modified with tools created for other games such as Dragon Ball FighterZ. Lots of other effects, however (such as JackGame\Content\Sounds\SE\CM_Battle\SWAV_btl014_add_doku.uexp) are odd, maybe obfuscated, and don't work with these tools. Unfortunately, all of the music in JackGame\Content\Sounds\BGM falls into the latter category.
Any idea what's up with those .uexps?
infogram
Posts: 20
Joined: Fri Nov 03, 2017 8:31 pm

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

Post by infogram »

sade1212 wrote:Any idea what's up with those .uexps?

Hm, looks like the data for those ones you mentioned are all NOT'ed, NOTing them again seems to give a normal looking file with an Ogg inside like all the other ones.

I can't see any indication in the pak file to say whether or not a file is NOT'ed like this though..
Guess if it's just the files inside JackGame\Content\Sounds\BGM\ this is probably just a custom thing to "encrypt" the BGM in the game, hopefully no other files use it.

Anyway I've attached a simple app I made to NOT the file for you, just drag the file into Notter.exe and the result will be written to <filepath>.out.
Also if you drag a non-NOT'ed file into it that should give you the NOT'd form that the game probably expects.
(requires .NET 2.0, src included)

EDIT: updated Notter to work with directories recursively too, just drag a folder into it and it'll put the result in a new folder next to it called <foldername>.out
sade1212
Posts: 4
Joined: Mon Sep 10, 2018 10:05 pm

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

Post by sade1212 »

infogram wrote:Anyway I've attached a simple app I made to NOT the file for you, just drag the file into Notter.exe and the result will be written to <filepath>.out.


Thanks, this works a treat. All the other sound files I've tried can now be ripped to ogg easily, except the BGM .uexps, which don't seem to be ogg at all (no sign of OggS or vorbis or anything). I'm sure I'll be able to work out what they are with some more experimentation, though I suppose that's somewhat outside the scope of this thread.
Tundraviolet
Posts: 2
Joined: Sat Sep 08, 2018 8:26 am

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

Post by Tundraviolet »

Hi! Maybe this is not the right place to ask but about the DQXI uasset files for the models. I tried UE viewer but it doesn't work it gives us a fatal error. I already talked about it in a thread on the UE viewer forums but the admin doesn't see it or is ignoring it. Not attacking the admin of that forum just saying I get no reply from him that's all. Also using the unreal engine to load these files doesn't work either. So that's why I am asking here.
infogram
Posts: 20
Joined: Fri Nov 03, 2017 8:31 pm

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

Post by infogram »

sade1212 wrote:Thanks, this works a treat. All the other sound files I've tried can now be ripped to ogg easily, except the BGM .uexps, which don't seem to be ogg at all (no sign of OggS or vorbis or anything). I'm sure I'll be able to work out what they are with some more experimentation, though I suppose that's somewhat outside the scope of this thread.

Ah I was only looking at the JackGame\Content\Sounds\SE\CM_Battle\SWAV_btl014_add_doku.uexp file you mentioned, just checked BGMs and you're right about them not being Ogg or anything.
Kinda looks like there might be another layer of encryption on it, I'll try looking at it later.

(also just realised it's not only the BGMs that have that weird NOT stuff applied, since that "JackGame\Content\Sounds\SE\CM_Battle\SWAV_btl014_add_doku.uexp" definitely isn't a BGM.. dunno how I missed that earlier :roll:
I didn't see any indicator in the pak to say whether it has that NOT stuff applied though, so doesn't look like there's any way to automatically de-NOT them all :/ Maybe someone with more experience with UE4 paks can find something about it?)

Tundraviolet wrote:Hi! Maybe this is not the right place to ask but about the DQXI uasset files for the models. I tried UE viewer but it doesn't work it gives us a fatal error. I already talked about it in a thread on the UE viewer forums but the admin doesn't see it or is ignoring it. Not attacking the admin of that forum just saying I get no reply from him that's all. Also using the unreal engine to load these files doesn't work either. So that's why I am asking here.

I don't really know much about UE4 models, but maybe the plugins the game uses has something to do with it?
There's a Criware plugin it loads in, and I've seen Criware used a lot on these anime-ish games, could be the models are all using a Criware format or something.
Like I said I don't know much about them though so no idea how to get anywhere with them, hopefully the UE Viewer dev will chime in soon.

EDIT: kinda off-topic, but would anyone be interested in a mini-console plugin for the game? I made a quick one to mess with the cvars at runtime, works pretty well: https://i.imgur.com/cksoNTC.png
If there's any interest I'll fix it up some more and upload it somewhere.
lionheartuk
Posts: 28
Joined: Mon Jan 26, 2015 8:39 pm

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

Post by lionheartuk »

I don't really know much about UE4 models, but maybe the plugins the game uses has something to do with it?
There's a Criware plugin it loads in, and I've seen Criware used a lot on these anime-ish games, could be the models are all using a Criware format or something.
Like I said I don't know much about them though so no idea how to get anywhere with them, hopefully the UE Viewer dev will chime in soon.


i believe the Criware Format is used only for making the .pak file, almost every game I've ever encountered with a .pak file uses criware.
The uasset files look to be encrypted somewhat.


EDIT: kinda off-topic, but would anyone be interested in a mini-console plugin for the game? I made a quick one to mess with the cvars at runtime, works pretty well: https://i.imgur.com/cksoNTC.png
If there's any interest I'll fix it up some more and upload it somewhere.
[/quote]

I'd be interested in this.
preta
Posts: 2
Joined: Wed Sep 12, 2018 8:09 am

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

Post by preta »

I've actually recently finished looping the Symphonic Suite versions of all the songs in DQXI (except for a couple of songs for which it was unfeasible or for which such versions did not exist). I'm waiting with bated breath for the time it becomes possible to insert them.
RTLtransformer
Posts: 1
Joined: Thu Sep 13, 2018 1:13 pm

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

Post by RTLtransformer »

Hello all,

If anyone could help me find or tell me how to find the AES key for the new ACC game that would be fantastic. I have attached the exe file.
pastranario3
Posts: 10
Joined: Mon Apr 23, 2018 1:44 pm

New Assetto Corsa Competizione

Post by pastranario3 »

Interesting some unpacker for the encrypted files of the UE4 engine that uses the new Assetto Corsa Competizione (.pak)
romaFC
Posts: 9
Joined: Thu Sep 13, 2018 7:01 pm

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

Post by romaFC »

edit: moved to main thread
romaFC
Posts: 9
Joined: Thu Sep 13, 2018 7:01 pm

Assetto Corsa Competizione

Post by romaFC »

game: https://store.steampowered.com/app/8055 ... petizione/


game exe

https://ufile.io/q7lzb

file cutter

https://ufile.io/8d4ns


looking for AES key.

if any other files needed, can upload.
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 »

@romaFC
If it's an UE4 game, this is the correct topic.
Are you sure that one is the main (big) exe?
romaFC
Posts: 9
Joined: Thu Sep 13, 2018 7:01 pm

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

Post by romaFC »

aluigi wrote:@romaFC
If it's an UE4 game, this is the correct topic.
Are you sure that one is the main (big) exe?


I just zipped up the binaries/win64/

exe

there is no other exe files anywhere.
expect one giant pbd file with it and one 4 gig pak file along.


do you want pak filecut?


there is also

AC2-WindowsNoEditor.sig

https://ufile.io/qj4tm


file cutter on .pak files
https://ufile.io/mt9eu
romaFC
Posts: 9
Joined: Thu Sep 13, 2018 7:01 pm

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

Post by romaFC »

Zolodei wrote:romaFC, tried https://pastebin.com/ktqAvXXx


I just tried.

But without aes key it won't extract.

Running hex editor on exe.

I found VWSUATAUAVAW but its not working :oops:
aspec7878
Posts: 8
Joined: Fri Sep 22, 2017 10:36 am

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

Post by aspec7878 »

romaFC wrote:
Zolodei wrote:romaFC, tried https://pastebin.com/ktqAvXXx


I just tried.

But without aes key it won't extract.

Running hex editor on exe.

I found VWSUATAUAVAW but its not working :oops:

i.e. without a key it is unreal to unpack a file?
infogram
Posts: 20
Joined: Fri Nov 03, 2017 8:31 pm

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

Post by infogram »

lionheartuk wrote:
EDIT: kinda off-topic, but would anyone be interested in a mini-console plugin for the game? I made a quick one to mess with the cvars at runtime, works pretty well: https://i.imgur.com/cksoNTC.png
If there's any interest I'll fix it up some more and upload it somewhere.


I'd be interested in this.

I've started a new thread about it here: viewtopic.php?f=17&t=8526

Zolodei wrote:romaFC, tried https://pastebin.com/ktqAvXXx

That one will probably only work with DQXI, since I had to mod in stuff for the XOR'd data etc, it's not the latest version of the unreal_tournament_4.bms or anything like that.
You should probably try the proper one from http://aluigi.org/bms/unreal_tournament_4.bms
romaFC
Posts: 9
Joined: Thu Sep 13, 2018 7:01 pm

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

Post by romaFC »

With unreal_tournament_4.bms

I get

Image