fix: update documentation of the stub
This commit is contained in:
@@ -16,14 +16,19 @@ namespace fxn
|
||||
|
||||
void* CreateNativeDispatcher(std::uint64_t nativeHash)
|
||||
{
|
||||
/*
|
||||
mov rax, <NativeDispatcher>
|
||||
mov rdx, <nativeHash>
|
||||
jmp rax
|
||||
*/
|
||||
constexpr auto STUB_SIZE = 22;
|
||||
constexpr auto STUB_BYTES = std::array<std::uint8_t, STUB_SIZE>
|
||||
{
|
||||
0x48, 0xB8,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov rax, <NativeDispatcher_address>
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x48, 0xBA,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov rdx, <NativeHash>
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user