.uasset to Text

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Fracturoid
Posts: 3
Joined: Sun Oct 23, 2016 9:42 am

.uasset to Text

Post by Fracturoid »

Game: Fractured Space (Unreal Engine 4)

I'm trying to extract values from an .uasset file. I opened it in a hex editor, found a bunch of readable strings, so I think half the work is already done.

I found

Code: Select all

42 61 73 65 41 63 63 75 72 61 63 79 44 65 67 72 65 65 73 00 56 90 FE 3A 1B 00 00 00

which my hex editor translates to

Code: Select all

BaseAccuracyDegrees.V.þ:....


So I assume this or part of this is numeric:

Code: Select all

00 56 90 FE 3A 1B 00 00 00

I know that the correct value is 0.5

Found a list of values for reference and was trying to match it to known values:

Code: Select all

AccuracyMouseMovementStrength: 2.5
AccuracyShipMovementModifier: 2.5
BaseAccuracyDegrees: 0.5
DamageFalloffAtMaxDistance: 0.9
Interval: 0.5
ProjectileLifespan: 2.5


So I found very confusing results:

Code: Select all

00 64 E2 8E 32 1D 00 00 00 = 2.5
00 95 4F 7E 53 1D 00 00 00 = 0.5
00 5E 67 01 FD 0F 00 00 00 = 2.5
00 07 40 4E F8 19 00 00 00 = 0.9
00 E6 48 5E B9 10 00 00 00 = 2.5
00 F0 1F EE 42 0C 00 00 00 = 0.5


So I guess this is the wrong approach? I'm wondering if the file is structured so that the first half of the file is just keys, and the bottom half of the file (filled with 0s) are the actual values. That's where I am so far.

File attached is the uasset I'm working on.
pay2021
Posts: 8
Joined: Wed May 31, 2017 11:15 am

Re: .uasset to Text

Post by pay2021 »

To open .uasset files you just need to download Unreal Engine editor, make a new project and copy the files you want to open in the folder of your project located in my documents, .uasset can be a model, a texture, etc.
saixo
Posts: 5
Joined: Sun May 05, 2019 9:56 pm

Re: .uasset to Text

Post by saixo »

pay2021 wrote:To open .uasset files you just need to download Unreal Engine editor, make a new project and copy the files you want to open in the folder of your project located in my documents, .uasset can be a model, a texture, etc.

Sorry for necro post but thats not true. You can't just import uasset files into your own project and edit them.
healingbrew
Posts: 2
Joined: Thu Nov 08, 2018 2:06 pm

Re: .uasset to Text

Post by healingbrew »

IDK if it's still needed information but I'll leave this here in case

It depends on engine version.

After 1.14, they split uasset files up in uasset and uexp.
This seems to be a pre-evented uasset file so they're still combined.

As far as I can tell (aside from the FPackageFileSummary header changes)

UAsset files have 3 important parts in the header.
1. An FNameEntryTag list (which is an FString + 2x 16-bit integers for case-sensitive and case-insensitive hashes)
2. An FObjectExport list (which defines the UObject models inside of the uasset file)
3. An FObjectImport list (which defines files imported by the UObject.)

An FObjectExport defines where an export starts along with some other fun metadata.
The UObject export is an array with FPropertyTags until it reaches an "None" FName, after that it instantiates the UObject with the remaining data in the export object (if it's something that initializes.) FNames are 32-bit or 64-bit numbers referencing an index in the FNameEntryTag list. FPropertyTags define the property name, type, and size.

Creating a custom parser and serializer is a ton of work because you need to implement a visitor for every type twice (once for UObject and one for an enumerable like SetProperty, ArrayProperty, MapProperty) including game specific types (which is rare.)

You can probably force the editor to import UAsset files, but it will cry about imports and probably break especially with version mismatches.

An important note with FStrings, if the length is negative the encoding is UTF16L so negate it so it becomes positive and multiply it by two to get the number of bytes.
blenux
Posts: 66
Joined: Wed Nov 15, 2017 1:30 am

Re: .uasset to Text

Post by blenux »

Yeah once they are cooked you can't just drop the uassets into a project and load them, doesn't work like that, wont show up in the project at all if you put them into your profile content directory, and will come up failed loading assets if you drag and drop in the editor itself.

But would be great if we can extract values of blueprints or something similar to that someday.