const static std::uint8_t jmp[] = {0x48, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x90, 0x90};
...
memcpy(OriginalAddress + 1, &ReplacementAddress, sizeof(void*));
For your x86-64 instructions, the address to jump to, the 0x0000000000000000 in your jmp
array, starts at the third byte, not at the second. You're overwriting part of the mov
instruction, and what you end up with is an invalid instruction if you're lucky.
As a side note, I'm doubtful it's safe to just overwrite %eax
/%rax
like that. Have you determined that those registers will never contain any values of interest?