dxgi.dll funny

Hello everyone, I’m going to make a very simple demonstration purely for educational purposes. You can have your own “legit” ESP for FiveM by taking advantage of open-source tools, leaving no traces for screen capture tools or other server-side protections.

Let’s start with the requirements:

  • Download ReShade from the official repository (github)
  • Visual Studio 2022+
  • D3D9 SDK

First:

With reshade-master downloaded, open it in Visual Studio and load the solution.

Usually reshade.sln

Second:

Let’s prepare the ESP. If you already have yours (which I doubt — otherwise you would have done this a long time ago), in my case I have mine which I’ll provide below. There are 6 files: esp.hpp, types.h, class.h, functions.hpp, xor_func.hpp, xor_string.hpp.

esp.hpphttps://github.com/zljxl/reshade_devto/blob/main/esp.hpp

types.hhttps://github.com/zljxl/reshade_devto/blob/main/types.h

xor_func.hpphttps://github.com/zljxl/reshade_devto/blob/main/xor_func.hpp

xor_string.hpphttps://github.com/zljxl/reshade_devto/blob/main/xor_string.hpp

class.hhttps://github.com/zljxl/reshade_devto/blob/main/class.h

functions.hpphttps://github.com/zljxl/reshade_devto/blob/main/functions.hpp

The files are too large to paste here

Third:

With all files copied into your reshade-main and properly added to the solution, we can begin implementing it alongside ReShade.

Go to the file runtime_gui.cpp and include esp.hpp. After that, search for the native function:

void reshade::runtime::init_gui() {...}

Once found, locate:

void reshade::runtime::init_gui() 
{
    _imgui_context = ImGui::CreateContext();

    init(); // add init here

    ImGui::SetCurrentContext(nullptr);
}

It is VERY IMPORTANT that this is added AFTER ImGui::CreateContext().

Still inside runtime_gui.cpp, search for the function:

void reshade::runtime::draw_gui() {...}

After identifying the ImGui flag definitions, find the call:

ImGui::NewFrame();

Found it? Perfect. Just call our function:

tickkkk();

right below it.

Done — ESP implementation finished.

Fourth:

Let’s create an option to enable/disable the ESP. You’re not going to leave it on all the time, right?

Open the file runtime.hpp and search for:

#pragma region Overlay Settings

Near it (above or below), declare a variable EXACTLY like this:

bool _esp_bool = false;

It should look something like this:

#pragma endregion

#pragma region Overlay Add-ons
char _addons_filter[32] = {};
#pragma endregion

bool _esp_bool = false;

#pragma region Overlay Settings
int _font_size = 13;

Now go back to runtime_gui.cpp and create a button. Search for:

void reshade::runtime::draw_gui_home() {...}

Create a button like this:

if (ImGui::Button("ESP")) {
    _esp_bool = !_esp_bool;
}

In theory, everything should now be working.

Fifth

Compile using Release x64 in Visual Studio. If you get compilation errors, search online — you’ll figure it out. I believe in you, my friend.

FINAL

Now just install it like a normal ReShade: drop the dxgi.dll into the FiveM folder and you’re done. Congratulations — you now have your own ESP, no injector required and no network traces or other things screen recorders usually look for.

Notes

This code only works on the 2060 because I was too lazy to include the rest of the jumps for all versions. But that’s easy — just grab the jumps using the offset dumper. You need to do something at least — copy and paste is easy.

Repo → https://github.com/zljxl/Educational-Memory-Finder

Leave a Reply