Implement rdtsc hook

This commit is contained in:
momo5502
2024-09-02 17:16:29 +02:00
parent 679fecda4e
commit daff0d1e13
5 changed files with 17 additions and 6 deletions

View File

@@ -625,6 +625,13 @@ namespace
emu->hook_instruction(x64_hookable_instructions::syscall, [&]
{
dispatcher.dispatch(*emu, context);
return true;
});
emu->hook_instruction(x64_hookable_instructions::rdtsc, [&]
{
puts("RDTSC Hook");
return true;
});
watch_object(*emu, context.teb);
@@ -657,10 +664,8 @@ namespace
emu->reg(x64_register::rcx, execution_context.value());
emu->reg(x64_register::rdx, context.ntdll.image_base);
emu->reg(x64_register::rip, entry1);
try
{
if (use_gdb)