fix comment spacing, variable names
This commit is contained in:
12
wufuc/core.c
12
wufuc/core.c
@@ -114,20 +114,20 @@ BOOL PatchWUModule(HMODULE hModule) {
|
||||
MODULEINFO modinfo;
|
||||
GetModuleInformation(GetCurrentProcess(), hModule, &modinfo, sizeof(MODULEINFO));
|
||||
|
||||
SIZE_T offset;
|
||||
if (!FindPattern(modinfo.lpBaseOfDll, modinfo.SizeOfImage, lpszPattern, 0, &offset)) {
|
||||
SIZE_T rva;
|
||||
if (!FindPattern(modinfo.lpBaseOfDll, modinfo.SizeOfImage, lpszPattern, 0, &rva)) {
|
||||
return FALSE;
|
||||
}
|
||||
SIZE_T rva = (SIZE_T)modinfo.lpBaseOfDll + offset;
|
||||
_tdbgprintf(_T("IsDeviceServiceable(void) matched at %p"), rva);
|
||||
SIZE_T fpIsDeviceServiceable = (SIZE_T)modinfo.lpBaseOfDll + 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) {
|
||||
*lpbNotRunOnce = FALSE;
|
||||
_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) {
|
||||
*lpbCachedResult = TRUE;
|
||||
_tdbgprintf(_T("Patched %p=%d"), lpbCachedResult, *lpbCachedResult);
|
||||
|
Reference in New Issue
Block a user