/
Menu.cpp
359 lines (309 loc) · 14.3 KB
/
Menu.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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
#include "stdafx.h"
#include "Menu.h"
#include "imgui/imgui.h"
# include "globals.h"
#include "imgui/imgui_impl_win32.h"
#include "imgui/imgui_impl_dx12.h"
#include "obfuscator.hpp"
#include "xor.hpp"
#include"memory.h"
#include "unlockAll.h"
#define INRANGE(x,a,b) (x >= a && x <= b)
#define getBits( x ) (INRANGE((x&(~0x20)),'A','F') ? ((x&(~0x20)) - 'A' + 0xa) : (INRANGE(x,'0','9') ? x - '0' : 0))
#define getByte( x ) (getBits(x[0]) << 4 | getBits(x[1]))
bool b_menu_open = false;
bool b_debug_open = false;
bool boxcheck;
uintptr_t cbuff1;
uintptr_t cbuff2;
__int64 find_pattern(__int64 range_start, __int64 range_end, const char* pattern) {
const char* pat = pattern;
__int64 firstMatch = NULL;
__int64 pCur = range_start;
__int64 region_end;
MEMORY_BASIC_INFORMATION mbi{};
while (sizeof(mbi) == VirtualQuery((LPCVOID)pCur, &mbi, sizeof(mbi))) {
if (pCur >= range_end - strlen(pattern))
break;
if (!(mbi.Protect & (PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_READWRITE))) {
pCur += mbi.RegionSize;
continue;
}
region_end = pCur + mbi.RegionSize;
while (pCur < region_end)
{
if (!*pat)
return firstMatch;
if (*(PBYTE)pat == '\?' || *(BYTE*)pCur == getByte(pat)) {
if (!firstMatch)
firstMatch = pCur;
if (!pat[1] || !pat[2])
return firstMatch;
if (*(PWORD)pat == '\?\?' || *(PBYTE)pat != '\?')
pat += 3;
else
pat += 2;
}
else {
if (firstMatch)
pCur = firstMatch;
pat = pattern;
firstMatch = 0;
}
pCur++;
}
}
return NULL;
}
bool init_once = true;
char input[30];
bool Unlock_once = true;
namespace g_menu
{
void menu()
{
if (GetAsyncKeyState(VK_INSERT) & 0x1)
{
b_menu_open = !b_menu_open;
}
if (init_once)
{
//init_buffer();
init_once = false;
}
if (b_menu_open && screenshot::visuals)
{
ImGuiStyle* style = &ImGui::GetStyle();
ImGui::Begin(xorstr("MENU"), &b_menu_open, ImGuiWindowFlags_::ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_::ImGuiWindowFlags_NoResize);
ImGui::SetWindowSize(ImVec2(560, 560), ImGuiCond_Always);
style->WindowTitleAlign = ImVec2(0.5, 0.5);
style->WindowPadding = ImVec2(15, 15);
style->WindowRounding = 5.0f;
style->FramePadding = ImVec2(5, 5);
style->FrameRounding = 4.0f;
style->ItemSpacing = ImVec2(12, 8);
style->ItemInnerSpacing = ImVec2(8, 6);
style->IndentSpacing = 25.0f;
style->ScrollbarSize = 15.0f;
style->ScrollbarRounding = 9.0f;
style->GrabMinSize = 5.0f;
style->GrabRounding = 3.0f;
style->Colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f);
style->Colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
style->Colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
style->Colors[ImGuiCol_PopupBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
style->Colors[ImGuiCol_Border] = ImVec4(0.80f, 0.80f, 0.83f, 0.88f);
style->Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f);
style->Colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
style->Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
style->Colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
style->Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
style->Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
style->Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
style->Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
style->Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
style->Colors[ImGuiCol_CheckMark] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
style->Colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
style->Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
style->Colors[ImGuiCol_Button] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
style->Colors[ImGuiCol_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
style->Colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
style->Colors[ImGuiCol_Header] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
style->Colors[ImGuiCol_HeaderHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
style->Colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
style->Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
style->Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
style->Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
style->Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
style->Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
style->Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
style->Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
style->Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f);
style->Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
style->Colors[ImGuiCol_TitleBg] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_TitleBgActive] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_TitleBgCollapsed] = ImColor(142, 30, 255, 100);
/*style->FramePadding = ImVec2(8, 6);
style->Colors[ImGuiCol_WindowBg] = ImColor(69, 69, 69, 69);
style->Colors[ImGuiCol_TitleBg] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_TitleBgActive] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_TitleBgCollapsed] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_FrameBg] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_FrameBgActive] = ImColor(106, 22, 191, 100);
style->Colors[ImGuiCol_FrameBgHovered] = ImColor(199, 143, 255, 100);
style->Colors[ImGuiCol_Header] = ImColor(199, 143, 255, 100);
style->Colors[ImGuiCol_Header] = ImColor(106, 22, 191, 100);
style->Colors[ImGuiCol_ButtonHovered] = ImColor(199, 143, 255, 100);*/
ImGui::Text(xorstr("On GamePad:"), globals::gamepad ? "yes" : "no");
ImGui::Text(xorstr("In Game: %s"), globals::b_in_game ? "yes" : "no");
ImGui::Text(xorstr("Menu Key: INSERT"));
//ImGui::Text(xorstr("refdef: %x"), globals::refdefadd);
/* ImGui::Text(xorstr("esp loop called: %d"), globals::call);
ImGui::Text(xorstr("total players: %d"), globals::max_player_count);
ImGui::Text(xorstr("local player: 0x%x"), globals::local_ptr);
ImGui::Text(xorstr("local player alive: %s"), globals::local_is_alive ? "yes" : "no");
*/
/*ImGui::Text(xorstr("stance: %s"), globals::stance);
ImGui::Text(xorstr("BitBlt hook: %s"), screenshot::bit_blt_fail);
ImGui::Text(xorstr("BitBlt hook addr: %x"), screenshot::bit_blt_anotherlog);
ImGui::Text(xorstr("BitBlt log: %d"), screenshot::bit_blt_log);
ImGui::Text(xorstr("NtGdiStretchBlt hook: %s"), screenshot::GdiStretchBlt_fail);
ImGui::Text(xorstr("NtGdiStretchBlt hook addr: %x"), screenshot::GdiStretchBlt_anotherlog);
ImGui::Text(xorstr("NtGdiStretchBlt log: %d"), screenshot::GdiStretchBlt_log);
ImGui::Text(xorstr("texture_copy hook addr: %x"), screenshot::texture_copy_log);*/
ImGui::Text(xorstr("Fiz + Aoc Are Cute"));
/*ImGui::Text(xorstr("virtquery hook addr: 0x%x"), screenshot::virtualqueryaddr);*/
ImGui::Separator();
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
style->Colors[ImGuiCol_Tab] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_TabHovered] = ImColor(106, 22, 191, 100);
style->Colors[ImGuiCol_TabActive] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_CheckMark] = ImColor(106, 22, 191, 100);
ImGui::BeginTabBar("##tab1"); //beginTabBar needs to be called before BeginTabItem
if (ImGui::BeginTabItem("ESP"))
{
style->Colors[ImGuiCol_SliderGrab] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_SliderGrabActive] = ImColor(142, 30, 255, 100);
style->Colors[ImGuiCol_Border] = ImColor(142, 30, 255, 100);
ImGui::Checkbox(xorstr("Color Visibility"), &globals::b_visible);
ImGui::Checkbox(xorstr("Show Only Visible"), &globals::b_visible_only);
ImGui::Checkbox(xorstr("Show Box"), &globals::b_box);
ImGui::SameLine();
ImGui::Combo("##", &globals::box_index, globals::box_types, 2);
ImGui::Checkbox(xorstr("Show HealthBar"), &globals::b_health);
ImGui::Checkbox(xorstr("Show Line"), &globals::b_line);
ImGui::Checkbox(xorstr("Show Bones "), &globals::b_skeleton);
ImGui::Checkbox(xorstr("Show Aim Point"), &globals::b_aim_point);
ImGui::Checkbox(xorstr("Show Names"), &globals::b_names);
ImGui::Checkbox(xorstr("Show Distance"), &globals::b_distance);
ImGui::Checkbox(xorstr("Show Team"), &globals::b_friendly);
ImGui::SliderInt(xorstr("##MAXDISTANCE"), &globals::max_distance, 0, 1000, xorstr("ESP Distance: %d"));
ImGui::EndTabItem();
}
/// <summary>
/// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// </summary>
if (ImGui::BeginTabItem("Loot"))
{
ImGui::Checkbox("Show Name ", &loot::name);
ImGui::Checkbox("Show Distance ", &loot::distance);
ImGui::Spacing();
ImGui::Spacing();
ImGui::Separator();
ImGui::Spacing();
ImGui::Checkbox("Assault Rifle ", &loot::ar);
ImGui::Checkbox("LMG ", &loot::lmg);
ImGui::Checkbox("SMG ", &loot::smg);
ImGui::Checkbox("Shotgun ", &loot::shotgun);
ImGui::Checkbox("Pistol ", &loot::pistol);
ImGui::Checkbox("Assault Rifle Ammo ", &loot::ar_ammo);
ImGui::Checkbox("Pistol/Smg Ammo ", &loot::smg_ammo);
ImGui::Checkbox("Shotgun Ammo ", &loot::shotgun_ammo);
ImGui::Checkbox("Sniper Ammo ", &loot::sniper_ammo);
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Aimbot"))
{
ImGui::Checkbox(xorstr("Skip Knocked"), &globals::b_skip_knocked);
ImGui::Checkbox(xorstr("Aim Lock"), &globals::b_lock);
ImGui::Checkbox(xorstr("Prediction"), &globals::b_prediction);
ImGui::SliderInt(xorstr("##LOCKSMOOTH"), &globals::aim_smooth, 1, 30, xorstr("Lock Smooth: %d"));
//ImGui::SliderFloat(xorstr("##BULLETSPEED"), &globals::bullet_speed, 1, 5000, xorstr("Bulled Speed: %.1f"));
ImGui::Checkbox(xorstr("Show FOV"), &globals::b_fov);
if (globals::b_fov)
{
ImGui::SliderFloat(xorstr("##LOCKFOV"), &globals::f_fov_size, 10.f, 800.f, xorstr("FOV Size: %0.0f"));
}
ImGui::Checkbox(xorstr("Use Bones"), &globals::target_bone);
if (globals::target_bone)
{
ImGui::Combo(xorstr("Lock Bone"), &globals::bone_index, globals::aim_lock_point, 4);
}
ImGui::EndTabItem();
}
/// <summary>
/// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// </summary>
if (ImGui::BeginTabItem("Misc"))
{
ImGui::Checkbox(xorstr("Show Crosshair"), &globals::b_crosshair);
ImGui::Checkbox(xorstr("Infinite UAV"), &globals::b_UAV);
ImGui::Checkbox(xorstr("No Recoil"), &globals::b_recoil);
// ImGui::Combo("Theme", &globals::theme, globals::theme_choose, 2);
// ImGui::Spacing();
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ImGui::Text("Command: ");
// ImGui::SameLine();
// if (ImGui::InputText("##", input, sizeof(input) + 1, ImGuiInputTextFlags_EnterReturnsTrue ))
// {
// //// Just for testing Commands
// std::string convert_to_string = std::string(input);
// CBuff(convert_to_string);
// }
//
/// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/*ImGui::Checkbox("Third Person Mode", &globals::third_person);
if (globals::third_person)
{
CBuff("NOSLRNTRKL 1"); //Third Person Mode ON
}
else
{
CBuff("NOSLRNTRKL 0"); //Third Person Mode OFF
}
ImGui::Checkbox("FOV Scale", &globals::b_scale_Fov);
if (globals::b_scale_Fov)
{
ImGui::SliderFloat("##Fov", &globals::fov, 1.2f, 2.0f, "Fov Scale: %f");
std::string fov = "NSSLSNKPN " + std::to_string(globals::fov); // FOV SCALE
CBuff(fov);
}
ImGui::Checkbox("Skip Warzone Tutorial", &globals::b_tut);
if (globals::b_tut)
{
CBuff("LSPSKLPNQT 1");
}
else
CBuff("LSPSKLPNQT 0");
ImGui::Checkbox("Semi Unlock All", &globals::b_unlock);
if (globals::b_unlock)
{
CBuff("set OLKMKMTKRO 1;");
}
else
CBuff("set OLKMKMTKRO 0;");
ImGui::Checkbox("Clear Fog", &globals::b_fog);
if (globals::b_fog)
{
CBuff("set LSPSKLPNQT 1;");
}
else
CBuff("set LSPSKLPNQT 0;");*/
ImGui::EndTabItem();
}
}
/// <summary>
/// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// </summary>
if (ImGui::BeginTabItem("Colour"))
{
ImGui::Checkbox("RGB Mode", &globals::b_rainbow);
ImGui::Text("Visible Team Color");
ImGui::ColorEdit4("##esp Color1", (float*)&color::VisibleColorTeam);
ImGui::Spacing();
ImGui::Text("Not Visible Team Color");
ImGui::ColorEdit4("##esp Color2", (float*)&color::NotVisibleColorTeam);
ImGui::Spacing();
ImGui::Text("Visible Enemy Color");
ImGui::ColorEdit4("##esp Color3", (float*)&color::VisibleColorEnemy);
ImGui::Spacing();
ImGui::Text("Not Visible Enemy Color");
ImGui::ColorEdit4("##esp Color4", (float*)&color::NotVisibleColorEnemy);
ImGui::Text("loot Color");
ImGui::ColorEdit4("##esp lootcolor", (float*)&loot::lootcolor);
ImGui::EndTabItem(); //color tab end;
}
ImGui::EndTabBar(); // needs to be called at the end when using tabs
ImGui::End();
}
}