-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.cpp
51 lines (38 loc) · 1.32 KB
/
main.cpp
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
#include <Windows.h>
#include "process.h"
#include "patternscan.h"
#include "memhack.h"
//String Conversion Snippet for the sake of knowledge
void StringConversions()
{
char* c_string = "ac_client.exe";
wchar_t* wc_converted = TO_WCHAR_T(c_string);
delete wc_converted;
wchar_t * wc_string = L"ac_client.exe";
char * c_converted = TO_CHAR(wc_string);
delete c_converted;
}
int main()
{
//String Conversion Snippet
StringConversions();
//Get procEntry
Process ac_clientProc = Process(TEXT("ac_client.exe"));
//Get handle by OpenProcess
ac_clientProc.Attach();
Module ac_clientMod = Module(&ac_clientProc, TEXT("ac_client.exe"));
if (ac_clientMod.bValid)
{
//PatternScan for pattern in ac_client.exe module of ac_client.exe process
char* healthDecAddress = Pattern::Ex::Mod("\x29\x7b\x00\x8b\xc7", "xx?xx", &ac_clientMod);
//Scan all modules in process
healthDecAddress = Pattern::Ex::AllMods("\x29\x7b\x00\x8b\xc7", "xx?xx", &ac_clientProc);
//Scan module using combo pattern
healthDecAddress = Pattern::Ex::Mod("29 7b ?? 8b c7", &ac_clientMod);
//Scan all modules using combo pattern
healthDecAddress = Pattern::Ex::AllMods("29 7b ?? 8b c7", &ac_clientProc);
//Nop the instructions
NopEx(healthDecAddress, 5, ac_clientProc.handle);
}
return 0;
}