Awesome
Uptime Faker
Generic Windows library designed to help detecting issues related to high PC uptime.
Reason for creating this plugin
The most accurate timers in Windows all count time from the time Windows has started. Historically, these values often were relatively small, as people usually shut down their PC at night, and therefore uptime stayed low. However, with the introduction of Fast Startup in Windows 8, uptime stopped resetting after shutting down the PC (since it's now effectively a partial hibernation). This led to uptimes inflating noticeably for most people, as with Fast Startup enabled it resets only on a full PC reboot.
Turns out, older software often cannot handle high uptimes. Much to my surprise, Application Verifier did not have any options to help detecting such issues by faking high uptime, I decided to create this plugin.
To allow using Uptime Faker as a general purpose fix for games and/or applications not handling high uptime gracefully,
v1.1 added a ProcessTime
INI option, making timers count time from the process creation instead of the last reboot.
Usage
This plugin is a Detours plugin. Therefore, it can be injected into the process with DetourCreateProcessWithDlls or by any other means. It is also possible to inject UptimeFaker by using Ultimate ASI Loader, but file extension needs to be renamed to ASI first.
Hooked WinAPI functions, the amount of uptime added and a process time mode can be configured with a provided UptimeFaker.ini
file.
Supported functions
- From kernel32.dll:
- QueryPerformanceCounter
- GetTickCount
- GetTickCount64
- From winmm.dll:
- timeGetTime
- timeGetSystemTime
Third party dependencies
This project uses Detours to hook into WinAPI time functions.