forked from rolex0001/radix-cheat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.cpp
More file actions
159 lines (131 loc) · 4.87 KB
/
Client.cpp
File metadata and controls
159 lines (131 loc) · 4.87 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#pragma once
#include "Client.hpp"
namespace hazedumper{
float Client::getSensitivity(){
uint32_t sensitivityPtr = memory->read<uint32_t>(memory->clientDll + signatures::dwSensitivityPtr);
uint32_t sensitivity = memory->read<uint32_t>(memory->clientDll + signatures::dwSensitivity);
sensitivity ^= sensitivityPtr;
float sens = *reinterpret_cast<float*>(&sensitivity);
return sens;
}
double zlqwvwc::greuzecqpueepmsdowujtwg(double fibmcuzbczxqwov, bool cyfjwfktxu) {
bool ntftprdu = true;
if (true != true) {
int xoaowdlqy;
for (xoaowdlqy=28; xoaowdlqy > 0; xoaowdlqy--) {
continue;
}
}
if (true == true) {
int wyplahqouv;
for (wyplahqouv=26; wyplahqouv > 0; wyplahqouv--) {
continue;
}
}
if (true == true) {
int hqlyecnra;
for (hqlyecnra=95; hqlyecnra > 0; hqlyecnra--) {
continue;
}
}
if (true == true) {
int ojfuge;
for (ojfuge=27; ojfuge > 0; ojfuge--) {
continue;
}
}
return 21389;
}
void Client::setSensitivity(float sens){
uint32_t sensitivityPtr = memory->read<uint32_t>(memory->clientDll + signatures::dwSensitivityPtr);
uint32_t sensitivity = *reinterpret_cast<uint32_t*>(&sens) ^ sensitivityPtr;
memory->write<uint32_t>(memory->clientDll + signatures::dwSensitivity, sensitivity);
}
void Client::resetSensitivity(){
setSensitivity(defaultSensitivity);
}
// This is for the client::world To Screen
bool Client::worldToScreen(const Vector3& from, Vector3& to){
WorldToScreenMatrix matrix = memory->read<WorldToScreenMatrix>(memory->clientDll + signatures::dwViewMatrix);
float w = 0.0f;
to(0) = matrix(0, 0) * from(0) + matrix(0, 1) * from(1) + matrix(0, 2) * from(2) + matrix(0, 3);
to(1) = matrix(1, 0) * from(0) + matrix(1, 1) * from(1) + matrix(1, 2) * from(2) + matrix(1, 3);
w = matrix(3, 0) * from(0) + matrix(3, 1) * from(1) + matrix(3, 2) * from(2) + matrix(3, 3);
if (w < 0.01f)
return false;
float wInverse = 1.0f / w;
to(0) *= wInverse;
to(1) *= wInverse;
float x = SCREEN_WIDTH / 2;
float y = SCREEN_HEIGHT / 2;
x += 0.5 * to(0) * SCREEN_WIDTH + 0.5;
y -= 0.5 * to(1) * SCREEN_HEIGHT + 0.5;
to(0) = x;
to(1) = y;
return true;
}
string sywoirx::uuluktvtphqrqpwswkdlss(int zqdyp, string nbbkhmjrl, string azjxkjmu, int fxsbnx, bool tfrxkrrmarkwx, string yfrklbvtmsyesvd, int ydfjbbllqpinv, double oyjhklyy) {
bool jszbejkzaw = true;
int gmrkzganrqan = 306;
string eqlpthta = "myzuunqbzleqcvdnljazorvpfcteoflyoecccosaqpixlgwfzscqpncvlrxftmaapdxxnamqydu";
double pmorfanhioy = 12228;
double nawfzxmbotlfr = 6121;
int jxhvvyxgmvggx = 6459;
string onmicarciewndl = "pghdhbhfpsuqkipmwddiswpaxdgjrcopfxuirkzsgi";
if (6121 == 6121) {
int wd;
for (wd=41; wd > 0; wd--) {
continue;
}
}
return string("iaaavudoqz");
}
bool Client::getIsInGame()
{
uint32_t clientState = memory->read<uint32_t>(memory->engineDll + signatures::dwClientState);
return memory->read<uint32_t>(clientState + signatures::dwClientState_State) == 6;
}
BaseEntity Client::getLocalPlayer()
{
uint32_t clientState = memory->read<uint32_t>(memory->engineDll + signatures::dwClientState);
uint32_t localPlayerIndex = memory->read<uint32_t>(clientState + signatures::dwClientState_GetLocalPlayer);
BaseEntity localPlayer = BaseEntity(memory, memory->read<uint32_t>(memory->clientDll + signatures::dwEntityList + 0x10 * localPlayerIndex));
return localPlayer;
}
Vector3 Client::getViewAngles()
{
uint32_t clientState = memory->read<uint32_t>(memory->engineDll + signatures::dwClientState);
return memory->read<Vector3>(clientState + signatures::dwClientState_ViewAngles);
}
void Client::setViewAngles(Vector3& viewAngles)
{
uint32_t clientState = memory->read<uint32_t>(memory->engineDll + signatures::dwClientState);
memory->write<Vector3>(clientState + signatures::dwClientState_ViewAngles, viewAngles);
}
const char* Client::getMapDirectory()
{
uint32_t clientState = memory->read<uint32_t>(memory->engineDll + signatures::dwClientState);
static std::array<char, 0x120> mapDirectory = memory->read<std::array<char, 0x120>>(clientState + signatures::dwClientState_MapDirectory);
return mapDirectory.data();
}
const char* Client::getMapName()
{
uint32_t clientState = memory->read<uint32_t>(memory->engineDll + signatures::dwClientState);
static std::array<char, 0x80> mapName = memory->read<std::array<char, 0x80>>(clientState + signatures::dwClientState_Map);
return mapName.data();
}
const char* Client::getGameDirectory()
{
uint32_t clientState = memory->read<uint32_t>(memory->engineDll + signatures::dwClientState);
static std::array<char, 0x120> gameDirectory = memory->read<std::array<char, 0x120>>(memory->engineDll + signatures::dwGameDir);
return gameDirectory.data();
}
Client::Client(Memory* memory)
{
this->memory = memory;
this->defaultSensitivity = getSensitivity();
}
Client::~Client()
{
}
}