This commit is contained in:
RektInator
2025-04-14 12:23:08 +02:00
parent 45b5b035d7
commit 7bf0b67167
9 changed files with 153 additions and 36 deletions

View File

@@ -24,10 +24,9 @@ namespace syscalls
return STATUS_SUCCESS;
}
NTSTATUS handle_NtRaiseException(const syscall_context& c,
const emulator_object<EMU_EXCEPTION_RECORD<EmulatorTraits<Emu64>>>
/*exception_record*/,
const emulator_object<CONTEXT64> thread_context, const BOOLEAN handle_exception)
NTSTATUS handle_NtRaiseException(
const syscall_context& c, const emulator_object<EMU_EXCEPTION_RECORD<EmulatorTraits<Emu64>>> exception_record,
const emulator_object<CONTEXT64> thread_context, const BOOLEAN handle_exception)
{
if (handle_exception)
{
@@ -36,6 +35,13 @@ namespace syscalls
return STATUS_NOT_SUPPORTED;
}
const auto& exception_data = exception_record.read();
if (exception_data.ExceptionCode == 0xC0000602) // STATUS_FAIL_FAST_EXCEPTION
{
c.emu.stop();
return STATUS_SUCCESS;
}
c.proc.exception_rip = thread_context.read().Rip;
c.emu.stop();