-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwallhack.h
58 lines (42 loc) · 985 Bytes
/
wallhack.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
//
// Created by zHd4 on 31.07.2020.
//
#include <string>
#include <cstdint>
#include <windows.h>
#include <tlhelp32.h>
#include <iostream>
#ifndef WALLCSS_WALLHACK_H
#define WALLCSS_WALLHACK_H
#define ENABLE_WALLHACK 2
#define DISABLE_WALLHACK 1
using namespace std;
const uintptr_t WH_ADDRESS = 0x243B0C9C;
class MemAccessException : public exception {
private:
string message;
public:
explicit MemAccessException(const string& msg);
const char* what() const noexcept override;
};
class Wallhack {
private:
string gameWindowName;
DWORD pid;
HWND hWindow;
HANDLE hProcess;
bool flashing = false;
short state = DISABLE_WALLHACK;
short getNextState();
void setStateFromMemory();
void changeDrawMode(short mode, short* statePtr);
public:
Wallhack(const string& gameWindowName);
void init();
bool isAvailable();
bool isActive();
bool isFlashing();
void toggle();
void toggleFlashing();
};
#endif