Skip to content

About

Decompiler for Unreal package files (.upk, .u, .uasset; etc), with support for Unreal Engine 1, 2, and 3

Topics

Resources

Stars

487 stars

Watchers

17 watching

Forks

Latest commit

 

History

1,108 Commits

Folders and files

Repository files navigation

Nuget Platform License

UELib

The Unreal library (UELib) provides you an API to read (parse/deserialize) contents of Unreal Engine game package files, such as .UDK and .UPK files.

The main goal of UELib is to decompile the UnrealScript byte-code, which is achieved by reconstructing the original UnrealScript source from Unreal data classes:

UObject, UField, UConst, UEnum, UProperty, UStruct, UFunction, UState, UClass,
UTextBuffer, UMetaData, UPackage

UELib is also capable of deserializing other Unreal data classes:

UFont, USound, UPalette, UTexture,
UTexture2D, UTexture2DDynamic, UTexture2DComposite, UTexture3D,
UTextureCube, UTextureFlipBook, UTextureMovie
UPrimitive, UPolys,
UComponent

Install

    Install-Package Eliot.UELib
Module Version License
Nuget GitHub
    using UELib;

    // Instantiates a FileStream and deserializes the package's header, will also auto-detected a suitable build to associate the package with.
    var package = UnrealLoader.LoadPackage(@"C:\Path\Package.upk", System.IO.FileAccess.Read);
    Console.WriteLine($"Version: {package.Summary.Version}");

    // Necessary if working with packages that have been cooked for a console platform, and IF the build was not properly auto-detected.
    // package.CookerPlatform = BuildPlatform.Console;

    // Initializes the registered classes, constructs and deserializes(loads) the package objects.
    package.InitializePackage();

    // Now we can iterate over all the initialized objects, but beware! This includes fake-import objects.
    foreach (var obj in package.Objects)
    {
        // If positive then we have an export, or import if negative, if null, we are working with a 'None' object, but this shouldn't occur here.
        if ((int)obj > 0)
        {
            Console.WriteLine($"Export:");
        }
        else if ((int)obj < 0)
        {
            Console.WriteLine($"Import:");
        }

        Console.WriteLine($"ObjectIndex: {(int)obj}");
        Console.WriteLine($"Name: {obj.Name}");
        Console.WriteLine($"Class: {obj.Class?.Name}");
        Console.WriteLine($"Outer: {obj.Outer}");
        Console.WriteLine($"Path: {obj.GetReferencePath()}");
    }

If you're looking to modify the library for the sole purpose of modding UE Explorer consider forking UE Explorer instead (UELib is linked as a sub-module)

Compatible Games

UELib supports these kinds of content, but may vary from game to game:

  • Script
  • Audio
  • Texture (No .tfc support)
  • Model
  • Animation

Important

Audio and Textures are expected to work for most games, but has not been confirmed.

Name Engine Package State Script Audio Texture
Unreal Engine 1 ✅ ✅ ✅
Unreal 100-226 61/000 ✅ ✅ ✅
Hired Guns 216 61/000 ✅ ✅ ✅
Star Trek: The Next Generation: Klingon Honor Guard 219 61/000 ✅ ✅ ✅
X-COM: Alliance 200-220 61/000 Bad output at the start of functions (BeginFunctionToken) ✅ ✅ ✅
Dr. Brain: Action Reaction 224 63-68/000 ✅ ✅ ✅
Nerf Arena Blast 225 63-68/000 ✅
The Wheel of Time 225:WoT 63-68/000 ✅ ✅ ✅
Unreal Mission Pack: Return to Na Pali 226b 68/000 ✅ ✅ ✅
Unreal Tournament 338-436 68-69/000 ✅ ✅ ✅
Deus Ex 400-436 68/000 ✅
Jazz Jackrabbit 3D 400 68/000 ✅ ✅ ✅
Duke Nukem Forever (2001) 613 68/002 UStruct offsets are off leading to bad output code ✅
Rune 400 69/000 ✅
Unrealty 405 69/000 ✅
Adventure Pinball: Forgotten Island 420 69/000 ✅ ✅ ✅
X-COM: Enforcer 420 69/000 ✅ ✅ ✅
Tactical Ops: Assault on Terror 436 69/000 ✅
Star Trek: Deep Space Nine: The Fallen 338 73/000 ✅
Harry Potter and the Sorcerer's Stone 436 76/000 ✅
Harry Potter and the Chamber of Secrets 433 79/000 ✅
Disney's Brother Bear 433 80/000 Link ✅
Mobile Forces 436 81-83/000, 69 ✅
Clive Barker's Undying 420 72-85/000 Versions 72 to 83 are not auto detected. ✅ ✅ ✅
Deus Ex: Invisible War 777:Flesh 95/069 Thanks in part to @hanfling; LinkedData not supported ✅
Thief: Deadly Shadows 777:Flesh 95/133 Thanks in part to @hanfling; LinkedData not supported ✅ ❌
Unreal Engine 2 ✅ ✅ ✅
XIII 829 100/058 ✅
Tom Clancy's Splinter Cell 829 100/017 ✅
Tom Clancy's Splinter Cell: Pandora Tomorrow 829 102/028:SCX PC offline version ✅
Tom Clancy's Splinter Cell: Chaos Theory 829 100/120:SCX, 175/000:ShadowStrike (PS3) version and (PC) demo version, , Versus mode not supported ✅ ✅
Tom Clancy's Splinter Cell: Double Agent 829 100/167:SCX, 275/000:ShadowStrike (PC) Offline mode version, Online mode not supported ✅
Tom Clancy's Splinter Cell: Blacklist 829 102/116:LEAD In part thanks to @shryder. Third-party decompression is required ✅
Tom Clancy's Rainbow Six 3: Raven Shield 600-927 118/012-014 ✅ ✅
Magic: The Gathering - Battlegrounds 926 118/000 ✅ ✅ ✅
Postal 2: Paradise Lost 1417 118/002 ✅
Unreal Tournament 2003 1077-2225 119/025 ✅ ✅ ✅
Devastation 600-? 118-120/004-008 ✅ ✅ ✅
Dead Man's Hand 2110 123/002 ✅ ✅ ✅
Unreal II: The Awakening 829-2001 126/2609 ✅
Unreal II: eXpanded MultiPlayer 2226 126/000 Custom features are not decompiled ✅
Desert Thunder 2226 126/000 ✅
Marine Heavy Gunner: Vietnam 2226 126/000 ✅ ✅ ✅
Land of the Dead: Road to Fiddler's Green 2226 126/001 ✅ ✅ ✅
Netherworld: Beyond Time I Stand 2226 127/002 Bad property deserialization ✅ ✅ ✅
Unreal Tournament 2004 3120-3369 128/029 ✅ ✅ ✅
Red Orchestra: Ostfront 41-45 3323-3369 128/029 ✅ ✅
Killing Floor 3369 128/029 ✅ ✅
D.M.Z.: North Korea 3369 128/029 ✅ ✅ ✅
Close Quarters Conflict 3369 128/029 ✅ ✅ ✅
Outlaw Chopper 3369 128/029 ✅ ✅ ✅
Marine Sharpshooter 3 3369 128/029 ✅ ✅ ✅
Marine Sharpshooter 4: Locked and Loaded 3369 128/029 ✅ ✅ ✅
Mission Biotech 3369 128/029 ✅ ✅ ✅
America's Army 2 3339 128/032:033 2.5, 2.6, 2.8 ✅
America's Army (Arcade) 3339 128/032 2.6 ✅
Harry Potter and the Prisoner of Azkaban 2226 129/000 Link ✅
Shrek 2 2226 129/000 ✅
Shark Tale 2226 129/003 ✅
Lemony Snicket's A Series of Unfortunate Events 2226 129/003 ✅
Combat: Task Force 121 2110 129/010 ✅ ✅ ✅
Shadow Ops: Red Mercury 2110 129/010 ✅ ✅ ✅
World War II Combat: Road to Berlin 2110 129/010 ✅ ✅ ✅
World War II Combat: Iwo Jima 2110 129/010 ✅ ✅ ✅
Swat 4 2226:Vengeance 129/027 ✅
Vanguard: Saga of Heroes 2226 129/035 ✅
Stargate SG1: The Alliance 4180 130/004 ✅
Tribes: Vengeance 2226:Vengeance 130/027 ✅
Bioshock 2226:Vengeance 130-141/056 ✅
Arctic Combat 3369 134/038-039 Thanks to @EDITzDev. Third-party decompression is required ✅ ✅ ✅
Star Wars: Republic Commando 2226 134-159/001 ✅
The Regiment 2226 136/000 ✅ ✅ ✅
Men of Valor 926 137/000 PC ✅
Bioshock 2 2226:Vengeance 143/059 ✅
Advent Rising 2226 143-146/007 ✅ ✅ ✅
Unreal Championship 2: Liandri Conflict 3323 151/002 Third-party ✅
Duke Nukem Forever (2011) Originally UE1 and upgraded to UE2&3 156/036 Extraction is required ✅ ❌ ✅
Unreal Engine 3 ✅ ✅ ✅
RoboHordes Unknown 198-200/000 ✅ ✅ ✅
Tom Clancy's Rainbow Six: Vegas Unknown 241/066 ✅
Tom Clancy's Rainbow Six: Vegas 2 Unknown 241/071 ✅
Tom Clancy's EndWar Unknown 329/000 ✅
Roboblitz 2306 369/006 ✅ ✅ ✅
Stranglehold 2605 375/025 ✅ ✅
TNA Impact! 2605 380/035 Xenon (platform must be set to PC) ✅ ✅
Mass Effect (Xbox 360) 2674 391/092 Xenon ✅
Warmonger: Operation Downtown Destruction 2859 419/003 ✅
Medal of Honor: Airborne 2859 421/011 ✅ ✅
Frontlines: Fuel of War 2917 433/052 ✅
Army of Two 3004 445/079 Overall quality has not been verified ✅
Mortal Kombat Komplete Edition 2605 472/046 ✅
Stargate Worlds 3004 486/007 ✅
Gears of War 3329 490/009 ✅
Mass Effect (Windows) 3240 491/1008(~112) PC ✅
Huxley 3240 496/016-023 Contributed by @EDITzDev ✅ ✅
Robert Ludlum's The Bourne Conspiracy 511/039 ✅
Transformers: War for Cybertron 511/144,145 PC, PS3, Xenon ✅
Unreal Tournament 3 3809 512/000 ✅
Mirrors Edge 3716 536/043 ✅
Alpha Protocol 3857 539/091 ✅
APB: All Points Bulletin 3908 547/028-032 ✅
X-Men Origins: Wolverine 4206 568/101 Overall quality has not been verified ✅
Gears of War 2 4638 575/000 ✅
CrimeCraft 4701 576/005 ✅
Batman: Arkham Asylum 4701 576/21 Contributed by @etkramer ✅
Medal of Honor (2010) 100075??? 581/058 Bad byte-codes ✅ ❌
Saw 4869 584/003 ✅ ✅ ✅
Singularity 4869 584/126 ✅
MoonBase Alpha 4947 587/000 ✅
The Exiled Realm of Arborea or TERA 4206 610/014 ✅
Monday Night Combat 5697 638/000 ✅
DC Universe Online 5859 638/6405 Contributed by @theFoof ✅
Unreal Development Kit 5860-12791 664-868 ✅ ✅ ✅
Blacklight: Tango Down 6165 673/002 ✅ ✅
Saw II: Flesh & Blood 6165 673/004 Unsupported, but loadable ❌ ❌ ❌
Dungeons & Dragons: Daggerdale 6165 674/000 ✅
Dungeon Defenders 6262 678/002 ✅ ✅
Mass Effect 3 (Windows) 6383 684/194 PC (platform must be set to Console) ✅
Mass Effect: Legendary Edition (Windows) 6383 684/171 PC (platform must be set to Console) ✅
Alice Madness Returns 6760 690/000 ✅
The Ball 6699 706/000 ✅
Game of Thrones 6829 727/000 ✅
Bioshock Infinite 6829 727/075 ✅
Bulletstorm 7052 742/029 ✅
Red Orchestra 2: Heroes of Stalingrad 7258 765/Unknown ✅
Rising Storm 2: Vietnam 7258 765/771 ✅
Aliens: Colonial Marines 7422 787/047 ✅ ✅
Infinity Blade 1 7595 788/001 Console ✅
Dishonored 9099 801/030 ✅
Tribes: Ascend 7748 805/Unknown ✅
Tony Hawk's Pro Skater HD ✅
Rock of Ages 7748 805/000 ✅
Batman: Arkham City 7748 805/101 ✅
Batman: Arkham Origins 7748 807/138 Not verified ✅
Sanctum 7876 810/000 ✅
AntiChamber 7977 812/000 ✅
Waves 8171 813/000 ✅
Super Monday Night Combat 8364 820/000 ✅
Gears of War 3 8653 828/000 ✅
Quantum Conundrum 8623 832/32870 ✅
Borderlands 4871 Unknown ✅
Borderlands 2 8623/0023 832/056 ✅
Borderlands: Game of the Year Enhanced 5001/0001 832/058 ✅
Remember Me 8623 832/021 ✅
Gears of War: Ultimate Edition 3340 835/056 Actual package version is 490; thanks to @PaoloTK ✅
Gears of War: Reloaded 3340 835/076 Actual package version is 490; thanks to @PaoloTK ✅
The Haunted: Hells Reach 8788 841/000 ✅
Asura's Wrath 8788 841/000 -zlib; platform needs to be set to console. ✅
Blacklight Retribution 8788-10499 841-864/002 ✅ ✅
Infinity Blade 2 9059 842-864/001 Console ✅
Q.U.B.E 8916 845/000 ✅
DmC: Devil May Cry 8916 845/004 ✅
XCOM: Enemy Unknown 8916 845/059 ✅
XCOM 2: War of the Chosen 8916 845/120 Contributed by @robojumper ✅
Gears of War: Judgement 10566 846/000 ✅
Transformers: Fall of Cybertron 846(~587)/181 ✅
Deadpool 846(~587)/181 ✅
InMomentum 8980 848/000 ✅
Unmechanical 9249 852/000 ✅
Star Wars: First Assault 9249 852/008 Xbox360; platform needs to be set to console ✅ ❔ ✅
Deadlight 9375 854/000 ✅
Land of the Dead 9375 854/000 ✅
Borderlands Legends 9505 859/000 iOS; platform needs to be set to console ✅
Ravaged 9641 859/000 ✅
The Five Cores 9656 859/000 ✅
Painkiller HD 9953 860/000 ✅
Chivalry: Medieval Warfare 10246 860/000 ✅
Hawken 10681 860/004 ✅
Rocket League 10897 867/009 (868/032 has not been tested) Decryption required ✅
Styx: Master of Shadows 10499 860/004 ✅
Abyss Odyssey 10246 861/000 ✅ ✅ ✅
Batman: Arkham Knight 863/32995 Not verified ✅
Rocket League 10897 867/009 (868/032 has not been tested) Decryption required ✅
Gigantic: Rampage Edition 19100 867/010 Contributed by @HyenaCoding ✅
Infinity Blade 3 868/000 Console ✅
Guilty Gear Xrd 10246 868/003 Decryption required ✅
Outlast 12046 868/003 ✅
Might & Magic Heroes VII 12161 868/004 (Signature and custom features are not supported) ✅
Bombshell 11767 870/000 ✅
Orcs Must Die! Unchained 20430 870/000 ✅
Sudden Attack 2 10897 870/108-109 ✅ ✅ ✅
Gal*Gun: Double Peace 10897 871/000 ✅
Battleborn 8623/1055 874/078 ✅
A Hat in Time 12097 877-893/005 Contributed by @Un-Drew ✅
Bulletstorm: Full Clip Edition 12212 877/041 ✅
D4: Dark Dreams Don't Die 10246 888(~861)/001 PC ✅ ✅ ✅
Blue Estate The Game 10246 893/000 ✅
Shadow Complex Remastered 10897 893/001 ✅
Borderlands 2 VR 8637/0029 895/046 ✅
Soldier Front 2 6712 904/009 ✅
Rise of the Triad 10508 Unknown ✅
Sherlock Holmes: Crimes and Punishments 10897 Unknown ✅
Alien Rage 7255 Unknown ✅

Beware, opening an unsupported package could crash your system! Make sure you have saved everything before opening any file!

Note UE3 production-ready packages are often compressed and must first be decompressed, Unreal Package Decompressor by Gildor is a tool that can decompress most packages for you; for some games you need a specialized decompressor, see for example RLUPKTool.

How to contribute

  • Open an issue
  • Or make a pull-request by creating a fork of this repository, create a new branch and commit your changes to that particular branch, so that I can easily merge your changes.

Want to add support for a game? See adding support for new Unreal classes

Made with the help of UELib

Special thanks to

About

Decompiler for Unreal package files (.upk, .u, .uasset; etc), with support for Unreal Engine 1, 2, and 3

Topics

Resources

Stars

487 stars

Watchers

17 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages