Skip to content

Commit 06da171

Browse files
committed
Updated the guide
1 parent a5810b0 commit 06da171

File tree

3 files changed

+32
-109
lines changed

3 files changed

+32
-109
lines changed

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112

113113
- [Guides]()
114114
- [Fixing missing AOBs](./guides/fixing-compatibility-problems.md)
115+
- [Fixing missing AOBs (Advanced)](./guides/fixing-compatibility-problems-advanced.md)
115116
- [Generating UHT headers](./guides/generating-uht-compatible-headers.md)
116117
- [Creating a C++ Mod](./guides/creating-a-c++-mod.md)
117118
- [Installing a C++ Mod](./guides/installing-a-c++-mod.md)

docs/guides/fixing-compatibility-problems-advanced.md

Lines changed: 30 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,53 @@
11
# Fixing Missing AOBs (Advanced & In-Depth)
22

3-
When UE4SS fails to properly launch due to missing AOBs (Array of Bytes signatures), you can provide custom AOBs and callback functions using Lua. Doing so, however, requires a level of reverse engineering knowledge and tooling setup that may feel complex at first. This guide expands upon the original instructions, providing even more detail, context, and recommended best practices.
3+
When UE4SS fails to properly launch due to missing AOBs (Array of Bytes signatures), you can provide custom AOBs and callback functions using Lua.
4+
Doing so, however, requires a level of reverse engineering knowledge and tooling setup that may feel complex at first.
5+
This guide expands upon the original instructions, providing more detail, some context and tips.
46

57
## Prerequisites
68

79
- **Knowledge of Basic Reverse Engineering Concepts:**
810
You should have a general idea of what a signature (AOB) is, how to use a debugger, and how to navigate memory in x64dbg.
9-
10-
- **Understanding ‘root directory’ and ‘working directory’:**
11-
- **Root directory:** The directory containing `ue4ss.dll`.
12-
- **Working directory:** This can be either the root directory **or** a game-specific directory such as `<root directory>/SatisfactoryEarlyAccess`.
1311

1412
- **Familiarity with UE4SS Setup & Directories:**
15-
Make sure you know where `UE4SS_Signatures` folder should be created (it should be next to `ue4ss.dll` or in a game-specific working directory as described above).
13+
Make sure you know where the `UE4SS_Signatures` folder should be created (it should be next to `ue4ss.dll` or in a game-specific working directory).
1614

1715
- **Preparation and Tools Installed:**
1816
- **Epic Games Launcher & Unreal Engine:** For creating a “blank shipped game” environment with the correct engine version.
1917
- **x64dbg:** A debugger tool for Windows (https://x64dbg.com/).
2018
- **(Optional) Baymax Tools:** A plugin to help generate signatures easily.
21-
- **(Optional) Swiss Army Knife (by Nukem9):** For extracting signatures.
19+
- **(Optional) Swiss Army Knife (by Nukem9):** For more easily extracting signatures with correct wildcards.
2220

23-
## Why Create Your Own AOBs?
21+
## When is this needed, and why ?
2422

25-
When UE4SS updates or when you attempt to mod a game with a newer or unusual engine build, official AOB signatures inside UE4SS may fail. In these cases, providing your own AOBs and callbacks allows UE4SS to locate critical engine functions and global variables in memory and resume normal operation.
23+
Some games don't use Unreal Engine with its default configuration, and we only support the default configuration out of the box.
24+
Anything that affects the code generated by the compiler, including the devs using Clang instead of MSVC, can make our built-in AOBs no longer be valid.
25+
These AOBs are used to find functions and variables that are critical for UE4SS to work.
2626

2727
## High-Level Overview
2828

2929
1. **Identify Which Signatures Are Missing:** Determine which functions or variables UE4SS cannot find (e.g., GUObjectArray, GMalloc, FName or FText constructors).
30-
2. **Set Up a Reference Environment:** Create a blank Unreal Engine shipped game with debug files (PDBs) that matches your game’s Unreal Engine version. This environment helps you identify function signatures cleanly.
31-
3. **Reverse Engineer and Extract AOBs:** Using x64dbg (and optional plugins), open the shipped game and locate the desired function in memory. Copy out the unique bytes that form a reliable signature.
30+
2. **Set Up a Reference Environment:** Create a blank Unreal Engine game (using the Shipping target) with debug files (PDBs) that uses the same Unreal Engine version as your game. This environment helps you identify function signatures cleanly.
31+
3. **Reverse Engineer and Extract AOBs:** Using x64dbg (and optional plugins), open the blank game and locate the desired function in memory. Copy out the unique bytes that form a reliable signature. This signature should be properly wildcarded, if it's not, it won't be found in your game.
3232
4. **Apply Your Signatures to the Actual Game:** Attach x64dbg to the target game, find the matching bytes, and confirm that the signature you extracted matches code in the game you want to mod.
3333
5. **Create a Lua Script:** Write a Lua file in `UE4SS_Signatures` to tell UE4SS what AOB pattern to search for (through `Register`) and what final address to return (through `OnMatchFound`).
3434

3535
## Finding AOBs: A More Detailed Explanation
3636

3737
> [!CAUTION]
38-
> Reverse engineering these signatures isn’t trivial. You may need to step outside the scope of this guide, read reverse-engineering tutorials, or ask for community support. The steps below are a starting point, not a complete primer on reverse engineering.
38+
> Reverse engineering these signatures isn’t trivial. You may need to step outside the scope of this guide, read reverse-engineering tutorials, or ask for community support. The steps below are a starting point, not a complete guide on reverse engineering.
3939
4040
### Step 1: Determine Your Game’s Unreal Engine Version
4141

42-
UE4SS tries to detect the engine version automatically. If you need to verify:
42+
UE4SS tries to detect the engine version automatically. If you need to verify, the following steps usually work:
4343

4444
- Right-click on the game’s `.exe` file (often in `Binaries` folder).
4545
- Select **Properties** -> **Details** tab.
4646
- Look for the “File Version” or “Product Version” field, which often correlates to the Unreal Engine version.
4747

48-
For example: If it says `5.3.2.0`, it likely corresponds to UE 5.3.2.
48+
For example: If it says `5.3.2.0`, it likely corresponds to UE 5.3.2.
49+
In rare cases, the version will either be empty, or it will refer to the game version instead of the engine version.
50+
Note that the last number doesn't usually matter, so if your game is using UE 5.3.2, your blank game can generally use any 5.3 version.
4951

5052
### Step 2: Installing the Matching Unreal Engine Version
5153

@@ -56,7 +58,7 @@ For example: If it says `5.3.2.0`, it likely corresponds to UE 5.3.2.
5658

5759
1. Launch the installed Unreal Engine version.
5860
2. In the New Project window, select the **Games** tab -> **Blank** template.
59-
- Uncheck “Starter Content” if you prefer a minimal project.
61+
- Uncheck “Starter Content” because it's not needed, and unchecking this will save time and space.
6062
- Name your project and specify a directory.
6163
3. Once created, open **Platforms** -> **Packaging Settings**, and enable “Include Debug Files in Shipping Builds”.
6264
4. From **Platforms** -> **Windows**, select “Shipping” configuration (or whichever build matches your target game’s build type).
@@ -84,6 +86,10 @@ You need to know which function or variable you’re trying to match in your tar
8486

8587
### Step 6: Locating the Function in x64dbg
8688

89+
Note that there's a bug in x64dbg where navigating to code or memory from the symbols tab sometimes doesn't work properly.
90+
If you're navigating and not seeing what you expect, it's worth restarting x64dbg and trying again.
91+
You can also try copy the address from the symbols tab and manually navigate to it in the correct panel in the CPU tab.
92+
8793
1. In x64dbg, switch to the **Symbols** tab.
8894
2. In the left pane, select the `.exe`.
8995
3. In the right pane, search for the function name (e.g., `FMemory::Free`).
@@ -93,7 +99,7 @@ You need to know which function or variable you’re trying to match in your tar
9399

94100
Once you’ve identified the start of the function, you need to copy a unique sequence of bytes:
95101

96-
1. Consider installing [Baymax Tools](https://github.com/sicaril/BaymaxTools) for x64dbg to ease signature extraction.
102+
1. Consider installing [Baymax Tools](https://github.com/sicaril/BaymaxTools) or Swiss Army Knife for x64dbg to ease signature extraction.
97103
2. Highlight a set of instructions at the start of the function.
98104
- Right-click -> **Copy** -> **Selection (Bytes only)** to get a raw byte sequence.
99105
- With Baymax Tools: Right-click -> **Baymax Tools** -> **Copy Signature** for a ready-made signature pattern.
@@ -116,7 +122,8 @@ Now that you have a reference signature, you need to find it in your target game
116122
- Try patterns generated by Baymax Tools.
117123
- Compare and contrast instructions between the blank project and the actual game to locate a similar code region.
118124

119-
If you find a match, you’ve identified the address that corresponds to the target function or variable in the actual game. If you can’t find it, you may need to refine your signature, pick a different part of the function, or ask for community help (UE4SS Discord or GitHub Issues).
125+
If you find a match, you’ve identified the address that corresponds to the target function or variable in the actual game.
126+
If you can’t find it, you may need to refine your signature, pick a different part of the function, or ask for community help (UE4SS Discord or GitHub Issues).
120127

121128
### Step 9: Applying the Signature in UE4SS
122129

@@ -154,48 +161,12 @@ end
154161
- That your AOB is correct and unique.
155162
- That `OnMatchFound` returns the correct final address.
156163

157-
If still stuck, consider posting detailed steps, logs, and code snippets to the UE4SS community channels. The more detail you provide, the more likely someone can guide you to a solution.
158-
159-
## What ‘OnMatchFound’ Should Return
160-
161-
Recap of the required returns for each known signature type:
162-
163-
- **GUObjectArray:** Return the exact address of the `GUObjectArray` global variable.
164-
- **FName_ToString:** Return the start address of the `FName::ToString` function.
165-
- **FName_Constructor:** Return the start address of `FName::FName`. Multiple versions might exist (e.g., for `char*` and `wchar_t*`), but UE4SS validates the correct one internally.
166-
- **FText_Constructor:** Return the start address of `FText::FText`.
167-
- **StaticConstructObject:** Return the start address of the `StaticConstructObject_Internal` global function.
168-
- **GMalloc:** Return the address of the global `GMalloc` variable. Typically found by scanning around `FMemory::Free` and resolving a MOV instruction.
169-
170-
## Example Scripts
171-
172-
### Direct Scan Example
173-
174-
```lua
175-
function Register()
176-
return "48 8B C4 57 48 83 EC 70 80 3D ?? ?? ?? ?? ?? 48 89"
177-
end
164+
If still stuck, consider posting detailed steps, logs, and code snippets to the UE4SS community channels.
165+
The more detail you provide, the more likely someone can guide you to a solution.
178166

179-
function OnMatchFound(MatchAddress)
180-
return MatchAddress
181-
end
182-
```
167+
## What ‘OnMatchFound’ Should Return, and Example Scripts
183168

184-
### Indirect Scan Example
185-
186-
```lua
187-
function Register()
188-
return "41 B8 01 00 00 00 48 8D 15 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? E9"
189-
end
190-
191-
function OnMatchFound(MatchAddress)
192-
local InstrSize = 0x05
193-
local JmpInstr = MatchAddress + 0x14
194-
local Offset = DerefToInt32(JmpInstr + 0x1)
195-
local Destination = JmpInstr + Offset + InstrSize
196-
return Destination
197-
end
198-
```
169+
[See the regular guide](./fixing-compatibility-problems.md#how-to-setup-your-own-aob-and-callback).
199170

200171
## Tips, Tricks, and Troubleshooting
201172

@@ -205,4 +176,5 @@ end
205176
- **Check Offsets Carefully:** Off-by-one or incorrect indexing is a common issue. Double-check your calculations.
206177
- **Manual Verification:** Sometimes running the blank project again in x64dbg and comparing with the target game’s memory can highlight discrepancies.
207178

208-
By following these expanded steps and leveraging the provided tools, you’ll have a more comprehensive understanding of how to fix missing AOBs with UE4SS. Although still complex, this extended guide should help clarify the process and offer practical insights for both beginners and experienced modders venturing into reverse engineering territory.
179+
By following these expanded steps and leveraging the provided tools, you’ll have a more comprehensive understanding of how to fix missing AOBs with UE4SS.
180+
Although still complex, this extended guide should help clarify the process and offer practical insights into the reverse engineering territory.

docs/guides/fixing-compatibility-problems.md

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -20,57 +20,7 @@ Since the process is quite complicated, here will just cover the general steps y
2020
5. Open your game's memory in x64dbg and search it for the same block of bytes
2121
6. If you find it, you can use the [swiss army knife](https://github.com/Nukem9/SwissArmyKnife) tool to extract the AOB for it which you can use in a simple script such as example [here](#example-script-simple-direct-scan)
2222

23-
### Context and definitions
24-
25-
Some context and definitions:
26-
27-
In this context, a `Signature` refers to a unique sequence or pattern of bytes used to identify a function or piece of code within a binary, such as specific instructions or constants that are unlikely to appear elsewhere. It serves as a recognizable "fingerprint" to locate a particular routine during reverse engineering or patching.
28-
29-
In contrast, a `Block of Bytes` is simply a contiguous sequence of raw data or instructions without any specific identification purpose. A block of bytes may or may not represent anything meaningful or unique, whereas a signature is carefully chosen to reliably distinguish a particular function or code segment.
30-
31-
`RIP (Instruction Pointer Register)` is a register in x86-64 architecture that holds the address of the next instruction to be executed. It plays a key role in managing program flow, enabling the CPU to keep track of where it is in the program code.
32-
33-
Now for each step in more detail (thanks for `TimeMaster` for these steps).
34-
35-
### Making a blank shipped game
36-
37-
1. Get your game UE version. UE4SS detects it. But it can also be checked by using right-click on the `.exe` in `Binaries`, opening properties and checking on the details tab
38-
2. In the Epic Games launcher at the left side, go to Unreal Engine -> Library tab at the top and install engine version for the engine version for your game
39-
3. Once installed launch Unreal Engine. Games tab -> Select Blank -> Uncheck Starter Content (Optional to set a Project Name / change location) -> Create
40-
4. Press Platforms button on the top bar -> Packaging Settings -> Check `Include Debug Files in Shipping Builds`
41-
5. Press Platforms button on the top bar -> Windows -> Select `Shipping` (or the one that applies to your game build) -> Package Project and select a folder
42-
6. Check that the newly packaged blank project contains a `.exe` along with a `.pdb` in `Binaries` in the selected folder
43-
44-
### Reading the game's memory using x64dbg
45-
46-
1. Install [x64dbg](https://x64dbg.com/)
47-
2. Run the `.exe` at the root folder of the newly packaged blank project (running the `.exe` in `Binaries` might throw an error, running from root works too either way)
48-
3. Open x64dbg -> File -> Attach -> Select the newly packaged blank project `.exe` (the one with the path at `Binaries`)
49-
50-
### Look for the signature you need
51-
52-
1. (Optional but recommended) Connect Epic Games with Github. Login in the Epic Games Website -> Manage Account -> Apps and Accounts -> Github -> Once done, check email and accept invitation to the UE project
53-
2. (Optional but recommended) Check the source code for the function that is intended to be found in memory. For example, to find the `FMemory::Free` function in a UE5.3.2 game, you would find [this](https://github.com/EpicGames/UnrealEngine/blob/5.3.2-release/Engine/Source/Runtime/Core/Public/HAL/FMemory.inl#L142)
54-
3. In x64dbg go to Symbols tab -> In the left window select the `.exe` -> Under the right window search for the function (in this case `FMemory::Free`) -> Double click the found Function in the right window
55-
4. You should be now back at the CPU tab with the address in memory of the start of the selected function
56-
57-
### Grab a copy of bytes from the function
58-
59-
1. (Optional but recommended) Install [Baymax ToOls](https://github.com/sicaril/BaymaxTools) plugin for x64dbg
60-
2. Select some (This is where it is not the same for every game and required magic/"knowledge" starts) address lines -> Right Click -> Copy -> Selection or Selection (Bytes only)
61-
3. If Baymax ToOls installed, while selecting all the addresses lines composing the function -> Right Click -> Baymax ToOls -> Copy Signature.
62-
4. Might want to copy both selection types and save them in a file for comparison and reference
63-
64-
### Open your game's memory in x64dbg
65-
66-
1. Open the game you want to mod
67-
2. Attach x64dbg as seen before with the blank project
68-
3. Search for the saved block of bytes found in the last step
69-
4. (If nothing found) Search for the pattern from Baymax ToOls
70-
5. (If nothing found) Try searching parts of the block of bytes (or signature from Baymax ToOls) and compare the addresses block with the one from the blank project
71-
6. If nothing found, it might be worth to ask for help on the UE4SS discord or Github issues. Make sure you post all your steps and as much detail as you can provide, otherwise no one will be inclined to help you!
72-
7. If found a good match, create the lua script to retrieve the address of the function/variable required. Put it in `UE4SS_Signatures` folder in the `Binaries` of your game folder where UE4SS is installed
73-
8. Run the game and UE4SS hopefully works now
23+
For more in-depth instructions, see the [advanced guide](./fixing-compatibility-problems-advanced.md).
7424

7525
## How to setup your own AOB and callback
7626

0 commit comments

Comments
 (0)