A high-performance, lightweight, and accurate C++ tool designed to automatically detect and dump critical FiveM (GTA V modded client) memory offsets by scanning for unique byte patterns in the running process.
Author:
@const
Language: C++17
Platform: Windows (x64)
Target: FiveM (all builds:_bXXXX, Subsurface, etc.)
- Fully automated – detects FiveM window, retrieves PID, opens process handle.
- Robust pattern scanning with wildcard support (
?/??). - RIP-relative address resolution (handles
lea rax, [rip + disp32]). - Smart pointer dereferencing for final static addresses.
- Colorful console output with logging system.
- Build detection from executable name (e.g.,
FiveM_b3095.exe→ build3095). - Modular design – clean separation of memory, process, and utility logic.
| Name | Type | Dereferenced |
|---|---|---|
world |
CWorld* |
Yes |
replay_interface |
CReplayInterface* |
No |
viewport |
CViewport* |
Yes |
blip_list |
CBlipList* |
No |
camera |
CCamera* |
Yes |
bullet |
CBulletProof* |
Yes |
aim_cped |
CAimCPed* |
Yes |
set_ped_in_to_vehicle |
Function ptr | Yes |
c_sky_settings |
CSkySettings* |
Yes |
- Windows 10/11 (64-bit)
- Visual Studio 2022 (or newer) with C++ Desktop Development workload
- FiveM running (any build)
git clone https://github.com/yfz/fivem_offset_dumper.git
cd fivem_offset_dumperOr download as ZIP and extract.
- Open Visual Studio
- Click "Open a project or solution"
- Navigate to the folder and select:
fivem_offset_dumper.sln
- Set configuration to:
- Release
- x64
- Press Ctrl + Shift + B or go to Build → Build Solution
Output:
x64\Release\fivem_offset_dumper.exe
- Start FiveM (join any server or stay in menu)
- Run the compiled
.exeas Administrator (recommended for stable memory reading)
.\x64\Release\fivem_offset_dumper.exeOffsets are relative to module base (
FiveM_*.exe)
fivem_offset_dumper/
│
├── main.cpp → Entry point & pattern logic
├── memory/
│ ├── memory.cpp → Pattern scanner, RIP resolver
│ └── memory.hpp
├── process/
│ ├── process.cpp → PID → handle → base address
│ └── process.hpp
├── utils/
│ └── utils.hpp → Logger with colors
└── fivem_offset_dumper.sln
- Uses
VirtualQueryEx+ReadProcessMemory - Supports
??and?wildcards - Scans from module base to end of memory regions
lea rax, [rip + disp32]→ address = instruction + 7 + *(int32_t*)(instruction + 3)
- Only reads
MEM_COMMITregions - Skips
PAGE_GUARDpages - Proper handle cleanup
Edit the patterns array in main.cpp:
pattern_info patterns[] = {
{"new_offset", "48 8B 05 ? ? ? ? 48 89 41 08", true},
};Use tools like Cheat Engine, x64dbg, or ReClass to find new signatures.
| Issue | Solution |
|---|---|
pattern not found |
Build changed → update signature |
| Access denied | Run as Administrator |
| Crashes on start | FiveM not fully loaded → wait in menu |
| Wrong offsets | Use x64 only, not x86 |
This tool is for educational and reverse engineering purposes only.
- Do not use for cheating in online games.
- Respect Rockstar Games & FiveM ToS.
- Use only in private, offline, or authorized environments.
Made with precision for the modding community.
@const – 2025
Happy reversing!