A Python SteamStub DRM unpacker supporting x86 and x64 executables across multiple stub variants.
| Variant | Architecture |
|---|---|
| SteamStub 2.0 | x86 |
| SteamStub 2.1 | x86 |
| SteamStub 3.0 | x86, x64 |
| SteamStub 3.1 | x86, x64 |
- Python 3.8+
- No third-party dependencies required
python3 unstub.py <file> [options]
| Flag | Description |
|---|---|
--keepbind |
Keep the .bind section in the output |
--keepstub |
Keep the DOS stub (default: zeroed) |
--dumppayload |
Dump the stub payload to disk |
--dumpdrmp |
Dump SteamDRMP.dll to disk |
--realign |
Realign sections after .bind removal (default: off) |
--recalcchecksum |
Recalculate the PE checksum |
--quiet |
Suppress debug output |
python3 unstub.py game.exe
python3 unstub.py game.exe --keepbind --dumppayload
python3 unstub.py game.exe --dumpdrmp --recalcchecksum
The unpacked file is written alongside the input as <filename>.unpacked.exe.
unstub.py # CLI entry point
unstub/
crypto.py # XOR, XTEA, and AES-CBC crypto primitives
pe.py # PE32/PE64 parser and builder
base_unpacker.py # Shared unpacking pipeline (v3.x)
utils.py # Pattern matching, alignment, PE checksum
x86.py # x86 instruction decoder
unpackers/
variant20.py # SteamStub 2.0 unpacker
variant21.py # SteamStub 2.1 unpacker
variant30.py # SteamStub 3.0 unpacker
variant31.py # SteamStub 3.1 unpacker