Add dummy stub for NtFlushInstructionCache

This commit is contained in:
ahm3dgg
2026-01-07 20:21:19 +02:00
parent 0b47eb77f1
commit 49ae9ef68a
3 changed files with 15 additions and 2 deletions

View File

@@ -290,7 +290,7 @@ namespace
auto file = utils::io::read_file(known_dll_path);
{
section s;
s.file_name = known_dll_path.u16string();
s.file_name = (system_root_path / known_dll_name).u16string();
s.maximum_size = page_align_up(std::filesystem::file_size(s.file_name));
s.allocation_attributes = SEC_IMAGE;
s.section_page_protection = PAGE_EXECUTE;
@@ -354,7 +354,7 @@ namespace
auto known_dll_dep_file = utils::io::read_file(known_dll_dep_path);
section s;
s.file_name = known_dll_dep_path.u16string();
s.file_name = (system_root_path / known_dll_dep_name_16).u16string();
s.maximum_size = page_align_up(std::filesystem::file_size(s.file_name));
s.allocation_attributes = SEC_IMAGE;
s.section_page_protection = PAGE_EXECUTE;

View File

@@ -363,6 +363,8 @@ namespace syscalls
emulator_object<ULONG> return_length);
NTSTATUS handle_NtQuerySecurityAttributesToken();
NTSTATUS handle_NtAdjustPrivilegesToken();
NTSTATUS handle_NtFlushInstructionCache(const syscall_context& c, const handle process_handle,
const emulator_object<uint64_t> base_address, const uint64_t region_size);
NTSTATUS handle_NtQueryPerformanceCounter(const syscall_context& c, const emulator_object<LARGE_INTEGER> performance_counter,
const emulator_object<LARGE_INTEGER> performance_frequency)
@@ -1266,6 +1268,7 @@ void syscall_dispatcher::add_handlers(std::map<std::string, syscall_handler>& ha
add_handler(NtRemoveProcessDebug);
add_handler(NtNotifyChangeDirectoryFileEx);
add_handler(NtUserGetHDevName);
add_handler(NtFlushInstructionCache);
#undef add_handler
}

View File

@@ -421,4 +421,14 @@ namespace syscalls
return STATUS_NOT_SUPPORTED;
}
NTSTATUS handle_NtFlushInstructionCache(const syscall_context& c, const handle process_handle,
const emulator_object<uint64_t> base_address, const uint64_t region_size)
{
(void)c;
(void)process_handle;
(void)base_address;
(void)region_size;
return STATUS_SUCCESS;
}
}