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);