Compare commits
3 Commits
5b974969d1
...
4b2372a4a9
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b2372a4a9 | |||
| 430205e033 | |||
| 9a2b43be89 |
@@ -32,6 +32,7 @@
|
|||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
@@ -98,11 +100,14 @@
|
|||||||
<PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>
|
||||||
</PrecompiledHeaderFile>
|
</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeaderOutputFile />
|
<PrecompiledHeaderOutputFile />
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)Memory;$(SolutionDir)Maths;$(SolutionDir)Obfuscate;$(SolutionDir)external;$(SolutionDir)external\safetyhook\include;$(SolutionDir)external\zydis\dependencies\zycore\include;$(SolutionDir)external\zydis\include;$(SolutionDir)zydis\src;$(SolutionDir)external\MinHook\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)Memory;$(SolutionDir)Maths;$(SolutionDir)Obfuscate;$(SolutionDir)external\includes;$(SolutionDir)external;$(SolutionDir)external\safetyhook\include;$(SolutionDir)external\zydis\dependencies\zycore\include;$(SolutionDir)external\zydis\include;$(SolutionDir)zydis\src;$(SolutionDir)external\MinHook\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<LanguageStandard>stdcpp23</LanguageStandard>
|
<LanguageStandard>stdcpp23</LanguageStandard>
|
||||||
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
||||||
|
<Optimization>MinSpace</Optimization>
|
||||||
|
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -125,11 +130,13 @@
|
|||||||
<PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>
|
||||||
</PrecompiledHeaderFile>
|
</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeaderOutputFile />
|
<PrecompiledHeaderOutputFile />
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)Memory;$(SolutionDir)Maths;$(SolutionDir)Obfuscate;$(SolutionDir)external;$(SolutionDir)external\safetyhook\include;$(SolutionDir)external\zydis\dependencies\zycore\include;$(SolutionDir)external\zydis\include;$(SolutionDir)zydis\src;$(SolutionDir)external\MinHook\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)Memory;$(SolutionDir)Maths;$(SolutionDir)Obfuscate;$(SolutionDir)external\includes;$(SolutionDir)external;$(SolutionDir)external\safetyhook\include;$(SolutionDir)external\zydis\dependencies\zycore\include;$(SolutionDir)external\zydis\include;$(SolutionDir)zydis\src;$(SolutionDir)external\MinHook\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<LanguageStandard>stdcpp23</LanguageStandard>
|
<LanguageStandard>stdcpp23</LanguageStandard>
|
||||||
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
||||||
|
<Optimization>MinSpace</Optimization>
|
||||||
|
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -150,11 +157,14 @@
|
|||||||
<PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>
|
||||||
</PrecompiledHeaderFile>
|
</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeaderOutputFile />
|
<PrecompiledHeaderOutputFile />
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)Memory;$(SolutionDir)Maths;$(SolutionDir)Obfuscate;$(SolutionDir)external;$(SolutionDir)external\safetyhook\include;$(SolutionDir)external\zydis\dependencies\zycore\include;$(SolutionDir)external\zydis\include;$(SolutionDir)zydis\src;$(SolutionDir)external\MinHook\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)Memory;$(SolutionDir)Maths;$(SolutionDir)Obfuscate;$(SolutionDir)external\includes;$(SolutionDir)external;$(SolutionDir)external\safetyhook\include;$(SolutionDir)external\zydis\dependencies\zycore\include;$(SolutionDir)external\zydis\include;$(SolutionDir)zydis\src;$(SolutionDir)external\MinHook\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<LanguageStandard>stdcpp23</LanguageStandard>
|
<LanguageStandard>stdcpp23</LanguageStandard>
|
||||||
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
||||||
|
<Optimization>MinSpace</Optimization>
|
||||||
|
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
@@ -177,11 +187,13 @@
|
|||||||
<PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>
|
||||||
</PrecompiledHeaderFile>
|
</PrecompiledHeaderFile>
|
||||||
<PrecompiledHeaderOutputFile />
|
<PrecompiledHeaderOutputFile />
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)Memory;$(SolutionDir)Maths;$(SolutionDir)Obfuscate;$(SolutionDir)UEngine;$(SolutionDir)external;$(SolutionDir)external\safetyhook\include;$(SolutionDir)external\zydis\dependencies\zycore\include;$(SolutionDir)external\zydis\include;$(SolutionDir)zydis\src;$(SolutionDir)external\MinHook\include;$(ProjectDir)SDK;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)Memory;$(SolutionDir)Maths;$(SolutionDir)Obfuscate;$(SolutionDir)external\includes;$(SolutionDir)UEngine;$(SolutionDir)external;$(SolutionDir)external\safetyhook\include;$(SolutionDir)external\zydis\dependencies\zycore\include;$(SolutionDir)external\zydis\include;$(SolutionDir)zydis\src;$(SolutionDir)external\MinHook\include;$(ProjectDir)SDK;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||||
<LanguageStandard>stdcpp23</LanguageStandard>
|
<LanguageStandard>stdcpp23</LanguageStandard>
|
||||||
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
<UseStandardPreprocessor>true</UseStandardPreprocessor>
|
||||||
|
<Optimization>MinSpace</Optimization>
|
||||||
|
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <spdlog/sinks/rotating_file_sink.h>
|
#include <spdlog/sinks/rotating_file_sink.h>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <safetyhook.hpp>
|
#include <safetyhook.hpp>
|
||||||
|
#include "GameInformations.h"
|
||||||
#include "ObfuscateString.h"
|
#include "ObfuscateString.h"
|
||||||
#include "Memory.hpp";
|
#include "Memory.hpp";
|
||||||
#include "Maths.hpp";
|
#include "Maths.hpp";
|
||||||
@@ -50,6 +51,8 @@ static float g_cameraHeight = -15.f;
|
|||||||
static float g_FOV_In = 70.f;
|
static float g_FOV_In = 70.f;
|
||||||
static float g_Compensated_FOV = 70.f;
|
static float g_Compensated_FOV = 70.f;
|
||||||
static float g_FOV_Out = 70.f;
|
static float g_FOV_Out = 70.f;
|
||||||
|
static float g_Camera_In = 550.f;
|
||||||
|
static float g_Camera_Out = 550.f;
|
||||||
static bool g_Console_Enabled = false;
|
static bool g_Console_Enabled = false;
|
||||||
|
|
||||||
// AOB Unreal Engine offsets addresses
|
// AOB Unreal Engine offsets addresses
|
||||||
@@ -190,7 +193,9 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Fogaddress == nullptr) {
|
if (Fogaddress == nullptr) {
|
||||||
constexpr auto FogStringObfuscated = make_obfuscated<0x4A>("0F 84 ?? ?? ?? ?? F6 ?? ?? ?? 0F 84 ?? ?? ?? ?? 83 BF");
|
// 40 ?? 48 83 ?? ?? 48 8B ?? ?? ?? ?? ?? 48 ?? ?? 48 89 ?? ?? ?? 48 8D ?? ?? 48 8D ?? ?? ?? E8
|
||||||
|
//constexpr auto FogStringObfuscated = make_obfuscated<0x4A>("0F 84 ?? ?? ?? ?? F6 ?? ?? ?? 0F 84 ?? ?? ?? ?? 83 BF");
|
||||||
|
constexpr auto FogStringObfuscated = make_obfuscated<0x4A>("40 ?? 48 83 ?? ?? 48 8B ?? ?? ?? ?? ?? 48 ?? ?? 48 89 ?? ?? ?? 48 8D ?? ?? 48 8D ?? ?? ?? E8");
|
||||||
Fogaddress = Memory::AOBScan(gameExecutable, FogStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
|
Fogaddress = Memory::AOBScan(gameExecutable, FogStringObfuscated.decrypt(), PAGE_EXECUTE_READ);
|
||||||
//"HellIsUs-Win64-Shipping.exe" + 22B77C8 - 74 11 - je "HellIsUs-Win64-Shipping.exe" + 22B77DB
|
//"HellIsUs-Win64-Shipping.exe" + 22B77C8 - 74 11 - je "HellIsUs-Win64-Shipping.exe" + 22B77DB
|
||||||
//"HellIsUs-Win64-Shipping.exe" + 22B77CA - 48 8B 05 8F 23 08 07 - mov rax, ["HellIsUs-Win64-Shipping.exe" + 9339B60]
|
//"HellIsUs-Win64-Shipping.exe" + 22B77CA - 48 8B 05 8F 23 08 07 - mov rax, ["HellIsUs-Win64-Shipping.exe" + 9339B60]
|
||||||
@@ -204,6 +209,7 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
|
|||||||
logger->warn("Fog signature not found. Maybe your game has been updated and is no more compatible with this plugin.");
|
logger->warn("Fog signature not found. Maybe your game has been updated and is no more compatible with this plugin.");
|
||||||
else {
|
else {
|
||||||
logger->info("Fog signature found at address: 0x{:X}.", reinterpret_cast<uintptr_t>(Fogaddress));
|
logger->info("Fog signature found at address: 0x{:X}.", reinterpret_cast<uintptr_t>(Fogaddress));
|
||||||
|
Fogaddress += 0x31; // 0x57
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,20 +393,15 @@ extern "C" __declspec(dllexport) void SetHUD(int HUDValue)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Getters for Reshade addon call
|
// Getters for Reshade addon call
|
||||||
extern "C" __declspec(dllexport) float GetFOVIn() {
|
extern "C" __declspec(dllexport) void GetGameInfos(GameInfos* infos) {
|
||||||
return g_FOV_In;
|
if (!infos) return;
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) float GetCompensatedFOV() {
|
infos->FOVIn = g_FOV_In;
|
||||||
return g_Compensated_FOV;
|
infos->CompensatedFOV = g_Compensated_FOV;
|
||||||
}
|
infos->FOVOut = g_FOV_Out;
|
||||||
|
infos->cameraIn = g_Camera_In;
|
||||||
extern "C" __declspec(dllexport) float GetFOVOut() {
|
infos->cameraOut = g_Camera_Out;
|
||||||
return g_FOV_Out;
|
infos->consoleEnabled = g_Console_Enabled;
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) bool GetConsoleEnabled() {
|
|
||||||
return g_Console_Enabled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Code injection functions
|
// Code injection functions
|
||||||
@@ -443,7 +444,10 @@ static void CameraFixEnabled(ECharlieCameraMode mode) {
|
|||||||
if (!CameraHook) { // Hook only once +0x4e or start to test +0x13
|
if (!CameraHook) { // Hook only once +0x4e or start to test +0x13
|
||||||
CameraHook = safetyhook::create_mid(Cameraaddress + 0x4e,
|
CameraHook = safetyhook::create_mid(Cameraaddress + 0x4e,
|
||||||
[](SafetyHookContext& ctx) {
|
[](SafetyHookContext& ctx) {
|
||||||
|
g_Camera_In = ctx.xmm0.f32[0];
|
||||||
ctx.xmm0.f32[0] *= (g_Camera_fix_enabled ? g_cameraDistanceMultiplier : 1.f);
|
ctx.xmm0.f32[0] *= (g_Camera_fix_enabled ? g_cameraDistanceMultiplier : 1.f);
|
||||||
|
g_Camera_Out = ctx.xmm0.f32[0];
|
||||||
|
|
||||||
// Retrieve player camera object
|
// Retrieve player camera object
|
||||||
auto* charlieCameraBaseConfig = reinterpret_cast<UCharlieCameraBaseConfig*>(ctx.rax);
|
auto* charlieCameraBaseConfig = reinterpret_cast<UCharlieCameraBaseConfig*>(ctx.rax);
|
||||||
if (charlieCameraBaseConfig && charlieCameraBaseConfig->IsA(UCharlieCameraBaseConfig::StaticClass())) {
|
if (charlieCameraBaseConfig && charlieCameraBaseConfig->IsA(UCharlieCameraBaseConfig::StaticClass())) {
|
||||||
@@ -553,22 +557,23 @@ static void VignettingFixEnabled() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void FogFixEnabled() {
|
static void FogFixEnabled() {
|
||||||
if (g_fix_enabled && g_Fog_fix_enabled && Fogaddress) {
|
if (g_fix_enabled && g_Fog_fix_enabled && Fogaddress) {
|
||||||
if (!FogHook) {
|
if (!FogHook) {
|
||||||
FogHook = safetyhook::create_mid(Fogaddress,
|
FogHook = safetyhook::create_mid(Fogaddress,
|
||||||
[](SafetyHookContext& ctx) {
|
[](SafetyHookContext& ctx) {
|
||||||
ctx.rflags |= 0x40; // ZF=1 r.VolumetricFog = 0
|
if (!ctx.rax) return;
|
||||||
|
uintptr_t* rax = reinterpret_cast<uintptr_t*>(ctx.rax);
|
||||||
|
bool* bFog = reinterpret_cast<bool*>(reinterpret_cast<uint8_t*>(rax) + 0x04);
|
||||||
|
*bFog = g_fix_enabled && g_Fog_fix_enabled ? false : true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else FogHook.enable();
|
|
||||||
logger->info("Fog fix enabled");
|
logger->info("Fog fix enabled");
|
||||||
}
|
}
|
||||||
if (!(g_fix_enabled && g_Fog_fix_enabled) && Fogaddress) {
|
if (!(g_fix_enabled && g_Fog_fix_enabled) && Fogaddress)
|
||||||
if (FogHook) FogHook.disable();
|
|
||||||
logger->info("Fog fix disabled");
|
logger->info("Fog fix disabled");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// UE Console creation
|
// UE Console creation
|
||||||
static void EnableConsole()
|
static void EnableConsole()
|
||||||
@@ -604,6 +609,8 @@ static void EnableConsole()
|
|||||||
logger->info("Successfully spawned console object");
|
logger->info("Successfully spawned console object");
|
||||||
// Set the console viewport so that it will be displayed
|
// Set the console viewport so that it will be displayed
|
||||||
Engine->GameViewport->ViewportConsole = static_cast<UConsole*>(NewObject);
|
Engine->GameViewport->ViewportConsole = static_cast<UConsole*>(NewObject);
|
||||||
|
|
||||||
|
//Engine->GameViewport->ViewportConsole->ConsoleTargetPlayer->ViewportClient
|
||||||
auto end = std::chrono::high_resolution_clock::now();
|
auto end = std::chrono::high_resolution_clock::now();
|
||||||
std::chrono::duration<double> elapsed = end - start;
|
std::chrono::duration<double> elapsed = end - start;
|
||||||
|
|
||||||
|
|||||||
1
external/includes/GameInformations.h
vendored
1
external/includes/GameInformations.h
vendored
@@ -3,6 +3,7 @@
|
|||||||
// Shared structure values with Core dll
|
// Shared structure values with Core dll
|
||||||
struct GameInfos {
|
struct GameInfos {
|
||||||
float FOVIn;
|
float FOVIn;
|
||||||
|
float CompensatedFOV;
|
||||||
float FOVOut;
|
float FOVOut;
|
||||||
float cameraIn;
|
float cameraIn;
|
||||||
float cameraOut;
|
float cameraOut;
|
||||||
|
|||||||
Reference in New Issue
Block a user