-
Notifications
You must be signed in to change notification settings - Fork 0
/
HackjaggoDlg.h
122 lines (86 loc) · 2.51 KB
/
HackjaggoDlg.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#pragma once
#include <vector>
#include <map>
class CHackjaggoDlg : public CDialogEx
{
struct list_control_item {
CString strPID;
CString strName;
list_control_item(const CString _strPID, const CString _strName) {
strPID = _strPID;
strName = _strName;
}
};
struct FunctionInfo {
DWORD functionRVA;
DWORD functionNameRVA;
WORD functionOrdinal;
const char* functionName;
};
enum ProcessesListControlColumns : int
{
ProcessesListControlColumnPID,
ProcessesListControlColumnName,
};
enum LoadedModulesListControlColumns : int {
LoadedModulesListControlColumnName,
LoadedModulesListControlColumnFullPath,
LoadedModulesListControlColumnBaseDllAddress,
LoadedModulesListControlColumnVersion,
};
enum ModuleFunctionsListControlColumns : int {
ModuleFunctionsListControlColumnName,
ModuleFuntionsListControlUndecoratedName,
ModuleFuntionsListControlOrdinal,
ModuleFuntionsListControlAddressRVA,
};
DECLARE_MESSAGE_MAP();
public:
CHackjaggoDlg(CWnd* pParent = nullptr);
virtual ~CHackjaggoDlg() = default;
// dialog resource
enum { IDD = IDD_HACKJAGGO_DIALOG };
protected:
// handles the ddx controls
void DoDataExchange(CDataExchange* pDX) override;
// runs on dialog initialization
BOOL OnInitDialog() override;
private:
void InitializeProcessesListControl();
void InitializeLoadedModulesListControls();
void InitializeModulesFunctionsListControl();
void ListExportedFunctions(const TCHAR* modulePath);
void SetListControlItems();
void FilterProcesses(const CString& filterText);
void EnumerateExportedFunctions(HMODULE hModule);
CString GetDllVersion(const CStringW& dllPath);
private:
// handles on-paint message
afx_msg void OnPaint();
// handes on-drag dialog
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
afx_msg void OnContexMenuLoadedModules();
afx_msg void OnContextMenuModuleFunctions();
afx_msg void OnTextChanged();
private:
// icon
HICON m_hIcon;
// the processes list control
CListCtrl m_oProcessesListControl;
// processes list control context menu
CMenu m_oProcessesListControlContextMenu;
// loaded modules list control context menu
CMenu m_oLoadedModulesListControlContextMenu;
// filter control
CEdit m_oTextFilter;
// loaded modules
CListCtrl m_oLoadedModulesListControl;
// module functions
CListCtrl m_oModuleFunctionsListControl;
// exe name
CStatic m_oExeName;
// module name
CStatic m_oModuleName;
std::vector<list_control_item> m_oProccessesListControlPidToNameVector;
};