This commit is contained in:
zeffy
2017-10-09 18:30:52 -07:00
parent 350f1ee362
commit 2d477a51c6
2 changed files with 3 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ bool patch_wua(void *lpBaseOfDll, size_t SizeOfImage, wchar_t *fname)
if ( *pba == TRUE ) { if ( *pba == TRUE ) {
if ( VirtualProtect(pba, sizeof(BOOL), PAGE_READWRITE, &flOldProtect) ) { if ( VirtualProtect(pba, sizeof(BOOL), PAGE_READWRITE, &flOldProtect) ) {
*pba = FALSE; *pba = FALSE;
trace(L"Patched value a at %ls!%p: %08X", fname, pba, *pba); trace(L"Patched value #1 at %ls!%p: %08X", fname, pba, *pba);
if ( !VirtualProtect(pba, sizeof(BOOL), flOldProtect, &flOldProtect) ) if ( !VirtualProtect(pba, sizeof(BOOL), flOldProtect, &flOldProtect) )
trace(L"Failed to restore memory region permissions at %ls!%p (error code=%08X)", fname, pba, GetLastError()); trace(L"Failed to restore memory region permissions at %ls!%p (error code=%08X)", fname, pba, GetLastError());
} else trace(L"Failed to change memory region permissions at %ls!%p (error code=%08X)", fname, pba, GetLastError()); } else trace(L"Failed to change memory region permissions at %ls!%p (error code=%08X)", fname, pba, GetLastError());
@@ -66,7 +66,7 @@ bool patch_wua(void *lpBaseOfDll, size_t SizeOfImage, wchar_t *fname)
if ( *pbb == FALSE ) { if ( *pbb == FALSE ) {
if ( VirtualProtect(pbb, sizeof(BOOL), PAGE_READWRITE, &flOldProtect) ) { if ( VirtualProtect(pbb, sizeof(BOOL), PAGE_READWRITE, &flOldProtect) ) {
*pbb = TRUE; *pbb = TRUE;
trace(L"Patched value b at %ls!%p: %08X", fname, pbb, *pbb); trace(L"Patched value #2 at %ls!%p: %08X", fname, pbb, *pbb);
if ( !VirtualProtect(pbb, sizeof(BOOL), flOldProtect, &flOldProtect) ) if ( !VirtualProtect(pbb, sizeof(BOOL), flOldProtect, &flOldProtect) )
trace(L"Failed to restore memory region permissions at %ls!%p: (error code=%08X)", fname, pbb, GetLastError()); trace(L"Failed to restore memory region permissions at %ls!%p: (error code=%08X)", fname, pbb, GetLastError());
} else trace(L"Failed to change memory region permissions at %ls!%p (error code=%08X)", fname, pbb, GetLastError()); } else trace(L"Failed to change memory region permissions at %ls!%p (error code=%08X)", fname, pbb, GetLastError());

View File

@@ -5,7 +5,7 @@
#define BUILD_COMMIT_VERSION 0.8.0.0 #define BUILD_COMMIT_VERSION 0.8.0.0
#endif #endif
#ifndef BUILD_VERSION_COMMA #ifndef BUILD_VERSION_COMMA
#define BUILD_VERSION_COMMA 0,8.0,0 #define BUILD_VERSION_COMMA 0,8,0,0
#endif #endif
#define STRINGIZE_(x) #x #define STRINGIZE_(x) #x
#define STRINGIZE(x) STRINGIZE_(x) #define STRINGIZE(x) STRINGIZE_(x)