Showing the changes to trojan/vx-api/AdfIsCreateProcessDebugEventCodeSet.cpp (1 of 749 files). Show all
Unified · Split
| @@ -0,0 +1,19 @@ | ||
| 1 | +#include "Win32Helper.h" | |
| 2 | + | |
| 3 | +BOOL AdfIsCreateProcessDebugEventCodeSet(VOID) | |
| 4 | +{ | |
| 5 | + WCHAR FilePath[MAX_PATH * sizeof(WCHAR)] = { 0 }; | |
| 6 | + HANDLE hHandle = INVALID_HANDLE_VALUE; | |
| 7 | + | |
| 8 | + if (GetProcessPathFromUserProcessParametersW((MAX_PATH * sizeof(WCHAR)), FilePath) == 0) | |
| 9 | + return FALSE; | |
| 10 | + | |
| 11 | + hHandle = CreateFileW(FilePath, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); | |
| 12 | + if (hHandle == INVALID_HANDLE_VALUE) | |
| 13 | + return TRUE; | |
| 14 | + | |
| 15 | + if (hHandle) | |
| 16 | + CloseHandle(hHandle); | |
| 17 | + | |
| 18 | + return FALSE; | |
| 19 | +} | |