From b9204d4765fc282bfe7be758761fb237bc69da87 Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Mon, 5 Aug 2024 21:59:59 +0200 Subject: [PATCH] unity: hopefully fixes timezone spoofing #27 --- platform/clock.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/platform/clock.c b/platform/clock.c index a263413..5a9a8f4 100644 --- a/platform/clock.c +++ b/platform/clock.c @@ -4,6 +4,7 @@ #include #include "hook/table.h" +#include "hook/procaddr.h" #include "platform/clock.h" @@ -236,6 +237,13 @@ HRESULT clock_hook_init(const struct clock_config *cfg) "kernel32.dll", clock_base_hook_syms, _countof(clock_base_hook_syms)); + + proc_addr_table_push( + NULL, + "kernel32.dll", + clock_base_hook_syms, + _countof(clock_base_hook_syms) + ); } if (cfg->timezone) { @@ -244,6 +252,13 @@ HRESULT clock_hook_init(const struct clock_config *cfg) "kernel32.dll", clock_read_hook_syms, _countof(clock_read_hook_syms)); + + proc_addr_table_push( + NULL, + "kernel32.dll", + clock_read_hook_syms, + _countof(clock_read_hook_syms) + ); } if (!cfg->writeable) { @@ -253,6 +268,13 @@ HRESULT clock_hook_init(const struct clock_config *cfg) "kernel32.dll", clock_write_hook_syms, _countof(clock_write_hook_syms)); + + proc_addr_table_push( + NULL, + "kernel32.dll", + clock_write_hook_syms, + _countof(clock_write_hook_syms) + ); } return S_OK;