An open API service indexing awesome lists of open source software.

https://github.com/iartorias/noceg

NoCEG - Steamworks CEG DRM Resolver
https://github.com/iartorias/noceg

ceg cpp drm patcher steam steamworks

Last synced: 5 days ago
JSON representation

NoCEG - Steamworks CEG DRM Resolver

Awesome Lists containing this project

README

          

# NoCEG - Steamworks CEG DRM Resolver
[![GitHub All Releases](https://img.shields.io/github/downloads/iArtorias/noceg/total.svg)](https://github.com/iArtorias/noceg/releases)
> Patch Valve's CEG DRM for legally owned games to ensure long-term accessibility and preservation.

> [!IMPORTANT]
> NoCEG only works with legally owned games. The game executable that Steam downloads only works with your account and system. NoCEG needs that information to work.

> [!CAUTION]
> This should only be used for personal backups. The final executable still has your hardware info, and is illegal to distribute.
---

## Overview

**NoCEG** is a toolkit designed to fully patch out Valveโ€™s **CEG (Custom Executable Generation)** DRM from *legally purchased* Steam games. Its main purpose is **digital preservation** ensuring that games remain playable even after CEG servers are no longer available.

---

## Components

This repository includes **three core tools** required for resolving and patching CEG protection:

### ๐Ÿ” `noceg_signatures`
> A command-line tool to scan the executable for CEG related functions and export the required information to `noceg.json`.

### ๐Ÿง  `noceg`
> A dynamic library that uses the vectored exception handling to resolve CEG protected functions (both constant and stolen/masked ones) during runtime using the data from the previously generated `noceg.json`.

### ๐Ÿงฐ `noceg_patcher`
> An utility that applies the final patch to a CEG protected executable.

---

## ๐Ÿ› ๏ธ Usage

### **1. Download the latest release**

Get the latest binaries from the [Releases](https://github.com/iArtorias/noceg/releases) page.

---

### **2. Signature extraction**
Run the following command:
```bash
noceg_signatures.exe "Path\To\GameExecutable.exe"
```

Or simply **drag and drop** the executable onto `noceg_signatures.exe`.

---

### **3. Inject the runtime library**

- Rename the original `steam_api.dll` to `steam_api_org.dll`.
- Copy `steam_api.dll` from the NoCEG package into the gameโ€™s directory.
- Place the generated `noceg.json` file into the same folder.

Now, launch the game. A confirmation window should appear:
> โœ… **"Successfully finished the task!"**

### โš ๏ธ Special cases for certain games

#### `ShouldRestart` option
The following titles require `"ShouldRestart": true` in `noceg.json`:

- Homefront
- The Darkness II
- Star Trek
- F.E.A.R. 3
- Risen 2

To enable this option, update your configuration from:

```json
"ShouldRestart": false
```
to
```json
"ShouldRestart": true
```

#### `BreakpointType` option
Some games (e.g. `Duke Nukem: Forever`) use integrity checks that can detect software breakpoints, which may lead to incorrect values.
If this occurs, switch to hardware breakpoints by updating:

```json
"BreakpointType": 1
```
to
```json
"BreakpointType": 2
```

---

### **4. Final Patching**

Drag the original executable onto `noceg_patcher.exe`.
A modified version will be generated with a suffix like `_noceg.exe` or `_noceg.dll`.

---

### **5. Cleanup**

- Delete `NoCEG`โ€™s `steam_api.dll`.
- Rename `steam_api_org.dll` back to `steam_api.dll`.

---

## ๐ŸŽฎ Supported games (tested)

```txt
โœ” 007โ„ข Legends
โœ” Aliens: Colonial Marines
โœ” Aliens vs. Predatorโ„ข
โœ” Bionic Commando
โœ” Call of Dutyยฎ: Black Ops
โœ” Call of Dutyยฎ: Modern Warfare 2
โœ” Call of Dutyยฎ: Modern Warfare 3
โœ” Deadpool
โœ” DeathSpank
โœ” DeathSpank: Thongs Of Virtue
โœ” Duke Nukem: Forever
โœ” DiRT Showdown
โœ” DiRT Showdown Demo
โœ” F1 2012โ„ข
โœ” F1 Race Stars
โœ” F.E.A.R. 3
โœ” GRID 2
โœ” Homefront
โœ” Homefront Demo
โœ” Just Cause 2
โœ” Just Cause 2 Demo
โœ” Kane & Lynch 2: Dog Days
โœ” Kane & Lynch 2: Dog Days Demo
โœ” Lara Croft and the Guardian of Light
โœ” Lara Croft and the Guardian of Light Demo
โœ” Madballs in...Babo: Invasion
โœ” Madballs in...Babo: Invasion Demo
โœ” Mafia II
โœ” Mafia II Demo
โœ” Prototype 2
โœ” Risen 2
โœ” Risen 2 Demo
โœ” Saints Row: The Third
โœ” Saints Row IV Inauguration Station
โœ” Sid Meier's Ace Patrol
โœ” Sid Meier's Ace Patrol: Pacific Skies
โœ” Sid Meier's Civilization V
โœ” Sid Meier's Civilization V Demo
โœ” Sniper Elite V2
โœ” Sniper Elite Nazi Zombie Army
โœ” Sniper Elite Nazi Zombie Army 2
โœ” Spec Ops: The Line
โœ” The Amazing Spider-Man
โœ” The Bureau: XCOM Declassified
โœ” The Darkness II
โœ” The Darkness II Demo
โœ” The Lord of the Rings: War in the North
โœ” Viking: Battle for Asgard
โœ” Warhammer 40,000: Space Marine
โœ” Warhammer 40,000: Space Marine Demo
โœ” XCOM: Enemy Unknown
```

---

## ๐Ÿšซ Unsupported titles

> These are using allocated buffers for CEG protected functions and are **not supported** at this point:

- โŒ F1 2013โ„ข / F1 2014โ„ข
- โŒ Call of Dutyยฎ: Black Ops II
- โŒ Sid Meier's Civilizationยฎ: Beyond Earthโ„ข
- โŒ XCOM: Enemy Within

---

## Compilation & Dependencies

To compile this project from source, use **Visual Studio 2022**.

This project uses the following open-source libraries:

- [`nlohmann/json`](https://github.com/nlohmann/json) โ€“ JSON for Modern C++
- [`mem`](https://github.com/0x1F9F1/mem) โ€“ Memory utility helpers
- [`zydis`](https://github.com/zyantific/zydis) โ€“ Disassembler framework

---

## Why NoCEG?

- Preserve access to the games long after CEG DRM servers shut down.
- Designed exclusively for **legally owned** copies of games.
- Reverse-engineered with care for accuracy and modularity.

---

## ๐Ÿ“„ License

Check [LICENSE](LICENSE).

---

## ๐Ÿ’ฌ Disclaimer

> โš ๏ธ **This tool is intended solely for educational and preservation purposes.**
> Please ensure compliance with local laws and terms of service.

---