Skip to content

Commit 269e627

Browse files
docs: Update fixing missing AOBs docs with the comment from #665 (#712)
* docs: update fixing missing AOBs docs with the comment from #665
1 parent cd7746e commit 269e627

File tree

3 files changed

+68
-10
lines changed

3 files changed

+68
-10
lines changed

docs/SUMMARY.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
[Home](./README.md)
44
[Installation](./installation-guide.md)
5-
[Contributing](./contributing.md)
5+
<!-- [Contributing](./contributing.md) -->
66

77
---
88

99
## Feature Overview
10+
1011
- [Blueprint Modloading](./feature-overview/blueprint-modloader.md)
1112
- [Live Property Viewer and Editor](./feature-overview/live-view.md)
1213
- [Dumpers](./feature-overview/dumpers.md)
@@ -109,13 +110,14 @@
109110

110111
## Guides
111112

112-
- [Fixing missing AOBs](./guides/fixing-compatibility-problems.md)
113-
- [Generating UHT headers](./guides/generating-uht-compatible-headers.md)
114-
- [Creating a C++ Mod](./guides/creating-a-c++-mod.md)
115-
- [Installing a C++ Mod](./guides/installing-a-c++-mod.md)
116-
- [GUI tabs with a C++ Mod](./guides/creating-gui-tabs-with-c++-mod.md)
117-
- [Creating a Lua Mod](./guides/creating-a-lua-mod.md)
118-
- [Using Custom Lua Bindings](./guides/using-custom-lua-bindings.md)
113+
- [Guides]()
114+
- [Fixing missing AOBs](./guides/fixing-compatibility-problems.md)
115+
- [Generating UHT headers](./guides/generating-uht-compatible-headers.md)
116+
- [Creating a C++ Mod](./guides/creating-a-c++-mod.md)
117+
- [Installing a C++ Mod](./guides/installing-a-c++-mod.md)
118+
- [GUI tabs with a C++ Mod](./guides/creating-gui-tabs-with-c++-mod.md)
119+
- [Creating a Lua Mod](./guides/creating-a-lua-mod.md)
120+
- [Using Custom Lua Bindings](./guides/using-custom-lua-bindings.md)
119121

120122
## Misc
121123

docs/custom-game-configs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Custom Game Configs
22

3-
> IMPORTANT: Some of these files may be out of date as the games/UE4SS updates. If you find that a game's custom game config is out of date, please open an issue on the UE4SS-RE/RE-UE4SS repository. Make sure that you first test if the game works without the custom game config, as it may have been fixed in the latest version of UE4SS.
3+
> [!IMPORTANT]
4+
> Some of these files may be out of date as the games/UE4SS updates. If you find that a game's custom game config is out of date, please open an issue on the UE4SS-RE/RE-UE4SS repository. Make sure that you first test if the game works without the custom game config, as it may have been fixed in the latest version of UE4SS.
45
56
These settings are for games that have altered the engine in ways that make UE4SS not work out of the box.
67

docs/guides/fixing-compatibility-problems.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ A `working directory` is either the directory that contains `ue4ss.dll` OR a gam
88

99
## How to find AOBs
1010

11+
> [!CAUTION]
12+
> Finding AOBs for a game is no simple task and requires research into basic reverse engineering principles. It's not something for which we can just make an all-encompassing guide.
13+
1114
Since the process is quite complicated, here will just cover the general steps you need to take.
1215

1316
1. Make a blank shipped game in your game's UE version, with PDBs
@@ -17,6 +20,58 @@ Since the process is quite complicated, here will just cover the general steps y
1720
5. Open your game's memory in x64dbg and search it for the same block of bytes
1821
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)
1922

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
74+
2075
## How to setup your own AOB and callback
2176

2277
1. Create the directory `UE4SS_Signatures` if it doesn't already exist in your `working directory`.
@@ -62,7 +117,7 @@ Since the process is quite complicated, here will just cover the general steps y
62117
Function signature: `class UObject * __ptr64 __cdecl StaticConstructObject_Internal(struct FStaticConstructObjectParameters const & __ptr64)`
63118
- GMalloc
64119
- Must return the exact address of the global variable named 'GMalloc'.
65-
In UE4SS, we scan for 'FMemory::Free' and then resolve the MOV instruction closest to the first CALL instruction.
120+
In UE4SS, we scan for `FMemory::Free` and then resolve the MOV instruction closest to the first CALL instruction.
66121

67122
## Example script (Simple, direct scan)
68123

0 commit comments

Comments
 (0)