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

[Feature Request/Discussion] DHooks x64 #2114

Open
sapphonie opened this issue Feb 11, 2024 · 4 comments
Open

[Feature Request/Discussion] DHooks x64 #2114

sapphonie opened this issue Feb 11, 2024 · 4 comments

Comments

@sapphonie
Copy link
Contributor

With the looming spectre of TF2's x64 branch, there hasn't been much discussion on updating DHooks to support x64, which a significant amount of plugins rely on. I figured I would make an issue so there is a place to keep track of discussion about that.

@sapphonie sapphonie changed the title [Feature Request] DHooks x64 [Feature Request/Discussion] DHooks x64 Feb 11, 2024
@peace-maker
Copy link
Member

DHooks is built on two libraries to allow dynamic hooking of functions during runtime which both only support x86.

SoureHook AutoGen to hijack virtual functions with arbitrary signatures
DynamicHooks (modified) for non-virtual functions

Both need individual support for x86_64 codegen and the respective calling convention, while technically all functions can be detoured, so for basic functionality DynamicHooks could be enough to upgrade first.
The macro assembler library in the sourcepawn vm might need some additional instructions too.

@bottiger1
Copy link
Contributor

Is anyone working on this?

Dynamichooks appears to have been forked for 64bit support but it requires C++20 and 4 more libs so I don't know if that would be accepted into sourcemod. https://github.com/qubka/DynoHook

@dvander
Copy link
Member

dvander commented May 7, 2024 via email

@bottiger1
Copy link
Contributor

asmjit asmtk catch2 zydis

Note that I'm just pointing out that there's a replacement for dynamichooks, I'm not volunteering to update dhooks.

I took a quick glance at the code and it looks difficult to get familiarized with and I only have maybe 5 sourcepawn plugins that use it only because I was too lazy to make an extension.

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

4 participants