From 15f6c7593e91e63fcfa8bba67a911685b21d31b0 Mon Sep 17 00:00:00 2001 From: slayercio Date: Tue, 18 Nov 2025 20:02:27 +0100 Subject: [PATCH] fix: update documentation of the stub --- src/impl/dispatcher.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/impl/dispatcher.cpp b/src/impl/dispatcher.cpp index ac2a1a3..1a82d52 100644 --- a/src/impl/dispatcher.cpp +++ b/src/impl/dispatcher.cpp @@ -16,14 +16,19 @@ namespace fxn void* CreateNativeDispatcher(std::uint64_t nativeHash) { + /* + mov rax, + mov rdx, + jmp rax + */ constexpr auto STUB_SIZE = 22; constexpr auto STUB_BYTES = std::array { 0x48, 0xB8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov rax, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xBA, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov rdx, - 0xFF, 0xE0 // jmp rax + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xE0 }; auto stub = VirtualAllocEx(GetCurrentProcess(), nullptr, STUB_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);