Skip to content

Commit

Permalink
Patching demo
Browse files Browse the repository at this point in the history
  • Loading branch information
momo5502 committed Sep 20, 2024
1 parent b86e575 commit a84e176
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/sample/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ namespace
win_emu.logger.print(color::blue, "Executing inline syscall: %s (0x%X) at 0x%llX\n",
syscall_name.c_str(),
syscall_id, rip);

/*if (syscall_name == "NtQueryInformationProcess")
{
const auto info_class = win_emu.emu().reg(x64_register::rdx);
if (info_class == ProcessImageFileNameWin32)
{
const auto data = win_emu.emu().reg(x64_register::r8);
emulator_allocator data_allocator{ win_emu.emu(), data, 0x100 };
data_allocator.make_unicode_string(L"C:\\Users\\mauri\\source\\repos\\lul\\x64\\Release\\lul.exe");
win_emu.emu().reg(x64_register::rax, STATUS_SUCCESS);
return instruction_hook_continuation::skip_instruction;
}
}*/
}

return instruction_hook_continuation::run_instruction;
Expand Down

0 comments on commit a84e176

Please sign in to comment.