Inspired by projects such as OpenRTC2, the nornpulse project is an attempt to reverse engineer the original c2e engine in rust-lang.
This project is very much a WIP. Currently nornpulse
only offers a way of circumventing the login system of Docking Station, which can already be achieved by established mods. The next upcoming goal is to replace the rendering engine with SDL2.
If this project succeeds then fans of the original game will be able to run Docking Station on modern cross-platform systems (with better modding support.)
As a secondary, more personal goal, this is an experiment in learning the dark art of backwards engineering and pushing the rust FFI to its breaking point.
git clone https://github.com/aneilmac/nornpulse.git
cd nonrpulse/nornpulse
rustup install nightly
rustup target add i686-pc-windows-msvc
cargo build
- Grab Docking Station from a legitimate source. Creatures Exodus, which includes Docking Station, is available on GOG.
- Locate your Docking Station installation.
- Replace
engine.exe
with the modifiedengine.exe
provided in the nornpulse folder. - Copy
nornpulse.dll
andSDL2.dll
from the build output and paste into your Docking Station installation - Run!
- Ghidra is an effective tool in helping understand the static binary.
- OllyDbg is a great assembly debugger.
This project can be described in distinct phases:
- From the top down, replace C++ ABI calls with unsafe rust functions. (In progress.)
- Remove requirement of running through
engine.exe
and remove dependency on thewinapi
crate. - Port and rearchitect unsafe rust code to safe rust code.
- Introduce new features!
The rust module nornpulse.dll
was inserted as a dependency into engine.exe
. Then the following op-codes were inserted into engine.exe:
0058744F |. FF15 48216600 CALL DWORD PTR DS:[<&nornpulse.nornpulse>; nornpuls.nornpulse_main
00587455 |. 90 NOP
00587456 |. 90 NOP
This replaces the entry point of the program after the C++ runtime has loaded.