Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
37c8bd8ae3 | ||
![]() |
a1a1fc0bd1 | ||
![]() |
0ce2cbfbc0 | ||
![]() |
be33bfb2d5 | ||
![]() |
549459ff58 | ||
![]() |
ae8d48d365 | ||
![]() |
a584e3a3a7 | ||
![]() |
07da645253 | ||
![]() |
642ed502d7 | ||
![]() |
fce0772996 |
20
README.md
20
README.md
@@ -1,4 +1,4 @@
|
|||||||
# wufuc [](../../tree/old-kb4012218-19) [ ](https://github.com/zeffy/wufuc/releases/latest)
|
# wufuc [](../../tree/old-kb4012218-19) [ ](../../releases)
|
||||||
|
|
||||||
Disables the "Unsupported Hardware" message in Windows Update, and allows you to continue installing updates on Windows 7 and 8.1 systems with Intel Kaby Lake, AMD Ryzen, or other unsupported processors.
|
Disables the "Unsupported Hardware" message in Windows Update, and allows you to continue installing updates on Windows 7 and 8.1 systems with Intel Kaby Lake, AMD Ryzen, or other unsupported processors.
|
||||||
|
|
||||||
@@ -34,19 +34,17 @@ My patch takes advantage of this result caching behavior by setting the "hasn't
|
|||||||
- **No system files are modified!**
|
- **No system files are modified!**
|
||||||
- Heuristic-based patching, which means it will usually keep working even after updates.
|
- Heuristic-based patching, which means it will usually keep working even after updates.
|
||||||
- C is best language.
|
- C is best language.
|
||||||
- No external dependencies except for Microsoft Visual C++ 2017 Redistributable.
|
- No external dependencies.
|
||||||
|
|
||||||
### How to install/uninstall?
|
### How to install/uninstall?
|
||||||
|
|
||||||
Just download the [latest release](https://github.com/zeffy/wufuc/releases/latest), and extract the `wufuc` folder to a permanent location (like `C:\Program Files\wufuc`) and then run `install_wufuc.bat` as administrator.
|
Just download the [latest release](../../releases/latest), and extract the `wufuc` folder to a permanent location (like `C:\Program Files\wufuc`) and then run `install_wufuc.bat` as administrator.
|
||||||
|
|
||||||
To uninstall run `uninstall_wufuc.bat` as administrator.
|
To uninstall run `uninstall_wufuc.bat` as administrator.
|
||||||
|
|
||||||
To temporarily disable the patch, just go to the Task Scheduler and disable the `wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}` task, then restart your computer.
|
|
||||||
|
|
||||||
### How do I remove your old patch and use this instead?
|
### How do I remove your old patch and use this instead?
|
||||||
|
|
||||||
I've included a utility script called `repair_wuaueng.dll.bat` that will initiate an sfc scan and revert any changes made to `wuaueng.dll`.
|
I've included a utility script called `repair_wuaueng.dll.bat`. When you run it, it will initiate an `sfc` scan and revert any changes made to `wuaueng.dll`.
|
||||||
|
|
||||||
### How to see wufuc's debugging message output?
|
### How to see wufuc's debugging message output?
|
||||||
|
|
||||||
@@ -54,9 +52,7 @@ You will need to download [DebugView](https://technet.microsoft.com/en-us/sysint
|
|||||||
|
|
||||||
The best way to get a log of the entire life-cycle of wufuc is to do the following:
|
The best way to get a log of the entire life-cycle of wufuc is to do the following:
|
||||||
|
|
||||||
1. Disable wufuc in Task Scheduler.
|
1. Disable wufuc by running `disable_wufuc.bat` as administrator.
|
||||||
2. Restart your computer.
|
2. Start `Dbgview.exe` as administrator and check `Capture -> Capture Global Win32`.
|
||||||
3. Start `DebugView.exe` as administrator and check `Capture -> Capture Global Win32`.
|
3. Enable wufuc by running `enable_wufuc.bat` as administrator.
|
||||||
4. Enable wufuc in Task Scheduler.
|
4. Output will be shown in DebugView.
|
||||||
5. Run wufuc in Task Scheduler.
|
|
||||||
6. Output will be shown in DebugView.
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
title wufuc installer - v0.6.0.1
|
title wufuc installer
|
||||||
:: Copyright (C) 2017 zeffy
|
:: Copyright (C) 2017 zeffy
|
||||||
|
|
||||||
:: This program is free software: you can redistribute it and/or modify
|
:: This program is free software: you can redistribute it and/or modify
|
||||||
@@ -47,6 +47,9 @@ goto :unsupported_os
|
|||||||
set "WINDOWS_ARCHITECTURE=x64"
|
set "WINDOWS_ARCHITECTURE=x64"
|
||||||
set "wufuc_dll=%~dp0wufuc64.dll"
|
set "wufuc_dll=%~dp0wufuc64.dll"
|
||||||
|
|
||||||
|
for /f "tokens=*" %%i in ('wmic /output:stdout datafile where "name='%wufuc_dll:\=\\%'" get Version /value ^| find "="') do set "%%i"
|
||||||
|
title wufuc installer - v%Version%
|
||||||
|
|
||||||
:check_ver
|
:check_ver
|
||||||
wmic /output:stdout os get version | findstr "^6\.1\." >nul && (
|
wmic /output:stdout os get version | findstr "^6\.1\." >nul && (
|
||||||
set "WINDOWS_VER=6.1"
|
set "WINDOWS_VER=6.1"
|
||||||
@@ -108,19 +111,6 @@ set /p CONTINUE=Enter 'Y' if you want to install wufuc:
|
|||||||
if /I not "%CONTINUE%"=="Y" goto :cancel
|
if /I not "%CONTINUE%"=="Y" goto :cancel
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
set "vcredist_path=%~dp0_Redist\vcredist_%WINDOWS_ARCHITECTURE%.exe"
|
|
||||||
if exist "%vcredist_path%" (
|
|
||||||
echo Installing Microsoft Visual C^+^+ 2017 Redistributable ^(%WINDOWS_ARCHITECTURE%^)...
|
|
||||||
"%vcredist_path%" /passive /norestart
|
|
||||||
goto :install
|
|
||||||
)
|
|
||||||
|
|
||||||
echo Couldn't locate and install Microsoft Visual C^+^+ 2017 Redistributable ^(%WINDOWS_ARCHITECTURE%^).
|
|
||||||
|
|
||||||
set /p CONTINUE=Enter 'Y' if you still want to continue:
|
|
||||||
if /I not "%CONTINUE%"=="Y" goto :cancel
|
|
||||||
echo.
|
|
||||||
|
|
||||||
:install
|
:install
|
||||||
set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}"
|
set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}"
|
||||||
schtasks /Create /XML "%~dp0wufuc.xml" /TN "%wufuc_task%" /F
|
schtasks /Create /XML "%~dp0wufuc.xml" /TN "%wufuc_task%" /F
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
title wufuc uninstaller - v0.6.0.1
|
title wufuc uninstaller
|
||||||
:: Copyright (C) 2017 zeffy
|
:: Copyright (C) 2017 zeffy
|
||||||
|
|
||||||
:: This program is free software: you can redistribute it and/or modify
|
:: This program is free software: you can redistribute it and/or modify
|
||||||
@@ -45,12 +45,14 @@ goto :die
|
|||||||
set "WINDOWS_ARCHITECTURE=x64"
|
set "WINDOWS_ARCHITECTURE=x64"
|
||||||
set "wufuc_dll=%~dp0wufuc64.dll"
|
set "wufuc_dll=%~dp0wufuc64.dll"
|
||||||
|
|
||||||
|
for /f "tokens=*" %%i in ('wmic /output:stdout datafile where "name='%wufuc_dll:\=\\%'" get Version /value ^| find "="') do set "%%i"
|
||||||
|
title wufuc uninstaller - v%Version%
|
||||||
|
|
||||||
:confirmation
|
:confirmation
|
||||||
set /p CONTINUE=Enter 'Y' if you want to uninstall wufuc:
|
set /p CONTINUE=Enter 'Y' if you want to uninstall wufuc:
|
||||||
if /I not "%CONTINUE%"=="Y" goto :cancel
|
if /I not "%CONTINUE%"=="Y" goto :cancel
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
:uninstall
|
|
||||||
set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}"
|
set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}"
|
||||||
rundll32 "%wufuc_dll%",Rundll32Unload
|
rundll32 "%wufuc_dll%",Rundll32Unload
|
||||||
schtasks /Delete /TN "%wufuc_task%" /F
|
schtasks /Delete /TN "%wufuc_task%" /F
|
||||||
|
70
install/utility scripts/disable_wufuc.bat
Normal file
70
install/utility scripts/disable_wufuc.bat
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
@echo off
|
||||||
|
title wufuc utility - disable task
|
||||||
|
:: Copyright (C) 2017 zeffy
|
||||||
|
|
||||||
|
:: This program is free software: you can redistribute it and/or modify
|
||||||
|
:: it under the terms of the GNU General Public License as published by
|
||||||
|
:: the Free Software Foundation, either version 3 of the License, or
|
||||||
|
:: (at your option) any later version.
|
||||||
|
|
||||||
|
:: This program is distributed in the hope that it will be useful,
|
||||||
|
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
:: GNU General Public License for more details.
|
||||||
|
|
||||||
|
:: You should have received a copy of the GNU General Public License
|
||||||
|
:: along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
echo Copyright ^(C^) 2017 zeffy
|
||||||
|
echo This program comes with ABSOLUTELY NO WARRANTY.
|
||||||
|
echo This is free software, and you are welcome to redistribute it
|
||||||
|
echo under certain conditions; see COPYING.txt for details.
|
||||||
|
echo.
|
||||||
|
|
||||||
|
fltmc >nul 2>&1 || (
|
||||||
|
echo This batch script requires administrator privileges. Right-click on
|
||||||
|
echo %~nx0 and select "Run as administrator".
|
||||||
|
goto :die
|
||||||
|
)
|
||||||
|
|
||||||
|
if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
|
||||||
|
goto :is_x64
|
||||||
|
) else (
|
||||||
|
if /I "%PROCESSOR_ARCHITEW6432%"=="AMD64" (
|
||||||
|
goto :is_x64
|
||||||
|
)
|
||||||
|
if /I "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
||||||
|
set "WINDOWS_ARCHITECTURE=x86"
|
||||||
|
set "wufuc_dll=%~dp0wufuc32.dll"
|
||||||
|
goto :confirmation
|
||||||
|
)
|
||||||
|
)
|
||||||
|
goto :die
|
||||||
|
|
||||||
|
:is_x64
|
||||||
|
set "WINDOWS_ARCHITECTURE=x64"
|
||||||
|
set "wufuc_dll=%~dp0..\wufuc64.dll"
|
||||||
|
|
||||||
|
:confirmation
|
||||||
|
set /p CONTINUE=Enter 'Y' if you want to disable wufuc:
|
||||||
|
if /I not "%CONTINUE%"=="Y" goto :cancel
|
||||||
|
echo.
|
||||||
|
|
||||||
|
set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}"
|
||||||
|
rundll32 "%wufuc_dll%",Rundll32Unload
|
||||||
|
schtasks /Change /TN "%wufuc_task%" /DISABLE
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Disabled wufuc! You will still be able to check for updates until you restart.
|
||||||
|
|
||||||
|
:die
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit...
|
||||||
|
pause >nul
|
||||||
|
exit
|
||||||
|
|
||||||
|
:cancel
|
||||||
|
echo.
|
||||||
|
echo Canceled by user, press any key to exit...
|
||||||
|
pause >nul
|
||||||
|
exit
|
51
install/utility scripts/enable_wufuc.bat
Normal file
51
install/utility scripts/enable_wufuc.bat
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
@echo off
|
||||||
|
title wufuc utility - enable task
|
||||||
|
:: Copyright (C) 2017 zeffy
|
||||||
|
|
||||||
|
:: This program is free software: you can redistribute it and/or modify
|
||||||
|
:: it under the terms of the GNU General Public License as published by
|
||||||
|
:: the Free Software Foundation, either version 3 of the License, or
|
||||||
|
:: (at your option) any later version.
|
||||||
|
|
||||||
|
:: This program is distributed in the hope that it will be useful,
|
||||||
|
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
:: GNU General Public License for more details.
|
||||||
|
|
||||||
|
:: You should have received a copy of the GNU General Public License
|
||||||
|
:: along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
echo Copyright ^(C^) 2017 zeffy
|
||||||
|
echo This program comes with ABSOLUTELY NO WARRANTY.
|
||||||
|
echo This is free software, and you are welcome to redistribute it
|
||||||
|
echo under certain conditions; see COPYING.txt for details.
|
||||||
|
echo.
|
||||||
|
|
||||||
|
fltmc >nul 2>&1 || (
|
||||||
|
echo This batch script requires administrator privileges. Right-click on
|
||||||
|
echo %~nx0 and select "Run as administrator".
|
||||||
|
goto :die
|
||||||
|
)
|
||||||
|
|
||||||
|
set /p CONTINUE=Enter 'Y' if you want to enable wufuc:
|
||||||
|
if /I not "%CONTINUE%"=="Y" goto :cancel
|
||||||
|
echo.
|
||||||
|
|
||||||
|
set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}"
|
||||||
|
schtasks /Change /TN "%wufuc_task%" /ENABLE
|
||||||
|
schtasks /Run /TN "%wufuc_task%"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Enabled and started wufuc!
|
||||||
|
|
||||||
|
:die
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit...
|
||||||
|
pause >nul
|
||||||
|
exit
|
||||||
|
|
||||||
|
:cancel
|
||||||
|
echo.
|
||||||
|
echo Canceled by user, press any key to exit...
|
||||||
|
pause >nul
|
||||||
|
exit
|
@@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
title install wufuc ^(repair wuaueng.dll^) - v0.6.0.1
|
title wufuc utility - repair wuaueng.dll
|
||||||
:: Copyright (C) 2017 zeffy
|
:: Copyright (C) 2017 zeffy
|
||||||
|
|
||||||
:: This program is free software: you can redistribute it and/or modify
|
:: This program is free software: you can redistribute it and/or modify
|
||||||
@@ -27,7 +27,6 @@ fltmc >nul 2>&1 || (
|
|||||||
goto :die
|
goto :die
|
||||||
)
|
)
|
||||||
|
|
||||||
:confirmation
|
|
||||||
echo You may want to use this script if you previously modified wuaueng.dll
|
echo You may want to use this script if you previously modified wuaueng.dll
|
||||||
echo with "aio-wuaueng.dll-patch.bat" or by other means.
|
echo with "aio-wuaueng.dll-patch.bat" or by other means.
|
||||||
echo.
|
echo.
|
42
wufuc/core.c
42
wufuc/core.c
@@ -80,30 +80,30 @@ BOOL PatchWUModule(HMODULE hModule) {
|
|||||||
SIZE_T n1, n2;
|
SIZE_T n1, n2;
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
lpszPattern =
|
lpszPattern =
|
||||||
"FFF3" // push rbx
|
"FFF3" // push rbx
|
||||||
"4883EC??" // sub rsp,??
|
"4883EC??" // sub rsp,??
|
||||||
"33DB" // xor ebx,ebx
|
"33DB" // xor ebx,ebx
|
||||||
"391D????????" // cmp dword ptr ds:[???????????],ebx
|
"391D????????" // cmp dword ptr ds:[???????????],ebx
|
||||||
"7508" // jnz $+8
|
"7508" // jnz $+8
|
||||||
"8B05????????"; // mov eax,dword ptr ds:[???????????]
|
"8B05????????"; // mov eax,dword ptr ds:[???????????]
|
||||||
n1 = 10;
|
n1 = 10;
|
||||||
n2 = 18;
|
n2 = 18;
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
if (IsWindows8Point1()) {
|
if (IsWindows8Point1()) {
|
||||||
lpszPattern =
|
lpszPattern =
|
||||||
"8BFF" // mov edi,edi
|
"8BFF" // mov edi,edi
|
||||||
"51" // push ecx
|
"51" // push ecx
|
||||||
"833D????????00" // cmp dword ptr ds:[????????],0
|
"833D????????00" // cmp dword ptr ds:[????????],0
|
||||||
"7507" // jnz $+7
|
"7507" // jnz $+7
|
||||||
"A1????????"; // mov eax,dword ptr ds:[????????]
|
"A1????????"; // mov eax,dword ptr ds:[????????]
|
||||||
n1 = 5;
|
n1 = 5;
|
||||||
n2 = 13;
|
n2 = 13;
|
||||||
} else if (IsWindows7()) {
|
} else if (IsWindows7()) {
|
||||||
lpszPattern =
|
lpszPattern =
|
||||||
"833D????????00" // cmp dword ptr ds:[????????],0
|
"833D????????00" // cmp dword ptr ds:[????????],0
|
||||||
"743E" // je $+3E
|
"743E" // je $+3E
|
||||||
"E8????????" // call <wuaueng.IsCPUSupported>
|
"E8????????" // call <wuaueng.IsCPUSupported>
|
||||||
"A3????????"; // mov dword ptr ds:[????????],eax
|
"A3????????"; // mov dword ptr ds:[????????],eax
|
||||||
n1 = 2;
|
n1 = 2;
|
||||||
n2 = 15;
|
n2 = 15;
|
||||||
}
|
}
|
||||||
@@ -114,20 +114,20 @@ BOOL PatchWUModule(HMODULE hModule) {
|
|||||||
MODULEINFO modinfo;
|
MODULEINFO modinfo;
|
||||||
GetModuleInformation(GetCurrentProcess(), hModule, &modinfo, sizeof(MODULEINFO));
|
GetModuleInformation(GetCurrentProcess(), hModule, &modinfo, sizeof(MODULEINFO));
|
||||||
|
|
||||||
SIZE_T offset;
|
SIZE_T rva;
|
||||||
if (!FindPattern(modinfo.lpBaseOfDll, modinfo.SizeOfImage, lpszPattern, 0, &offset)) {
|
if (!FindPattern(modinfo.lpBaseOfDll, modinfo.SizeOfImage, lpszPattern, 0, &rva)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
SIZE_T rva = (SIZE_T)modinfo.lpBaseOfDll + offset;
|
SIZE_T fpIsDeviceServiceable = (SIZE_T)modinfo.lpBaseOfDll + rva;
|
||||||
_tdbgprintf(_T("IsDeviceServiceable(void) matched at %p"), rva);
|
_tdbgprintf(_T("IsDeviceServiceable(void) matched at %p"), fpIsDeviceServiceable);
|
||||||
|
|
||||||
BOOL *lpbNotRunOnce = (BOOL *)(rva + n1 + sizeof(DWORD) + *(DWORD *)(rva + n1));
|
BOOL *lpbNotRunOnce = (BOOL *)(fpIsDeviceServiceable + n1 + sizeof(DWORD) + *(DWORD *)(fpIsDeviceServiceable + n1));
|
||||||
if (*lpbNotRunOnce) {
|
if (*lpbNotRunOnce) {
|
||||||
*lpbNotRunOnce = FALSE;
|
*lpbNotRunOnce = FALSE;
|
||||||
_tdbgprintf(_T("Patched %p=%d"), lpbNotRunOnce, *lpbNotRunOnce);
|
_tdbgprintf(_T("Patched %p=%d"), lpbNotRunOnce, *lpbNotRunOnce);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL *lpbCachedResult = (BOOL *)(rva + n2 + sizeof(DWORD) + *(DWORD *)(rva + n2));
|
BOOL *lpbCachedResult = (BOOL *)(fpIsDeviceServiceable + n2 + sizeof(DWORD) + *(DWORD *)(fpIsDeviceServiceable + n2));
|
||||||
if (!*lpbCachedResult) {
|
if (!*lpbCachedResult) {
|
||||||
*lpbCachedResult = TRUE;
|
*lpbCachedResult = TRUE;
|
||||||
_tdbgprintf(_T("Patched %p=%d"), lpbCachedResult, *lpbCachedResult);
|
_tdbgprintf(_T("Patched %p=%d"), lpbCachedResult, *lpbCachedResult);
|
||||||
|
24
wufuc/util.c
24
wufuc/util.c
@@ -5,18 +5,6 @@
|
|||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
BOOL IsWindows7Or8Point1(void) {
|
|
||||||
return IsWindows7() || IsWindows8Point1();
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL IsWindows7(void) {
|
|
||||||
return IsWindows7OrGreater() && !IsWindows8OrGreater();
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL IsWindows8Point1(void) {
|
|
||||||
return IsWindows8Point1OrGreater() && !IsWindows10OrGreater();
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID DetourIAT(HMODULE hModule, LPSTR lpFuncName, LPVOID *lpOldAddress, LPVOID lpNewAddress) {
|
VOID DetourIAT(HMODULE hModule, LPSTR lpFuncName, LPVOID *lpOldAddress, LPVOID lpNewAddress) {
|
||||||
LPVOID *lpAddress = FindIAT(hModule, lpFuncName);
|
LPVOID *lpAddress = FindIAT(hModule, lpFuncName);
|
||||||
if (!lpAddress || *lpAddress == lpNewAddress) {
|
if (!lpAddress || *lpAddress == lpNewAddress) {
|
||||||
@@ -145,6 +133,18 @@ VOID ResumeAndCloseThreads(HANDLE *lphThreads, SIZE_T cb) {
|
|||||||
_tdbgprintf(_T("Resumed threads."));
|
_tdbgprintf(_T("Resumed threads."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL IsWindows7Or8Point1(void) {
|
||||||
|
return IsWindows7() || IsWindows8Point1();
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL IsWindows7(void) {
|
||||||
|
return IsWindows7OrGreater() && !IsWindows8OrGreater();
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL IsWindows8Point1(void) {
|
||||||
|
return IsWindows8Point1OrGreater() && !IsWindows10OrGreater();
|
||||||
|
}
|
||||||
|
|
||||||
VOID _wdbgprintf(LPCWSTR format, ...) {
|
VOID _wdbgprintf(LPCWSTR format, ...) {
|
||||||
WCHAR buffer[0x1000];
|
WCHAR buffer[0x1000];
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
|
12
wufuc/util.h
12
wufuc/util.h
@@ -3,12 +3,6 @@
|
|||||||
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
|
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
|
||||||
#define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase)
|
#define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase)
|
||||||
|
|
||||||
BOOL IsWindows7Or8Point1(void);
|
|
||||||
|
|
||||||
BOOL IsWindows7(void);
|
|
||||||
|
|
||||||
BOOL IsWindows8Point1(void);
|
|
||||||
|
|
||||||
VOID DetourIAT(HMODULE hModule, LPSTR lpFuncName, LPVOID *lpOldAddress, LPVOID lpNewAddress);
|
VOID DetourIAT(HMODULE hModule, LPSTR lpFuncName, LPVOID *lpOldAddress, LPVOID lpNewAddress);
|
||||||
|
|
||||||
#define DETOUR_IAT(x, y) \
|
#define DETOUR_IAT(x, y) \
|
||||||
@@ -28,6 +22,12 @@ VOID SuspendProcessThreads(DWORD dwProcessId, DWORD dwThreadId, HANDLE *lphThrea
|
|||||||
|
|
||||||
VOID ResumeAndCloseThreads(HANDLE *lphThreads, SIZE_T dwSize);
|
VOID ResumeAndCloseThreads(HANDLE *lphThreads, SIZE_T dwSize);
|
||||||
|
|
||||||
|
BOOL IsWindows7Or8Point1(void);
|
||||||
|
|
||||||
|
BOOL IsWindows7(void);
|
||||||
|
|
||||||
|
BOOL IsWindows8Point1(void);
|
||||||
|
|
||||||
VOID _wdbgprintf(LPCWSTR format, ...);
|
VOID _wdbgprintf(LPCWSTR format, ...);
|
||||||
VOID _dbgprintf(LPCSTR format, ...);
|
VOID _dbgprintf(LPCSTR format, ...);
|
||||||
//#ifdef _DEBUG
|
//#ifdef _DEBUG
|
||||||
|
BIN
wufuc/version.rc
BIN
wufuc/version.rc
Binary file not shown.
@@ -105,6 +105,7 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -119,6 +120,7 @@
|
|||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -135,6 +137,7 @@
|
|||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -157,6 +160,7 @@
|
|||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
Reference in New Issue
Block a user