Answer the question
In order to leave comments, you need to log in
Why does the expression fail validation?
Hello
BOOL WINAPI MyMoveFileExW(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, DWORD dwFlags)
{
BOOL retValue;
if(lpExistingFileName != (LPCWSTR)L"C:\\Users\\sddvxd\\Desktop\\a.exe"){
VirtualProtect((LPVOID)pOrigMBAddress_2, SIZE, myProtect_2, NULL); // assign read write protection
memcpy((LPVOID)pOrigMBAddress_2, oldBytes_2, SIZE); // restore backup
retValue = pOrigMBAddress_2(lpExistingFileName, lpNewFileName, dwFlags);
memcpy((LPVOID)pOrigMBAddress_2, JMP_2, SIZE); // set the jump instruction again
VirtualProtect((LPVOID)pOrigMBAddress_2, SIZE, oldProtect_2, NULL); // reset protection
}
else{
retValue = FALSE;
}
return retValue;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question