/
dllmain.cpp
901 lines (765 loc) · 39 KB
/
dllmain.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
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
#include <iostream>
#include "includes.h"
#include "menu.h"
#include "FNTool.h"
#include "spoof_call.h"
float rainbowspeed = 0.0005f;
void DrawMenu() {
ZeroGUI::SetupCanvas(static_canvas);
ZeroGUI::Input::Handle();
//Updated to v23.30
//Credits to DontCry361x#2717
static Vector2 pos = Vector2(700, 700);
if (ZeroGUI::Window("ritz's amazing internal [remove = gay caterpillar]", &pos, Vector2{ 500.0f, 400.0f }, ShowMenu))
{
//Simple Tabs
static int tab = 0;
if (ZeroGUI::ButtonTab("Aimbot", Vector2{ 110, 25 }, tab == 0)) tab = 0;
if (ZeroGUI::ButtonTab("Esp", Vector2{ 110, 25 }, tab == 1)) tab = 1;
if (ZeroGUI::ButtonTab("Exploits", Vector2{ 110, 25 }, tab == 2)) tab = 2;
if (ZeroGUI::ButtonTab("Misc", Vector2{ 110, 25 }, tab == 3)) tab = 3;
ZeroGUI::NextColumn(130.0f);
//
if (tab == 0) {
//Some Elements
ZeroGUI::Checkbox("Memory Aim", &Settings::MemoryAim);
ZeroGUI::Checkbox("Silent Aim", &Settings::SilentAim);
ZeroGUI::SliderFloat("Fov Size", &FovSize, 30.0f, 700.f);
//2 lazy to do :shrug:
//ZeroGUI::PushNextElementY(50.0f);
//ZeroGUI::Combobox("Target Bone", Vector2{ 100, 25 }, &Settings::BoneTarget, "Head", "Neck", "Chest", "Pelvis", NULL);
}
if (tab == 1) {
ZeroGUI::Checkbox("Box Esp", &Settings::BoxESP);
ZeroGUI::Checkbox("Skeleton Esp", &Settings::SkeletonESP);
ZeroGUI::Checkbox("Line Esp", &Settings::LinesESP);
ZeroGUI::Checkbox("Name Esp", &Settings::PlayerNameESP);
ZeroGUI::Checkbox("Distance Esp", &Settings::DistanceESP);
ZeroGUI::Checkbox("Level Esp", &Settings::LevelESP);
ZeroGUI::Checkbox("Kills Esp", &Settings::KillsESP);
ZeroGUI::Checkbox("Platform Esp", &Settings::PlatformESP);
ZeroGUI::Checkbox("Weapon Esp", &Settings::EnemyWeaponESP);
ZeroGUI::Checkbox("Ammo Esp", &Settings::AmmoESP);
}
if (tab == 2) {
ZeroGUI::Checkbox("Chams", &Settings::Chams);
ZeroGUI::Checkbox("SniperTp", &Settings::SniperTp);
ZeroGUI::Checkbox("InstantReload", &Settings::InstantReload);
ZeroGUI::Checkbox("RapidFire [4snipers]", &Settings::RapidFire);
ZeroGUI::Checkbox("Fov Changer", &Settings::FovChanger);
ZeroGUI::SliderFloat("Fov Value", &Settings::FovChanger_Value, 0.0f, 180.0f);
}
if (tab == 3) {
ZeroGUI::SliderFloat("Rainbow Speed", &rainbowspeed, 0.0001f, 0.005f);
}
}
ZeroGUI::Draw_Cursor(true);
ZeroGUI::Render();
}
static BOOL IsNotInScreen(int SizeX, int SizeY, Vector2 Pos) {
if (((Pos.x <= 0 or Pos.x > SizeX) and (Pos.y <= 0 or Pos.y > SizeY)) or ((Pos.x <= 0 or Pos.x > SizeX) or (Pos.y <= 0 or Pos.y > SizeY))) {
return TRUE;
}
else {
return FALSE;
}
}
AFortPawn* TargetPawno;
AFortPawn* LocalPawno;
APlayerCameraManager* PlayerCameraManagero;
Vector3 o_CamRot;
Vector3 o_CamLoc;
uintptr_t GlobalPlayerState;
bool initspeed = true;
bool Debuggytest = true;
ue::FString playeraname;
void __forceinline AnsiToWide(char* inAnsi, wchar_t* outWide)
{
int i = 0;
for (; inAnsi[i] != '\0'; i++)
outWide[i] = (wchar_t)(inAnsi)[i];
outWide[i] = L'\0';
}
#include <cmath>
float color_red;
float color_blue;
float color_green;
float color_speed = -10.0;
static ue::FLinearColor FromHSB(float hue, float saturation, float brightness)
{
float h = hue == 1.0f ? 0 : hue * 6.0f;
float f = h - (int)h;
float p = brightness * (1.0f - saturation);
float q = brightness * (1.0f - saturation * f);
float t = brightness * (1.0f - (saturation * (1.0f - f)));
if (h < 1)
{
return ue::FLinearColor(
(float)(brightness),
(float)(t),
(float)(p),
(float)(0.7f)
);
}
else if (h < 2)
{
return ue::FLinearColor(
(float)(q),
(float)(brightness),
(float)(p),
(float)(0.7f)
);
}
else if (h < 3)
{
return ue::FLinearColor(
(float)(p),
(float)(brightness),
(float)(t),
(float)(0.7f)
);
}
else if (h < 4)
{
return ue::FLinearColor(
(float)(p),
(float)(q),
(float)(brightness),
(float)(0.7f)
);
}
else if (h < 5)
{
return ue::FLinearColor(
(float)(t),
(float)(p),
(float)(brightness),
(float)(0.7f)
);
}
else
{
return ue::FLinearColor(
(float)(brightness),
(float)(p),
(float)(q),
(float)(0.7f)
);
}
}
ue::FLinearColor GetItemColor(EFortItemTier tier)
{
if (tier == EFortItemTier::I)
return ue::FLinearColor(123 / 255.0f, 123 / 255.0f, 123 / 255.0f, 0.95f);
else if (tier == EFortItemTier::II)
return ue::FLinearColor(58 / 255.0f, 121 / 255.0f, 19 / 255.0f, 0.95f);
else if (tier == EFortItemTier::III)
return ue::FLinearColor(18 / 255.0f, 88 / 255.0f, 162 / 255.0f, 0.95f);
else if (tier == EFortItemTier::IV)
return ue::FLinearColor(189 / 255.0f, 63 / 255.0f, 250 / 255.0f, 0.95f);
else if (tier == EFortItemTier::V)
return ue::FLinearColor(255 / 255.0f, 118 / 255.0f, 5 / 255.0f, 0.95f);
else if (tier == EFortItemTier::VI)
return ue::FLinearColor(220 / 255.0f, 160 / 255.0f, 30 / 255.0f, 0.95f);
else if (tier == EFortItemTier::VII)
return ue::FLinearColor(0 / 255.0f, 225 / 255.0f, 252 / 255.0f, 0.95f);
return ue::FLinearColor(123, 123, 123, 0.95f);
}
EFortItemTier GetItemEFortTier(float tier)
{
int tierI = (int)tier;
switch (tierI)
{
case 1:
return EFortItemTier::I;
case 2:
return EFortItemTier::II;
case 3:
return EFortItemTier::III;
case 4:
return EFortItemTier::IV;
case 5:
return EFortItemTier::V;
case 6:
return EFortItemTier::VI;
case 7:
return EFortItemTier::VII;
default:
return EFortItemTier::I;
}
}
std::string GetItemTierName(EFortItemTier tier)
{
switch (tier)
{
case EFortItemTier::I:
return xorstr("Common");
case EFortItemTier::II:
return xorstr("Uncommon");
case EFortItemTier::III:
return xorstr("Rare");
case EFortItemTier::IV:
return xorstr("Epic");
case EFortItemTier::V:
return xorstr("Legendary");
case EFortItemTier::VI:
return xorstr("Mythic");
case EFortItemTier::VII:
return xorstr("Exotic");
default:
return xorstr("Common");
}
}
void DrawFilledRect(UCanvas* pCanvas, Vector2 initial_pos, float width, float height, ue::FLinearColor color)
{
for (float i = 0.0f; i < height; i += 1.0f)
pCanvas->K2_DrawLine(Vector2(initial_pos.x, initial_pos.y + i), Vector2(initial_pos.x + width, initial_pos.y + i), 1.0f, color);
}
#define mpe 3.14159265358979323846264338327950288419716939937510582f
void DrawCircle(UCanvas* canvas, int x, int y, int radius, int numsides, ue::FLinearColor color)
{
float Step = mpe * 2.0 / numsides;
int Count = 0;
Vector2 V[128];
for (float a = 0; a < mpe * 2.0; a += Step)
{
float X1 = radius * sdkUssage->STATIC_Cos(a) + x;
float Y1 = radius * sdkUssage->STATIC_Sin(a) + y;
float X2 = radius * sdkUssage->STATIC_Cos(a + Step) + x;
float Y2 = radius * sdkUssage->STATIC_Sin(a + Step) + y;
V[Count].x = X1;
V[Count].y = Y1;
V[Count + 1].x = X2;
V[Count + 1].y = Y2;
canvas->K2_DrawLine(Vector2({ V[Count].x, V[Count].y }), Vector2({ X2, Y2 }), 1.5f, color);
}
}
void DrawTriangle(UCanvas* pCanvas, const Vector2& point1, const Vector2& point2, const Vector2& point3, const ue::FLinearColor& color, bool isFilled)
{
pCanvas->K2_DrawLine(point1, point2, 1.0f, color);
pCanvas->K2_DrawLine(point1, point3, 1.0f, color);
pCanvas->K2_DrawLine(point2, point3, 1.0f, color);
// Fill it
if (isFilled) {
float addX = 0.5f;
float addY = 1;
for (float i = point1.y; i < point3.y; i++) {
// draw line
pCanvas->K2_DrawLine(Vector2(point1.x + addX, point1.y + addY), Vector2(point2.x - addX, point2.y + addY), 1.0f, color);
addY++;
addX += 0.5f;
}
}
}
void actorloop() {
AFortPawn* targetpawn = nullptr;
float closestTocenter = FLT_MAX;
width = static_canvas->SizeX();
height = static_canvas->SizeY();
auto gworld = ((GWorld*)(*(uintptr_t*)(ue::cached::signatures::GWorld)));
auto OwningGameInstance = gworld->OwningGameInstance();
PlayerController = OwningGameInstance->LocalPlayers()->LocalPlayer()->PlayerController();
auto PlayerCameraManager = PlayerController->PlayerCameraManager();
auto LocalPawn = (AFortPawn*)PlayerController->LocalPawn();
auto levels = gworld->Levels();
for (int a = 0; a < levels.Num(); a++) {
auto level = levels[a];
if (!level) continue;
auto actors = levels[a]->ActorArray();
for (int i = 0; i < actors.Num(); i++) {
auto actor = actors[i];
if (!actor || actor == LocalPawn)
continue;
if (targetpawn)
{
if (actor->IsA(ue::cached::objects::FortProjectileBase) && Settings::SniperTp)
{
actor->K2_SetActorLocation(targetpawn->GetBone(98), false, true); //68
}
}
//int dist = PlayerCameraManager->GetCameraLocation().Distance(actor->RootComponent()->RelativeLocation()) / 100;
//if (dist <= 15) {
// auto name = actor->ObjectName();
// static_canvas->K2_DrawText(PlayerCameraManager->ProjectWorldLocationToScreen(width, height, actor->RootComponent()->RelativeLocation()), ue::FLinearColor(0, 1, 0, 1), name, false, true);
// //printf("%s", name);
// //std::cout << name << "\n";
//}
if (actor->IsA(ue::cached::objects::actor::FortPlayerPawnAthena)) {
//GlobalPlayerState = *(uintptr_t*)((uintptr_t)actor + 0x290);
Vector3 head = actor->GetBone(68);
//std::cout << head.x << " getbone\n";
Vector2 head_w2s = PlayerCameraManager->ProjectWorldLocationToScreen(width, height, head);
//if (Settings::Chams) { actor->ApplyPawnHighlight(ue::FLinearColor(10, 10, 0, 0.5), ue::FLinearColor(10, 10, 0, 0.5)); }
if (Settings::Chams) {
static float rainbow;
rainbow += rainbowspeed;
if (rainbow > 1.f)
rainbow = 0.f; actor->ApplyPawnHighlight(FromHSB(rainbow, 1.f, 1.f), FromHSB(rainbow, 1.f, 1.f)); }
if (Settings::FovChanger) { PlayerController->Fov(Settings::FovChanger_Value); }
if (Settings::RapidFire) { actor->CurrentWeapon()->RapidFire(); }
//int GetAccountLevel();
if (actor != LocalPawn) {
auto dx = head_w2s.x - (width / 2);
auto dy = head_w2s.y - (height / 2);
auto dist = crt::sqrtf(dx * dx + dy * dy);
if (dist < FovSize && dist < closestTocenter) {
closestTocenter = dist;
targetpawn = actor;
}
else if (!dist < FovSize && !dist < closestTocenter) {
TargetPawno = 0;
}
}
TargetPawno = targetpawn;
LocalPawno = LocalPawn;
PlayerCameraManagero = PlayerCameraManager;
if (Settings::MemoryAim and targetpawn and (safe_call(GetAsyncKeyState)(VK_RBUTTON)))
{
Vector3 headtarget = targetpawn->GetBone(68);
Vector2 headtarget_w2s = PlayerCameraManager->ProjectWorldLocationToScreen(width, height, headtarget);
auto camloc = PlayerCameraManager->GetCameraLocation();
auto NewRotation = galgan(camloc, headtarget);
PlayerController->ClientSetRotation(NewRotation, false);
}
//PlayerController->TurboBuildInterval();
Vector2 head2_w2s = PlayerCameraManager->ProjectWorldLocationToScreen(width, height, { head.x, head.y, head.z + 20 });
//std::cout << head2_w2s.x << " w2s head\n";
Vector3 bottom = actor->GetBone(0);
Vector2 bottom_w2s = PlayerCameraManager->ProjectWorldLocationToScreen(width, height, { bottom.x, bottom.y, bottom.z });
//std::cout << bottom_w2s.x << " w2s bottom\n";
ue::FLinearColor col = ue::FLinearColor(0.f, 1.f, 0.f, 1.f);
if (IsNotInScreen(width, height, head_w2s)) continue;
float BoxHeight = (float)(bottom_w2s.y - head2_w2s.y);
float BoxWidth = BoxHeight * 0.60f;
float BottomLeftX = (float)head2_w2s.x - BoxWidth / 2;
float BottomLeftY = (float)bottom_w2s.y;
float BottomRightX = (float)head2_w2s.x + BoxWidth / 2;
float BottomRightY = (float)bottom_w2s.y;
float TopRightX = (float)head2_w2s.x + BoxWidth / 2;
float TopRightY = (float)head2_w2s.y;
float TopLeftX = (float)head2_w2s.x - BoxWidth / 2;
float TopLeftY = (float)head2_w2s.y;
if (Settings::BoxESP) {
//Bottom
static_canvas->K2_DrawLine(Vector2(BottomLeftX, BottomLeftY), Vector2(BottomRightX, BottomRightY), 2.f, col);
//Right
static_canvas->K2_DrawLine(Vector2(BottomRightX, BottomRightY), Vector2(TopRightX, TopRightY), 2.f, col);
//Top
static_canvas->K2_DrawLine(Vector2(TopRightX, TopRightY), Vector2(TopLeftX, TopLeftY), 2.f, col);
//Left
static_canvas->K2_DrawLine(Vector2(TopLeftX, TopLeftY), Vector2(BottomLeftX, BottomLeftY), 2.f, col);
}
auto redcol = ue::FLinearColor(1, 0, 0, 1);
auto bluecol = ue::FLinearColor(0, 0, 1, 1);
float TextOffset_Y = head2_w2s.y;
float TextOffset_X = TopRightX + 5;
Vector2 calculation;
if (!IsNotInScreen(1920, 1080, head2_w2s)) {
if (Settings::PlayerNameESP) {
auto name = actor->PlayerState()->GetPlayerName();
if (name.c_str()) {
TextOffset_Y += static_canvas->K2_TextSize(actor->PlayerState()->GetPlayerName()).y + 5;
calculation = Vector2(TextOffset_X, TextOffset_Y);
static_canvas->K2_DrawText(calculation, redcol, name.c_str(), false, true);
}
}
if (Settings::DistanceESP) {
int dist = PlayerCameraManager->GetCameraLocation().Distance(actor->RootComponent()->RelativeLocation()) / 100;
static char distanceesp[128];
static wchar_t wdistanceesp[128];
sprintf(distanceesp, xorstr("Distance: %d[m]"), dist);
AnsiToWide(distanceesp, wdistanceesp);
TextOffset_Y += static_canvas->K2_TextSize(ue::FString(wdistanceesp)).y + 10;
calculation = Vector2(TextOffset_X, TextOffset_Y);
static_canvas->K2_DrawText(calculation, bluecol, wdistanceesp, false, true);
}
if (Settings::LevelESP) {
auto level = actor->PlayerState()->SeasonLevelUIDisplay();
static char levelesp[128];
static wchar_t wlevelesp[128];
sprintf(levelesp, xorstr("Level: %d"), level);
AnsiToWide(levelesp, wlevelesp);
TextOffset_Y += static_canvas->K2_TextSize(ue::FString(wlevelesp)).y + 10;
calculation = Vector2(TextOffset_X, TextOffset_Y);
static_canvas->K2_DrawText(calculation, redcol, wlevelesp, false, true);
}
if (Settings::KillsESP) {
auto kills = actor->PlayerState()->GetKillScore();
static char killesp[128];
static wchar_t wdkillesp[128];
sprintf(killesp, xorstr("Kills: %d"), kills);
AnsiToWide(killesp, wdkillesp);
TextOffset_Y += static_canvas->K2_TextSize(ue::FString(wdkillesp)).y + 10;
calculation = Vector2(TextOffset_X, TextOffset_Y);
static_canvas->K2_DrawText(calculation, bluecol, wdkillesp, false, true);
}
if (Settings::PlatformESP) {
auto platform = actor->PlayerState()->GetPlatform();
if (!platform.IsValid()) continue;
auto platform_name = platform.c_str();
TextOffset_Y += static_canvas->K2_TextSize(ue::FString(platform_name)).y + 10;
calculation = Vector2(TextOffset_X, TextOffset_Y);
if (math::custom_wcsstr(platform_name, xorstr(L"PSN"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"PlayStation"), false, true);
}
else if (math::custom_wcsstr(platform_name, xorstr(L"XBL"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"Xbox"), false, true);
}
else if (math::custom_wcsstr(platform_name, xorstr(L"XSX"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"Xbox Series S"), false, true);
}
else if (math::custom_wcsstr(platform_name, xorstr(L"WIN"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"Windows"), false, true);
}
else if (math::custom_wcsstr(platform_name, xorstr(L"MAC"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"MacOS"), false, true);
}
else if (math::custom_wcsstr(platform_name, xorstr(L"LNX"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"Linux"), false, true);
}
else if (math::custom_wcsstr(platform_name, xorstr(L"IOS"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"Ios"), false, true);
}
else if (math::custom_wcsstr(platform_name, xorstr(L"AND"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"Android"), false, true);
}
else if (math::custom_wcsstr(platform_name, xorstr(L"SWT"))) {
static_canvas->K2_DrawText(calculation, redcol, xorstr(L"NintendoSwitch"), false, true);
}
else {
static_canvas->K2_DrawText(calculation, redcol, platform_name, false, true);
}
}
if (actor->CurrentWeapon()) {
}
if (Settings::EnemyWeaponESP) {
if (actor->CurrentWeapon()->WeaponData()) {
auto weaponname = actor->CurrentWeapon()->WeaponData()->DisplayName().Get();
if (weaponname) {
TextOffset_Y += static_canvas->K2_TextSize(weaponname).y + 10;
calculation = Vector2(TextOffset_X, TextOffset_Y);
static_canvas->K2_DrawText(calculation, bluecol, weaponname, false, true);
}
}
}
if (Settings::AmmoESP) {
auto ammo = actor->CurrentWeapon()->GetMagazineAmmoCount();
auto clipammo = actor->CurrentWeapon()->GetBulletsPerClip();
if (ammo && clipammo) {
static char ammoesp[128];
static wchar_t wammoesp[128];
sprintf(ammoesp, xorstr("Ammo: %d/%d"), ammo, clipammo);
AnsiToWide(ammoesp, wammoesp);
TextOffset_Y += static_canvas->K2_TextSize(ue::FString(wammoesp)).y + 10;
calculation = Vector2(TextOffset_X, TextOffset_Y);
static_canvas->K2_DrawText(calculation, redcol, wammoesp, false, true);
}
}
//not ud
/*auto tier = actor->CurrentWeapon()->WeaponData()->Tier();
static char tieresp[128];
static wchar_t wtieresp[128];
sprintf(tieresp, xorstr("%s"), tier);
AnsiToWide(tieresp, wtieresp);
TextOffset_Y += static_canvas->K2_TextSize(wtieresp).y + 10;
calculation = Vector2(TextOffset_X, TextOffset_Y);
static_canvas->K2_DrawText(calculation, GetItemColor(tier), wtieresp, false, true);*/
}
Vector2 ChestAtLeft = PlayerController->WorldToScreen(actor->GetBone(37));
Vector2 ChestAtRight = PlayerController->WorldToScreen(actor->GetBone(8));
Vector2 Chest = { ChestAtLeft.x + (ChestAtRight.x - ChestAtLeft.x) / 2, ChestAtLeft.y };
ue::FLinearColor Color = ue::FLinearColor(1.f, 1.f, 0.f, 1.f);
if (Settings::SkeletonESP) {
Vector2 Neck = PlayerController->WorldToScreen(actor->GetBone(66));
Vector2 LeftShoulder = PlayerController->WorldToScreen(actor->GetBone(93));
Vector2 RightShoulder = PlayerController->WorldToScreen(actor->GetBone(9));
Vector2 LeftElbow = PlayerController->WorldToScreen(actor->GetBone(94));
Vector2 RightElbow = PlayerController->WorldToScreen(actor->GetBone(10));
Vector2 LeftHand = PlayerController->WorldToScreen(actor->GetBone(100));
Vector2 RightHand = PlayerController->WorldToScreen(actor->GetBone(99));
Vector2 LeftLeg = PlayerController->WorldToScreen(actor->GetBone(76));
Vector2 RightLeg = PlayerController->WorldToScreen(actor->GetBone(69));
Vector2 LeftThigh = PlayerController->WorldToScreen(actor->GetBone(82));
Vector2 RightThigh = PlayerController->WorldToScreen(actor->GetBone(75));
Vector2 LeftFoot = PlayerController->WorldToScreen(actor->GetBone(78));
Vector2 RightFoot = PlayerController->WorldToScreen(actor->GetBone(71));
Vector2 LeftFeet = PlayerController->WorldToScreen(actor->GetBone(85));
Vector2 RightFeet = PlayerController->WorldToScreen(actor->GetBone(84));
Vector2 LeftFeetFinger = PlayerController->WorldToScreen(actor->GetBone(81));
Vector2 RightFeetFinger = PlayerController->WorldToScreen(actor->GetBone(74));
Vector2 Bottom = PlayerController->WorldToScreen(actor->GetBone(0));
Vector2 Pelvis = PlayerController->WorldToScreen(actor->GetBone(2));
static_canvas->K2_DrawLine(head_w2s, Neck, 2, Color);
static_canvas->K2_DrawLine(Neck, Chest, 2, Color);
static_canvas->K2_DrawLine(Chest, Pelvis, 2, Color);
static_canvas->K2_DrawLine(Chest, LeftShoulder, 2, Color);
static_canvas->K2_DrawLine(Chest, RightShoulder, 2, Color);
static_canvas->K2_DrawLine(LeftShoulder, LeftElbow, 2, Color);
static_canvas->K2_DrawLine(RightShoulder, RightElbow, 2, Color);
static_canvas->K2_DrawLine(LeftElbow, LeftHand, 2, Color);
static_canvas->K2_DrawLine(RightElbow, RightHand, 2, Color);
static_canvas->K2_DrawLine(Pelvis, LeftLeg, 2, Color);
static_canvas->K2_DrawLine(Pelvis, RightLeg, 2, Color);
static_canvas->K2_DrawLine(LeftLeg, LeftThigh, 2, Color);
static_canvas->K2_DrawLine(RightLeg, RightThigh, 2, Color);
static_canvas->K2_DrawLine(LeftThigh, LeftFoot, 2, Color);
static_canvas->K2_DrawLine(RightThigh, RightFoot, 2, Color);
static_canvas->K2_DrawLine(LeftFoot, LeftFeet, 2, Color);
static_canvas->K2_DrawLine(RightFoot, RightFeet, 2, Color);
static_canvas->K2_DrawLine(LeftFeet, LeftFeetFinger, 2, Color);
static_canvas->K2_DrawLine(RightFeet, RightFeetFinger, 2, Color);
}
if (Settings::LinesESP) {
static_canvas->K2_DrawLine(Vector2(width / 2, height), Chest, 2, Color);
}
}
}
}
}
Vector3 OriginalLocation;
Vector3 OriginalRotation;
bool once = true;
bool once2 = true;
Vector3 rot;
void(*o_GetViewPoint)(uintptr_t, ue::FMinimalViewInfo*, BYTE) = nullptr;
void hk_GetViewPoint(uintptr_t this_LocalPlayer, ue::FMinimalViewInfo* OutViewInfo, BYTE StereoPass)
{
o_GetViewPoint(this_LocalPlayer, OutViewInfo, StereoPass);
if (sdkUssage->isValidPointer(uintptr_t(LocalPawno)))
{
//static bool GetCameraLocation = true;
//static Vector3 NewLocation;
//if (GetCameraLocation) {
// // Set our new location to the original spot once
// NewLocation = OutViewInfo->Location;
// GetCameraLocation = false;
//}
if (Settings::SilentAim)
{
if (PlayerController->IsInputKeyDown(ue::FKey(RBKey)))
{
OutViewInfo->Rotation = OriginalRotation;
OutViewInfo->Location = OriginalLocation;
//OutViewInfo->Location = rot;
}
/*if (safe_call(GetAsyncKeyState)('W')) NewLocation.x += 5.f;
else if (safe_call(GetAsyncKeyState)('S')) NewLocation.x -= 5.f;
else if (safe_call(GetAsyncKeyState)('A')) NewLocation.y += 5.f;
else if (safe_call(GetAsyncKeyState)('D')) NewLocation.y -= 5.f;
else if (safe_call(GetAsyncKeyState)(VK_SPACE)) NewLocation.z += 5.f;
else if (safe_call(GetAsyncKeyState)(VK_SHIFT)) NewLocation.z -= 5.f;
OutViewInfo->Location = NewLocation;*/
//OutViewInfo->Location = OriginalLocation;
}
//OutViewInfo->FOV = 1000;
}
}
void(*o_GetPlayerViewPoint)(uintptr_t, Vector3*, Vector3*) = nullptr;
void hk_GetPlayerViewPoint(uintptr_t this_PlayerController, Vector3* Location, Vector3* Rotation) {
o_GetPlayerViewPoint(this_PlayerController, Location, Rotation);
OriginalLocation = *Location;
OriginalRotation = *Rotation;
//if (once) { MessageBox(0, L"ud", 0, 0); once = false; }
if (sdkUssage->isValidPointer(uintptr_t(LocalPawno)))
{
if (Settings::SilentAim) {
if (PlayerController->IsInputKeyDown(ue::FKey(RBKey)))
{
auto rootHead = TargetPawno->GetBone(68);
Vector3 camloc = *Location;
Vector3 VectorPos;
VectorPos.x = rootHead.x - camloc.x;
VectorPos.y = rootHead.y - camloc.y;
VectorPos.z = rootHead.z - camloc.z;
float distance = (double)(sqrtf(VectorPos.x * VectorPos.x + VectorPos.y * VectorPos.y + VectorPos.z * VectorPos.z));
rot.x = -((acosf(VectorPos.z / distance) * (float)(180.0f / 3.14159265358979323846264338327950288419716939937510)) - 90.f);
rot.y = atan2f(VectorPos.y, VectorPos.x) * (float)(180.0f / 3.14159265358979323846264338327950288419716939937510);
rot.z = 0;
*Rotation = rot;
}
}
}
}
float(*CalculateReloadSpeedOriginal)(AWeapon*, float*) = nullptr;
auto CalculateReloadSpeedHook(AWeapon* Weapon, float* a2) //__m128 __fastcall sub_7FF660B36E80(__int64 a1)
{
return FLT_MAX;
return CalculateReloadSpeedOriginal(Weapon, a2);
}
bool oncee = false;
bool onceee = false;
bool temponce = false;
bool initudhooker = true;
static uintptr_t storedPController;
static uintptr_t storedPCurrentWeapon;
static uintptr_t storedPLocalPlayer;
bool hookplayanama = false;
bool calcc = false;
bool hookgetactorrotation = true;
bool hookdis = true;
bool hookdiss = true;
bool hookdisss = true;
bool hookdissss = true;
void VirtualTableFunctionSwap(void* VTable, void* FunctionToSwap, void** pOriginal, int Index)
{
DWORD Old;
void* pVTableFunction = (void*)((uint64_t)VTable + Index);
*pOriginal = *(PVOID*)(pVTableFunction);
VirtualProtectEx((HANDLE)-1, pVTableFunction, 8, PAGE_EXECUTE_READWRITE, &Old);
*(PVOID*)pVTableFunction = FunctionToSwap;
VirtualProtectEx((HANDLE)-1, pVTableFunction, 8, Old, &Old);
}
void DrawTransition(uintptr_t this_, uintptr_t Canvas) {
if (!Canvas) {
return DrawTransition(this_, Canvas);
}
static_canvas = (UCanvas*)Canvas;
actorloop();
auto uworld = ((GWorld*)(*(uintptr_t*)(ue::cached::signatures::GWorld)));
auto LocalPlayer = uworld->OwningGameInstance()->LocalPlayers()->LocalPlayer();
//GetViewpoint
if (storedPLocalPlayer != (uintptr_t)LocalPlayer)
{
////DO YOUR HOOK
storedPLocalPlayer = (uintptr_t)LocalPlayer;
//std::cout << "ud\n";
hookdisss = true;
}
if (storedPLocalPlayer == (uintptr_t)LocalPlayer && hookdisss) {
if (LocalPlayer) {
void** LocalPlayer_VTable = *(void***)(LocalPlayer);
DWORD OldProtection;
safe_call(VirtualProtect)(&LocalPlayer_VTable[88], 8, PAGE_EXECUTE_READWRITE, &OldProtection);
o_GetViewPoint = decltype(o_GetViewPoint)(LocalPlayer_VTable[88]);
LocalPlayer_VTable[88] = &hk_GetViewPoint;
safe_call(VirtualProtect)(&LocalPlayer_VTable[88], 8, OldProtection, &OldProtection);
}
hookdisss = false;
}
//CalculateReloadSpeed
if (storedPCurrentWeapon != (uintptr_t)LocalPawno->CurrentWeapon())
{
storedPCurrentWeapon = (uintptr_t)LocalPawno->CurrentWeapon();
//std::cout << "ud\n";
hookdiss = true;
}
if (Settings::InstantReload && storedPCurrentWeapon == (uintptr_t)LocalPawno->CurrentWeapon() && hookdiss) {
if (LocalPawno->CurrentWeapon()) {
void** CurrentWeapon_VTable = *(void***)(LocalPawno->CurrentWeapon());
DWORD OldProtection;
safe_call(VirtualProtect)(&CurrentWeapon_VTable[296], 8, PAGE_EXECUTE_READWRITE, &OldProtection);
CalculateReloadSpeedOriginal = decltype(CalculateReloadSpeedOriginal)(CurrentWeapon_VTable[296]);
CurrentWeapon_VTable[296] = &CalculateReloadSpeedHook;
safe_call(VirtualProtect)(&CurrentWeapon_VTable[296], 8, OldProtection, &OldProtection);
}
hookdiss = false;
}
//GetPlayerViewpoint
if (storedPController != (uintptr_t)LocalPlayer->PlayerController())
{
storedPController = (uintptr_t)LocalPlayer->PlayerController();
//std::cout << "ud\n";
hookdis = true;
}
if (Settings::SilentAim && storedPController == (uintptr_t)LocalPlayer->PlayerController() && hookdis) {
void** PlayerController_VTable = *(void***)(LocalPlayer->PlayerController());
DWORD OldProtection;
safe_call(VirtualProtect)(&PlayerController_VTable[245], 8, PAGE_EXECUTE_READWRITE, &OldProtection);
o_GetPlayerViewPoint = decltype(o_GetPlayerViewPoint)(PlayerController_VTable[245]);
PlayerController_VTable[245] = &hk_GetPlayerViewPoint;
safe_call(VirtualProtect)(&PlayerController_VTable[245], 8, OldProtection, &OldProtection);
hookdis = false;
}
//if (safe_call(GetAsyncKeyState)(VK_INSERT) & 1)
if ((safe_call(GetAsyncKeyState)(VK_INSERT)))
{
ShowMenu = !ShowMenu;
}
static_canvas->K2_DrawLine(Vector2(width / 2 + 5, height / 2), Vector2(width / 2 + 10.f, height / 2), 3, { 1.f, 0.f, 0.f, 1.f });
static_canvas->K2_DrawLine(Vector2(width / 2 - 5, height / 2), Vector2(width / 2 - 10.f, height / 2), 3, { 1.f, 0.f, 0.f, 1.f });
static_canvas->K2_DrawLine(Vector2(width / 2, height / 2 + 5), Vector2(width / 2, height / 2 + 10.f), 3, { 1.f, 0.f, 0.f, 1.f });
static_canvas->K2_DrawLine(Vector2(width / 2, height / 2 - 5), Vector2(width / 2, height / 2 - 10.f), 3, { 1.f, 0.f, 0.f, 1.f });
Pasted_CircleOutline(Vector2(width / 2, height / 2), FovSize, { 0.933333397f, 0.509803951f, 0.933333397f, 1.000000000f });
DrawCircle(static_canvas, width / 2, height / 2, FovSize, 1450, ue::FLinearColor(0,0,1,1));
if (ShowMenu) {
DrawMenu();
}
return DrawTransitionOriginal(this_, Canvas);
}
VOID Main()
{
ue::cached::Base = sdkUssage->GetGameBase();
ue::cached::signatures::GWorld = sdkUssage->PatternScan(ue::cached::Base, xorstr("48 89 05 ? ? ? ? 48 8B 4B 78"), 7, true); if (!ue::cached::signatures::GWorld) safe_call(MessageBox)(0, xorstr(L"Failed to find UWorld"), 0, 0);
ue::cached::signatures::GetBoneMatrix = sdkUssage->PatternScan(ue::cached::Base, xorstr("E8 ? ? ? ? 0F 10 40 68"), 5, true); if (!ue::cached::signatures::GetBoneMatrix) safe_call(MessageBox)(0, xorstr(L"Failed to find GetBoneMatrix"), 0, 0);
ue::cached::signatures::ProjectWorldToScreen = sdkUssage->PatternScan(ue::cached::Base, xorstr("40 53 55 56 57 41 56 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 84 24 ? ? ? ? 33 DB 45 8A F1 49 8B F8 48 8B EA 48 8B F1 48 85 C9 0F 84"), 5, false); if (!ue::cached::signatures::ProjectWorldToScreen) safe_call(MessageBox)(0, xorstr(L"Failed to find w2s"), 0, 0); //true -> false xD
ue::cached::signatures::FreeFn = sdkUssage->PatternScan(ue::cached::Base, xorstr("48 85 C9 0F 84 86 00 00 00 53"), 0, false); if (!ue::cached::signatures::FreeFn) safe_call(MessageBox)(0, xorstr(L"Failed to find FreeFn"), 0, 0);
ue::cached::signatures::GetNameByIndex = sdkUssage->PatternScan(ue::cached::Base, xorstr("48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 54 41 56 41 57 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 84 24 ? ? ? ? 8B 19 48 8B F2"), 0, false); if (!ue::cached::signatures::GetNameByIndex) safe_call(MessageBox)(0, xorstr(L"Failed to find GetNameByIndex"), 0, 0); //48 89 ? ? ? 48 89 ? ? ? 48 89 ? ? ? 41 ? 48 81 EC ? ? ? ? 48 8B ? ? ? ? ? 48 33 ? 48 89 ? ? ? ? ? ? 8B 01
ue::classes::objects = (ue::classes::GObjects*)sdkUssage->PatternScan(ue::cached::Base, xorstr("48 8B 05 ? ? ? ? 48 8B 0C C8 48 8B 04 D1"), 7, true); if (!ue::classes::objects) safe_call(MessageBox)(0, xorstr(L"Failed to find GObjects"), 0, 0);
ue::cached::objects::camera::GetCameraLocation = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.PlayerCameraManager.GetCameraLocation")); if (!ue::cached::objects::camera::GetCameraLocation) return;
ue::cached::objects::camera::GetCameraRotation = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.PlayerCameraManager.GetCameraRotation")); if (!ue::cached::objects::camera::GetCameraRotation) return;
ue::cached::objects::camera::GetFOVAngle = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.PlayerCameraManager.GetFOVAngle")); if (!ue::cached::objects::camera::GetCameraRotation) return;
ue::cached::objects::render::Font = (ue::classes::UObject*)find::FindObject(xorstr(L"/Engine/EngineFonts/Roboto.Roboto")); if (!ue::cached::objects::render::Font) return;
ue::cached::objects::render::K2_DrawLine = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.Canvas.K2_DrawLine")); if (!ue::cached::objects::render::K2_DrawLine) return;
ue::cached::objects::render::K2_DrawBox = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.Canvas.K2_DrawBox")); if (!ue::cached::objects::render::K2_DrawBox) return;
ue::cached::objects::render::K2_DrawText = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.Canvas.K2_DrawText")); if (!ue::cached::objects::render::K2_DrawText) return;
ue::cached::objects::render::K2_TextSize = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.Canvas.K2_TextSize")); if (!ue::cached::objects::render::K2_DrawBox) return;
ue::cached::objects::actor::FortPlayerPawnAthena = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortPlayerPawnAthena")); if (!ue::cached::objects::actor::FortPlayerPawnAthena) return;
ue::cached::objects::actor::ClientSetRotation = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.Controller.ClientSetRotation")); if (!ue::cached::objects::actor::ClientSetRotation) return;
ue::cached::objects::actor::GetPlayerName = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.PlayerState.GetPlayerName")); if (!ue::cached::objects::actor::GetPlayerName) return;
ue::cached::objects::actor::ApplyPawnHighlight = (ue::classes::UObject*)find::FindObject(xorstr(L"PlayerPawn_Athena.PlayerPawn_Athena_C.ApplyPawnHighlight")); if (!ue::cached::objects::actor::ApplyPawnHighlight) return;
ue::cached::objects::actor::Fov = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.PlayerController.FOV")); if (!ue::cached::objects::actor::Fov) return;
ue::cached::objects::actor::SetMouseLocation = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.PlayerController.SetMouseLocation")); if (!ue::cached::objects::actor::SetMouseLocation) return;
ue::cached::objects::FortProjectileBase = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortProjectileBase")); if (!ue::cached::objects::FortProjectileBase) return;
ue::cached::objects::AFortAthenaZipline = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortAthenaZipline")); if (!ue::cached::objects::AFortAthenaZipline) return;
ue::cached::objects::FortRangedWeaponStats = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortRangedWeaponStats")); if (!ue::cached::objects::FortRangedWeaponStats) return;
ue::cached::objects::actor::FortPickup = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortPickup")); if (!ue::cached::objects::actor::FortPickup) return;
ue::cached::objects::K2_GetActorRotation = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.Actor.K2_GetActorRotation")); if (!ue::cached::objects::K2_GetActorRotation) return;
/*ue::cached::objects::actor::isHiddingInProp = (ue::classes::UObject*)find::FindObject(xorstr(L"PlayerPawn_Athena.PlayerPawn_Athena_C.isHiddingInProp")); if (!ue::cached::objects::actor::isHiddingInProp) return;
ue::cached::objects::actor::SetCharacterBodyVisibilityForPossession = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortPlayerPawnAthena.SetCharacterBodyVisibilityForPossession")); if (!ue::cached::objects::actor::SetCharacterBodyVisibilityForPossession) return;
ue::cached::FortKismetLibrary = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortKismetLibrary")); if (!ue::cached::FortKismetLibrary) return;
ue::cached::KismetStringLibrary = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.KismetStringLibrary")); if (!ue::cached::KismetStringLibrary) return;
ue::cached::KismetMathLibrary = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.KismetMathLibrary")); if (!ue::cached::KismetMathLibrary) return;
ue::cached::Conv_StringToName = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.KismetStringLibrary.Conv_StringToName")); if (!ue::cached::Conv_StringToName) return;*/
//ue::cached::Cos = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.KismetMathLibrary.Cos")); if (!ue::cached::Cos) return; //dead
//ue::cached::Sin = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.KismetMathLibrary.Sin")); if (!ue::cached::Sin) return;
ue::cached::objects::actor::K2_PayBuildingResourceCost = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortKismetLibrary.K2_PayBuildingResourceCost")); if (!ue::cached::objects::actor::K2_PayBuildingResourceCost) return;
ue::cached::objects::actor::GetVehicle = (ue::classes::UObject*)find::FindObject(xorstr(L"FortniteGame.FortPlayerPawn.GetVehicle")); if (!ue::cached::objects::actor::GetVehicle) return;
ue::cached::objects::K2_TeleportTo = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.Actor.K2_TeleportTo")); if (!ue::cached::objects::K2_TeleportTo) return;
ue::cached::objects::K2_SetActorLocation = (ue::classes::UObject*)find::FindObject(xorstr(L"Engine.Actor.K2_SetActorLocation")); if (!ue::cached::objects::K2_SetActorLocation) return;
InsertKey = ue::FKey{ ue::FName{ sdkUssage->Conv_StringToName(xorstr(L"Insert")) }, 0 };
LBKey = ue::FKey{ ue::FName{ sdkUssage->Conv_StringToName(xorstr(L"LeftMouseButton")) }, 0 };
RBKey = ue::FKey{ ue::FName{ sdkUssage->Conv_StringToName(xorstr(L"RightMouseButton")) }, 0 };
F7Key = ue::FKey{ ue::FName{ sdkUssage->Conv_StringToName(xorstr(L"F7")) }, 0 };
FNTool* sdk = new FNTool();
sdk->Initialize((uintptr_t)ue::classes::objects, ue::cached::signatures::GetNameByIndex, ue::cached::signatures::FreeFn);
ue::cached::offsets::OwningGameInstance = sdk->FindOffset(xorstr("World"), xorstr("OwningGameInstance"));
ue::cached::offsets::Levels = sdk->FindOffset(xorstr("World"), xorstr("Levels"));
ue::cached::offsets::AcknowledgedPawn = sdk->FindOffset(xorstr("PlayerController"), xorstr("AcknowledgedPawn"));
ue::cached::offsets::PlayerCameraManager = sdk->FindOffset(xorstr("PlayerController"), xorstr("PlayerCameraManager"));
ue::cached::offsets::PlayerState = sdk->FindOffset(xorstr("Pawn"), xorstr("PlayerState"));
ue::cached::offsets::bADSWhileNotOnGround = sdk->FindOffset(xorstr("FortPlayerPawnAthena"), xorstr("bADSWhileNotOnGround"));
ue::cached::offsets::CurrentWeapon = sdk->FindOffset(xorstr("FortPawn"), xorstr("CurrentWeapon"));
ue::cached::offsets::TeamIndex = sdk->FindOffset(xorstr("FortPlayerStateAthena"), xorstr("TeamIndex"));
ue::cached::offsets::WeaponData = sdk->FindOffset(xorstr("FortWeapon"), xorstr("WeaponData"));
ue::cached::offsets::DisplayName = sdk->FindOffset(xorstr("FortItemDefinition"), xorstr("DisplayName"));
ue::cached::offsets::Mesh = sdk->FindOffset(xorstr("Character"), xorstr("Mesh"));
ue::cached::offsets::RootComponent = sdk->FindOffset(xorstr("Actor"), xorstr("RootComponent"));
ue::cached::offsets::RelativeLocation = sdk->FindOffset(xorstr("SceneComponent"), xorstr("RelativeLocation"));
ue::cached::offsets::LastFireTime = sdk->FindOffset(xorstr("FortWeapon"), xorstr("LastFireTime"));
ue::cached::offsets::AmmoCount = sdk->FindOffset(xorstr("FortWeapon"), xorstr("AmmoCount"));
ue::cached::offsets::LastFireTimeVerified = sdk->FindOffset(xorstr("FortWeapon"), xorstr("LastFireTimeVerified"));
ue::cached::offsets::Tier = sdk->FindOffset(xorstr("FortItemDefinition"), xorstr("Tier"));
auto UViewportClient = ((GWorld*)(*(uintptr_t*)(ue::cached::signatures::GWorld)))->OwningGameInstance()->LocalPlayers()->LocalPlayer()->ViewportClient();
void** DrawTransition_VTable = *(void***)(UViewportClient);
DWORD OldProtection;
safe_call(VirtualProtect)(&DrawTransition_VTable[110], 8, PAGE_EXECUTE_READWRITE, &OldProtection);
DrawTransitionOriginal = decltype(DrawTransitionOriginal)(DrawTransition_VTable[110]);
DrawTransition_VTable[110] = &DrawTransition;
safe_call(VirtualProtect)(&DrawTransition_VTable[110], 8, OldProtection, &OldProtection);
}
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved)
{
if (reason != DLL_PROCESS_ATTACH) return FALSE;
Main();
return TRUE;
}