-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmain.h
93 lines (76 loc) · 1.91 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#pragma once
#include <phdk.h>
#define ORIGINAL_CLASS_NAME L"ProcessHacker"
VOID NTAPI UnloadCallback(
__in_opt PVOID Parameter,
__in_opt PVOID Context
);
// RegisterClassExW hook
typedef WINUSERAPI
ATOM
(WINAPI *TRegisterClassExW)(
_In_ CONST WNDCLASSEXW *);
WINUSERAPI
ATOM
WINAPI
H_RegisterClassExW(
_In_ CONST WNDCLASSEXW *);
TRegisterClassExW O_RegisterClass;
// End RegisterClassExW hook
// CreateWindowExW hook
typedef HWND(WINAPI *TCreateWindowExW)(
_In_ DWORD dwExStyle,
_In_opt_ LPCTSTR lpClassName,
_In_opt_ LPCTSTR lpWindowName,
_In_ DWORD dwStyle,
_In_ int x,
_In_ int y,
_In_ int nWidth,
_In_ int nHeight,
_In_opt_ HWND hWndParent,
_In_opt_ HMENU hMenu,
_In_opt_ HINSTANCE hInstance,
_In_opt_ LPVOID lpParam
);
HWND WINAPI H_CreateWindowExW(
_In_ DWORD dwExStyle,
_In_opt_ LPCTSTR lpClassName,
_In_opt_ LPCTSTR lpWindowName,
_In_ DWORD dwStyle,
_In_ int x,
_In_ int y,
_In_ int nWidth,
_In_ int nHeight,
_In_opt_ HWND hWndParent,
_In_opt_ HMENU hMenu,
_In_opt_ HINSTANCE hInstance,
_In_opt_ LPVOID lpParam
);
TCreateWindowExW O_CreateWindow;
// End CreateWindowExW hook
// Start FindWindowExW hook
typedef HWND(WINAPI *TFindWindowExW)(
_In_opt_ HWND hWndParent,
_In_opt_ HWND hWndChildAfter,
_In_opt_ LPCWSTR lpszClass,
_In_opt_ LPCWSTR lpszWindow
);
HWND WINAPI H_FindWindowExW(
_In_opt_ HWND hWndParent,
_In_opt_ HWND hWndChildAfter,
_In_opt_ LPCWSTR lpszClass,
_In_opt_ LPCWSTR lpszWindow
);
TFindWindowExW O_FindWindow;
// End FindWindowExW hook
WCHAR *RandomString();
WCHAR *ClassName;
HWND MainWindowHandle;
PPH_PLUGIN PluginInstance;
PH_CALLBACK_REGISTRATION PluginUnloadCallbackRegistration;
typedef struct _RANGE {
ULONG From;
ULONG To;
} RANGE;
RANGE *Ranges;
ULONG RangesSize;