-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDeclarations.h
More file actions
139 lines (113 loc) · 4.25 KB
/
Copy pathDeclarations.h
File metadata and controls
139 lines (113 loc) · 4.25 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#pragma once
#include <cstdint>
#include <string>
#include <vector>
/*===========Enums & Typedefs==========*/
enum SearchMode {
SEARCH_EXACT,
SEARCH_BIGGER,
SEARCH_SMALLER,
SEARCH_BETWEEN,
SEARCH_UNKNOWN_INITIAL,
SEARCH_INCREASED,
SEARCH_DECREASED,
SEARCH_CHANGED,
SEARCH_UNCHANGED
};
enum DataType {
DATA_BYTE,
DATA_2BYTE,
DATA_4BYTE,
DATA_8BYTE,
DATA_FLOAT,
DATA_DOUBLE
};
/*===========Structs==========*/
struct ScanEntry {
uintptr_t address;
union {
uint8_t valByte;
uint16_t val2Byte;
uint32_t val4Byte;
uint64_t val8Byte;
float valFloat;
double valDouble;
} value;
DataType dataType;
};
struct SavedEntry {
bool freeze;
ScanEntry entry;
DataType savedType;
std::wstring desc;
std::wstring pointerExpr;
};
//===========================================================================
// Forward Declarations
//===========================================================================
// — Core application entry & message loop
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
DWORD WINAPI MainThread(LPVOID lpParam);
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved);
// — Dialog procedures
LRESULT CALLBACK AddAddressDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK EditAddressDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK ProcessDialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
// — In‐place edit controls
LRESULT CALLBACK SubItemEditProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
static LRESULT CALLBACK EditOffsetProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
// — List / log controls
static LRESULT CALLBACK OffsetsListProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK LogEditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
static LRESULT CALLBACK BaseAddrEditProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
static uintptr_t GetRemoteModuleBaseAddressByName(DWORD pid, const std::wstring& moduleName);
std::wstring DataTypeToString(DataType dt);
void UpdateScanResultsListView();
// — Window‐enumeration callbacks
BOOL CALLBACK EnumApplicationsProcW(HWND hwnd, LPARAM lParam);
BOOL CALLBACK EnumWindowsWindowsProcW(HWND hwnd, LPARAM lParam);
// — Core logic helpers
class ScanResultPager;
void LoadTableFromFile(const std::wstring& filename);
void AppendSavedAddress(const SavedEntry& saved);
bool FindPreviousEntry(uintptr_t address, ScanEntry& prevEntry);
void SearchPositionalPointerPaths();
DWORD WINAPI PointerScanThreadProc(LPVOID lpParam);
LRESULT CALLBACK PointerTableProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// — Unreal Engine
void ShowAutoOffsetsDialog(HWND hParent, uintptr_t worldPtr);
static std::vector<std::pair<uintptr_t, uintptr_t>> g_autoOffsets;
// - WinProc Definitions
static LRESULT Handle_CopyData(HWND hWnd, LPARAM lParam);
static LRESULT Handle_CtlColorStatic(WPARAM wParam, LPARAM lParam);
static LRESULT Handle_Create(HWND hWnd, LPARAM lParam);
static LRESULT Handle_Timer(HWND hWnd);
static LRESULT Handle_Notify(HWND hWnd, WPARAM wParam, LPARAM lParam);
static LRESULT Handle_Command(HWND hWnd, WPARAM wParam, LPARAM lParam);
static LRESULT Handle_Destroy(HWND hWnd);
// In‑place edit
void SubclassEditControl(HWND hEdit);
class ScanResultPager;
// Prototypes for “Show, Select, and Inject/Attach helpers,
void ShowEditAddressDialog(HWND hParent, int index);
void ShowAddAddressDialog(HWND hParent);
void SelectProcessDialog(HWND hParent);
void AttachToProcess(DWORD pid);
void InjectSelfIntoProcess(DWORD pid);
// Saved‑entry re‑resolution
void ResolvePendingSavedEntries();
// UI Helpers
void UpdateScanButtons(bool enabled);
void UpdateScanResultsListView();
void UpdateScanStatus();
// Scan core
bool PerformFirstScan(double searchVal, DataType dt, SearchMode searchMode);
bool PerformNextScan(double searchVal, DataType dt, SearchMode searchMode);
bool UndoScan();
void ResetScans();
bool GetSearchValueFromEdit(double& value);
// Hotkeys
void ShowHotkeysDialog(HWND hParent);
// Pause Process
static void PauseTargetProcess();
static void ResumeTargetProcess();