Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to find the Correct Offset for Present() #1

Open
WafflesJohnny opened this issue Jun 18, 2020 · 1 comment
Open

How to find the Correct Offset for Present() #1

WafflesJohnny opened this issue Jun 18, 2020 · 1 comment

Comments

@WafflesJohnny
Copy link

WafflesJohnny commented Jun 18, 2020

Hello there,

Thank you for putting this code together. I was having trouble understanding with one thing though; how do I get the correct memory offset for a particular game? I'm assuming I have to get the offset as memory address for the Present() method. I looked inside the Windows/System32 directory and was able to retrieve an absolute memory address from d3d11.dll for Present().

I'm not sure I was looking in the correct place though as I haven't had any success in hooking a game yet. Any guidance is appreciated.

@matty45
Copy link

matty45 commented Mar 26, 2021

Get x64dbg and run the game using it, (as long as it does not have any anti-debugging features)

Go into the symbols tab and look for dxgi.dll, then search for ?Present@CDXGISwapChain@@UEAAJII@Z in the right panel. There will be other symbols which look the same so if you cant find it, i recommend trying them instead.

Take away its address from the modules base address to get your offset.

eg: 0x7FFC60254670 - 0x7FFC60250000 = 0x4670

Oh, you might have to download the debug symbols so you can see them when you search for them.
Image of x64dbg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants