-
Notifications
You must be signed in to change notification settings - Fork 1
/
zap.cpp
636 lines (546 loc) · 23.4 KB
/
zap.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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
// Externals
#include <glfw3.h>
//#include <X11/Xlib.h> linux
#include <atomic>
#include <chrono>
#include <filesystem>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
#include <thread>
//#include <unistd.h> linux
#include <vector>
#include <cstdlib>
//#include <pwd.h> linux
#include <Windows.h>
#include <ShlObj.h>
// Driver
#include "Utils/Driver.hpp"
// Internals
#include "Core/Camera.hpp"
#include "Core/Level.hpp"
#include "Core/LocalPlayer.hpp"
#include "Core/Offsets.hpp"
#include "Core/Player.hpp"
#include "Features/Flickbot.hpp"
#include "Features/Glow.hpp"
#include "Features/Legitbot.hpp"
#include "Features/Misc.hpp"
#include "Features/Radar.hpp"
#include "Features/Ragebot.hpp"
#include "Features/Sense.hpp"
#include "Features/Triggerbot.hpp"
// #include "Features/Test.hpp"
#include "Overlay/FontAwesome.h"
#include "Overlay/GUI.hpp"
#include "Overlay/Overlay.hpp"
#include "Utils/Config.hpp"
#include "Utils/ConfigManager.hpp"
#include "Utils/Features.hpp"
#include "Utils/Memory.hpp"
//#include "Utils/XDisplay.hpp" linux
#include "DriverHID.hpp"
#include "imgui/imgui.h"
// Objects
//XDisplay* X11Display = new XDisplay(); linux
DriverHID* DHID;
Overlay OverlayWindow = Overlay();
ImDrawList* Canvas;
// Game Objects
Level* Map = new Level();
LocalPlayer* Myself = new LocalPlayer();
Camera* GameCamera = new Camera();
// Players
std::vector<Player*>* HumanPlayers = new std::vector<Player*>;
std::vector<Player*>* Dummies = new std::vector<Player*>;
std::vector<Player*>* Players = new std::vector<Player*>;
// Features
Sense* ESP = new Sense(Map, Players, GameCamera, Myself, DHID);
Radar* MapRadar = new Radar(DHID, Players, GameCamera, Map, Myself);
Glow* GlowESP = new Glow(Map, Players, GameCamera, Myself);
Legitbot* Legit = new Legitbot(DHID, Map, Myself, Players);
Ragebot* Rage = new Ragebot(DHID, Map, Myself, Players);
Triggerbot* Trigger = new Triggerbot(DHID, Map, Myself, Players);
Flickbot* Flick = new Flickbot(DHID, Map, Myself, Players);
Misc* MiscTab = new Misc(DHID, Map, Myself, Players);
// Other
Overlay* Home = new Overlay;
AdvancedGUI* Advanced = new AdvancedGUI;
Menu* GUI = new Menu(Myself, Advanced);
ConfigManager* Configs = new ConfigManager(Legit, Rage, Flick, Trigger, GlowESP, ESP, MapRadar, MiscTab);
// Booleans and Variables
bool IsMenuOpened = true;
// Driver
HMODULE hModule;
bool DStatus = false; // driver init
// Thread
std::atomic_bool StopThread(false);
// Icons
ImFont* IconFont = nullptr;
void Sleep(int Delay) { // Looks better than a bunch of (std::this_thread::sleep_for) lines
std::this_thread::sleep_for(std::chrono::milliseconds(Delay));
}
// Menu opened?
void MenuStateRun() {
while (!StopThread) {
if (InputManager::isKeyDown(Features::Settings::MenuBind)) {
Features::Home::IsMenuOpened = !Features::Home::IsMenuOpened;
OverlayWindow.CaptureInput(Features::Home::IsMenuOpened);
std::this_thread::sleep_for(std::chrono::milliseconds(250));
}
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
}
// Overlay
bool InitializeOverlayWindow() {
if (!OverlayWindow.InitializeOverlay()) {
OverlayWindow.DestroyOverlay();
return false;
}
int ScreenWidth;
int ScreenHeight;
OverlayWindow.GetScreenResolution(ScreenWidth, ScreenHeight);
GameCamera->Initialize(ScreenWidth, ScreenHeight);
std::cout << "Overlay Initialized!" << std::endl;
return true;
}
// Load The Default Config
void LoadDefaultConfig() {
if (std::filesystem::exists("settings.txt")) { // Check if file exists
Configs->LoadDefaultConfig(); // Loads default config
}
else {
std::ofstream Default("settings.txt"); // Creates and opens file
Default << "Blank"; // Writes a default config to use
Default.close();
Configs->LoadDefaultConfig(); // Loads default config
}
}
// Interface
ImVec4 ProcessingTimeColor;
void CreateTabButton(const char* title, const Menu::MenuTabs tab, const ImVec2 size) {
const ImVec4 BaseTabButton = ImVec4(GUI->DetailColor.x, GUI->DetailColor.y, GUI->DetailColor.z, 0.00f);
const ImVec4 BaseTabButtonActive = ImVec4(GUI->DetailColor.x, GUI->DetailColor.y, GUI->DetailColor.z, 0.250f);
ImGui::PushStyleColor(ImGuiCol_Button, (GUI->CurrentTab == tab) ? BaseTabButtonActive : BaseTabButton);
if (ImGui::Button(title, size)) {
GUI->CurrentTab = tab;
}
ImGui::PopStyleColor(1);
}
void RenderUI() {
auto io = ImGui::GetIO();
ImGui::SetNextWindowSize(io.DisplaySize);
ImGui::SetNextWindowPos(ImVec2(0, 0));
ImGui::Begin("##Overlay", nullptr,
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar |
ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoBackground |
ImGuiSliderFlags_AlwaysClamp);
Canvas = ImGui::GetWindowDrawList();
MapRadar->RenderDrawings(Canvas, Myself, OverlayWindow);
ESP->RenderDrawings(Canvas, Legit, Myself, OverlayWindow);
ESP->RenderWatermark(Canvas, Myself, OverlayWindow);
ESP->RenderKeybinds(Canvas, Legit, Rage, Trigger, MiscTab, OverlayWindow);
ESP->RenderTargetInformation(Canvas, Legit, OverlayWindow);
ImGui::End();
ImGuiStyle& style = ImGui::GetStyle();
if (Features::Settings::AntiAliasedLines && !style.AntiAliasedLines) {
style.AntiAliasedLines = true;
}
else if (!Features::Settings::AntiAliasedLines && style.AntiAliasedLines) {
style.AntiAliasedLines = false;
}
if (!Features::Home::IsMenuOpened)
return;
ImDrawList* DrawList = ImGui::GetBackgroundDrawList();
GUI->SetStyle();
// Window Size
ImGui::SetNextWindowSizeConstraints(ImVec2(GUI->WindowWidth, GUI->WindowHeight), ImVec2(GUI->WindowWidth, GUI->WindowHeight));
ImGui::SetNextWindowSize(ImVec2(GUI->WindowWidth, GUI->WindowHeight), ImGuiCond_FirstUseEver);
// Setup flags and begin window
if (ImGui::Begin("##CheatGUI", &Features::Home::IsMenuOpened, GUI->WindowFlags)) {
// Setup "MenuSize" so that we can calculate control positions
ImVec2 MenuSize = ImGui::GetWindowSize();
// Render Left Panel
ImGui::SetCursorPos(ImVec2(10, 32));
ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
if (ImGui::BeginChild("##LeftPanel", ImVec2(GUI->WindowWidth / 6 - 5, GUI->WindowHeight - 43), true, ImGuiWindowFlags_NoScrollbar)) {
colors[ImGuiCol_Border] = colors[ImGuiCol_Border];
// Color the background of the tab button brighter if it is the active tab
const ImVec4 BaseTabButton = ImVec4(GUI->DetailColor.x, GUI->DetailColor.y, GUI->DetailColor.z, 0.00f);
const ImVec4 BaseTabButtonActive = ImVec4(GUI->DetailColor.x, GUI->DetailColor.y, GUI->DetailColor.z, 0.250f);
ImGuiStyle& Style = ImGui::GetStyle();
constexpr int ButtonHeight = 43;
Style.FrameBorderSize = 1;
colors[ImGuiCol_ButtonHovered] = BaseTabButtonActive;
colors[ImGuiCol_ButtonActive] = BaseTabButtonActive;
colors[ImGuiCol_Button] = BaseTabButton;
colors[ImGuiCol_Text] = GUI->TextColor;
CreateTabButton(ICON_FA_CROSSHAIRS " LEGITBOT", Menu::Legitbot, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
CreateTabButton(ICON_FA_CROSSHAIRS " RAGEBOT", Menu::Ragebot, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
CreateTabButton(ICON_FA_CROSSHAIRS " FLICKBOT", Menu::Flickbot, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
CreateTabButton(ICON_FA_CROSSHAIRS " TRIGGERBOT", Menu::Triggerbot, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
CreateTabButton(ICON_FA_EYE " GLOW", Menu::Glow, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
CreateTabButton(ICON_FA_EYE_SLASH " ESP", Menu::ESP, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
CreateTabButton(ICON_FA_COG " MISC", Menu::Misc, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
CreateTabButton(ICON_FA_COGS " SETTINGS", Menu::Settings, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
CreateTabButton(ICON_FA_SAVE " CONFIGS", Menu::Config, ImVec2(MenuSize.x / 6 - 35, ButtonHeight));
ImGui::EndChild();
}
std::stringstream TitleText, Date, Time, Version, UnknownCheats, Spacings;
TitleText << "zap-client";
Date << OverlayWindow.currentDateTime(2);
Time << OverlayWindow.currentDateTime(3);
Version << CheatVersion;
UnknownCheats << "Bata Version | Windows:)";
Spacings << " | ";
std::string combined = TitleText.str() + Spacings.str() + Date.str() + Spacings.str() + Time.str() + Spacings.str() + Version.str() + Spacings.str() + UnknownCheats.str();
const char* combinedText = combined.c_str();
ImVec2 WindowPosition = ImGui::GetWindowPos();
int TextPosition = WindowPosition.x + (GUI->WindowWidth / 3);
ImGui::GetForegroundDrawList()->AddText(ImVec2(TextPosition, WindowPosition.y + 10), ImColor(1.0, 1.0f, 1.0f, 1.0f), combinedText);
ImGui::GetForegroundDrawList()->AddLine(ImVec2(TextPosition - 5, WindowPosition.y + 23), ImVec2(TextPosition + 346, WindowPosition.y + 23), ImColor(255, 255, 255), 1);
// Render Right (Main) Panel
ImGui::SetCursorPos(ImVec2(175, 32));
colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
if (ImGui::BeginChild("##RightPanel", ImVec2(GUI->WindowWidth - 186, GUI->WindowHeight - 43), true, ImGuiWindowFlags_NoScrollbar)) {
colors[ImGuiCol_Border] = GUI->DetailColor;
// Render Tabs
switch (GUI->CurrentTab) {
case GUI->MenuTabs::Legitbot:
GUI->RenderLegitbot(OverlayWindow);
break;
case GUI->MenuTabs::Ragebot:
GUI->RenderRagebot();
break;
case GUI->MenuTabs::Flickbot:
GUI->RenderFlickbot();
break;
case GUI->MenuTabs::Triggerbot:
GUI->RenderTriggerbot();
break;
case GUI->MenuTabs::Glow:
GUI->RenderGlow();
break;
case GUI->MenuTabs::ESP:
GUI->RenderESP(OverlayWindow);
break;
case GUI->MenuTabs::Misc:
GUI->RenderMisc();
break;
case GUI->MenuTabs::Settings:
GUI->RenderSettings();
break;
case GUI->MenuTabs::Config:
ImVec2 TabSize;
TabSize = ImGui::GetWindowSize();
ImGui::SetCursorPos(ImVec2(0, 0));
ImGui::BeginChild("workzone", ImVec2(0, 0), false, ImGuiWindowFlags_NoScrollbar);
ImGui::SetCursorPos({ 15, 15 });
ImGui::BeginChild("workzone", ImVec2(GUI->WindowWidth - 186, GUI->WindowHeight - 60), false, ImGuiWindowFlags_NoScrollbar);
ImGui::BeginChildFrame(1, ImVec2(GUI->WindowWidth - 220, GUI->WindowHeight - 73), true);
{
GUI->DoubleSpacing();
Configs->LoadConfigs();
Configs->RenderConfigs();
ImGui::EndChildFrame();
}
ImGui::EndChild();
ImGui::EndChild();
break;
}
ImGui::EndChild();
Legit->UpdateAimList();
Legit->UpdateRCSList();
Rage->UpdateRageList();
Flick->UpdateFlickList();
Trigger->UpdateWeaponList();
MiscTab->UpdateRapidFireList();
GlowESP->ItemGlowSettings();
}
// Add Vertical Separator Line
ImVec2 C = ImGui::GetWindowPos();
const ImVec2 Point1 = ImVec2(MenuSize.x / 6 + 6.5f + C.x, 32 + C.y);
const ImVec2 Point2 = ImVec2(MenuSize.x / 6 + 6.5f + C.x, 32 + (MenuSize.y - 43) + C.y);
ImGui::GetWindowDrawList()->AddLine(Point1, Point2, ImGui::ColorConvertFloat4ToU32(GUI->DetailColor), 1.0f);
// End Drawlist Calls
ImGui::End();
}
}
// Core
bool UpdateCore() {
try {
// Map Checking //
Map->Read();
if (!Map->IsPlayable) {
return true;
}
// Read Local Player //
Myself->Read();
if (!Myself->IsValid()) {
return true;
}
// Populate Players //
/*Players->clear();
if (Map->IsFiringRange) {
for (int i = 0; i < Dummies->size(); i++) {
Player* p = Dummies->at(i);
p->Read();
if (p->BasePointer != 0 && (p->IsPlayer() || p->IsDummy()))
Players->push_back(p);
}
}
else {
for (int i = 0; i < HumanPlayers->size(); i++) {
Player* p = HumanPlayers->at(i);
p->Read();
if (p->BasePointer != 0 && (p->IsPlayer() || p->IsDummy()))
Players->push_back(p);
}
}*/
Players->clear();
for (auto p : Map->IsFiringRange ? *Dummies : *HumanPlayers) {
p->Read();
if (p->BasePointer != 0 && (p->IsPlayer() || p->IsDummy()))
Players->push_back(p);
}
// Updates //
GameCamera->Update();
GlowESP->Update();
GlowESP->ViewModelGlow();
Legit->UpdateAimbot();
Legit->UpdateRCS();
Rage->Update();
Trigger->Update();
Flick->Update();
MiscTab->Update();
MapRadar->ActivateBigMap();
return true;
}
catch (const std::exception& ex) {
std::system("clear");
std::cout << "Error: " << ex.what() << std::endl;
return true;
}
return false;
}
void LocalPlayerThreadRun() {
while (!StopThread) {
if (!Map->IsPlayable) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
continue;
}
if (!Myself->IsValid()) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
continue;
}
//----------------------------- SuperGlide -----------------------------
if (Features::Misc::SuperGlide)
MiscTab->SuperGlide();
//----------------------------- BHop -----------------------------
if (Features::Misc::BHop)
MiscTab->BHop();
//----------------------------- Auto Wall Jump -----------------------------
if (Features::Misc::WallJump)
MiscTab->WallJump();
//----------------------------- Auto Tap Strafe -----------------------------
if (Features::Misc::AutoTapStrafe)
MiscTab->AutoTapStrafe();
//----------------------------- QuickTurn -----------------------------
if (Features::Misc::QuickTurn)
MiscTab->QuickTurn();
//----------------------------- RapidFire -----------------------------
if (Features::Misc::RapidFire)
MiscTab->RapidFire();
//----------------------------- Other -----------------------------
}
}
std::string slurpFile(const std::string& absolutePath) {
std::string contents;
std::ifstream file;
file.open(absolutePath, std::ios::in);
if (file.fail()) {
return contents;
}
char c;
while (file.get(c)) {
contents += c;
}
file.close();
std::erase(contents, '\n');
std::erase(contents, '\r');
return contents;
}
// Credits - hir0xy
bool IsOutdated() { // Scan possible Steam installation paths for libraryfolders.vdf to then scan existing library folders for the games "gameversion.txt"
// Get currently logged in user, since getuid won't work when we're run as root
/*
struct passwd* pw;
const char* username = nullptr;
while ((pw = getpwent()) != nullptr) {
if (strncmp(pw->pw_dir, "/home/", 6) == 0) {
username = pw->pw_name;
break;
}
}
endpwent();
if (username == nullptr)
return true;
const std::string steamPaths[] = {
"/.steam/steam/config/libraryfolders.vdf",
"/.local/share/Steam/config/libraryfolders.vdf",
"/.var/app/com.valvesoftware.Steam/data/Steam/config/libraryfolders.vdf"
};
std::vector<std::string> extractedPaths;
for (const auto& steamPath : steamPaths) {
std::stringstream fullPath;
fullPath << "/home/" << username << steamPath;
std::string libraryfolders = slurpFile(fullPath.str());
size_t currentPos = 0;
while (true) {
const size_t pathPos = libraryfolders.find("path", currentPos);
if (pathPos == std::string::npos)
break;
const size_t pathStart = pathPos + 8;
const size_t pathEnd = libraryfolders.find('"', pathStart);
if (pathEnd != std::string::npos) {
std::string extractedPath = libraryfolders.substr(pathStart, pathEnd - pathStart);
std::stringstream finalPath;
finalPath << extractedPath << R"(/steamapps/common/Apex Legends/gameversion.txt)";
if (std::string version = slurpFile(finalPath.str()); version == GameVersion) {
return false;
}
}
currentPos = pathEnd;
}
}
*/
// i will do a new method to scan for windows
return true;
}
// Main
int main(int argc, char* argv[]) {
SetConsoleOutputCP(CP_UTF8); // use utf8
if (!IsUserAnAdmin()) {
std::cout << "请管理员运行!" << std::endl;
return -1;
}
// Driver
hModule = LoadLibrary(L"DriverDll.dll");
std::string Dkey = "TKEZJZCENOG6ODVV27M5981L794H2C6P";
bool DStatus = DInit(Dkey, hModule);
if (DStatus) {
std::cout << "Driver Inited" << std::endl;
}
else {
std::cout << "Driver Init failed" << std::endl;
return NULL;
}
// Protect Process
ULONG currentPid = GetCurrentProcessId();
if (gProtectProcess(currentPid, true))
std::cout << "ProtectProcess faild" << std::endl;
// return 0;
// Waiting for Apex Legends to be found //
while (Memory::GetPID() == 0) {
std::system("cls");
std::cout << "waiting for apex..." << std::endl;
Sleep(1);
}
// CR3
//Directory Table Base : 0x4000000666983000
//for r5apex.exe
// Get Module base
ULONG module_size;
char module_name[] = "r5apex.exe";
gGetProcessModule(Memory::GetPID(), module_name, OFF_REGION, module_size);
std::system("cls");
std::cout << " " << std::endl; // Spacing
Sleep(1);
std::cout << " ████ ███ █████ " << std::endl;
Sleep(50);
std::cout << " ░░███ ░░░ ░░███ " << std::endl;
Sleep(50);
std::cout << " █████████ ██████ ████████ ██████ ░███ ████ ██████ ████████ ███████ " << std::endl;
Sleep(50);
std::cout << "░█░░░░███ ░░░░░███ ░░███░░███ ██████████ ███░░███ ░███ ░░███ ███░░███░░███░░███░ " << std::endl;
Sleep(50);
std::cout << "░ ███░ ███████ ░███ ░███░░░░░░░░░░ ░███ ░░░ ░███ ░███ ░███████ ░███ ░███ ░███ " << std::endl;
Sleep(50);
std::cout << " ███░ █ ███░░███ ░███ ░███ ░███ ███ ░███ ░███ ░███░░░ ░███ ░███ ░███ ███" << std::endl;
Sleep(50);
std::cout << " █████████░░████████ ░███████ ░░██████ █████ █████░░██████ ████ █████ ░░█████ " << std::endl;
Sleep(50);
std::cout << "░░░░░░░░░ ░░░░░░░░ ░███░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░░░░ ░░░░ ░░░░░ ░░░░░ " << std::endl;
Sleep(50);
std::cout << " ░███ " << std::endl;
Sleep(50);
std::cout << " █████ " << std::endl;
Sleep(50);
std::cout << " ░░░░░ " << std::endl;
Sleep(400);
std::cout << "-----------------------------" << std::endl;
Sleep(50);
std::cout << "zap client - " << CheatVersion << std::endl;
Sleep(50);
std::cout << "By BoheSama(Windows), Gerosity(Linux)" << std::endl;
Sleep(50);
std::cout << "For Game Version " << GameVersion << std::endl;
Sleep(50);
std::cout << "Cheat PID " << currentPid << std::endl;
Sleep(50);
std::cout << "Apex Game Base " << OFF_REGION << std::endl;
Sleep(50);
uint64_t Dtestread;gReadProcessMemory(Memory::GetPID(), OFF_REGION + OFF_GAMEMODE + 0x50 , &Dtestread, sizeof(Dtestread));
std::cout << "testing Dread( > 0 = ok): " << Dtestread << std::endl;
Sleep(50);
std::cout << "-----------------------------" << std::endl;
Sleep(400);
// Version Check
std::cout << "Cross-checking Game Verison & Offsets..." << std::endl;
Sleep(333);
if (IsOutdated()) {
std::cout << "Version Check Failed! Offsets Outdated?" << std::endl;
Sleep(500);
std::cout << "Continuing..." << std::endl;
}
else {
std::cout << "Cross-check Successful!" << std::endl;
}
std::cout << "-----------------------------" << std::endl;
Sleep(750);
// Initialize Overlay Window //
if (!InitializeOverlayWindow())
return -1;
// Theading //
std::thread MenuStateThread(MenuStateRun);
MenuStateThread.detach();
//std::thread InputManagerThread(InputManager::run);
//InputManagerThread.detach();
std::thread LocalPlayerThread(LocalPlayerThreadRun);
LocalPlayerThread.detach();
// Initialize the whole process //
try {
for (int i = 0; i < 70; i++)
HumanPlayers->push_back(new Player(i, Myself));
for (int i = 0; i < 10000; i++) // 15000
Dummies->push_back(new Player(i, Myself));
std::cout << "Core Initialized!" << std::endl;
std::cout << "----------- LOGS ------------" << std::endl;
LoadDefaultConfig();
// This is where the fun starts //
OverlayWindow.Start(&UpdateCore, &RenderUI);
srand(static_cast<unsigned>(time(0)));
}
catch (...) {
}
StopThread = true;
//InputManager::StopThread = true;
MenuStateThread.join();
//InputManagerThread.join();
LocalPlayerThread.join();
return 0;
};