PE-sieve
Scans all running processes. Recognizes and dumps a variety of potentially malicious implants (replaced/implanted PEs, shellcodes, hooks, in-memory patches).
Loading...
Searching...
No Matches
custom_mutex.h
Go to the documentation of this file.
1#pragma once
2#include <peconv.h>
3
4namespace pesieve
5{
6 namespace util {
7
8 struct Mutex {
9 public:
11 {
12 InitializeCriticalSection(&cs);
13 }
14
15 void Lock()
16 {
17 EnterCriticalSection(&cs);
18 }
19
20 void Unlock()
21 {
22 LeaveCriticalSection(&cs);
23 }
24
26 {
27 DeleteCriticalSection(&cs);
28 }
29
30 private:
31 CRITICAL_SECTION cs;
32 };
33
35 {
36 public:
38 : mutex(_mutex)
39 {
40 mutex.Lock();
41 }
42
44 {
45 mutex.Unlock();
46 }
47
48 private:
49 Mutex& mutex;
50 };
51
52 }; //namespace util
53
54}; //namespace pesieve