Add PSN SDK check bypass
This commit is contained in:
@@ -190,7 +190,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>MY_VERBOSE_LOGS;ZYDIS_STATIC_BUILD</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>MY_VERBOSE_LOGS;ZYDIS_STATIC_BUILD;RELEASE_INTERNAL</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>
|
||||
@@ -271,7 +271,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>MY_VERBOSE_LOGS;ZYDIS_STATIC_BUILD</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>MY_VERBOSE_LOGS;ZYDIS_STATIC_BUILD;RELEASE_INTERNAL</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>
|
||||
|
||||
@@ -38,6 +38,7 @@ static uint8_t* Cutscenesaddress = nullptr;
|
||||
static uint8_t* Cameraaddress = nullptr;
|
||||
static uint8_t* DOFaddress = nullptr;
|
||||
static uint8_t* Vignetteaddress = nullptr;
|
||||
static uint8_t* PSNCheckaddress = nullptr;
|
||||
|
||||
// Hooking
|
||||
static SafetyHookMid FOVHook{};
|
||||
@@ -51,6 +52,7 @@ static void UltraWideFixEnabled();
|
||||
static void CameraFixEnabled();
|
||||
static void DOFFixEnabled();
|
||||
static void VignetteFixEnabled();
|
||||
static void PSNCheckRemoval();
|
||||
|
||||
extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) {
|
||||
g_fix_enabled = enabled;
|
||||
@@ -60,8 +62,10 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) {
|
||||
constexpr auto AspectStringObfuscated = make_obfuscated<0x8B>("C5 FA 10 ?? ?? C5 F2 ?? ?? C5 CA ?? ?? E9 ?? ?? ?? ?? C5 FA 10 ?? ?? ?? ?? ?? C5");
|
||||
constexpr auto AspectCutscenesStringObfuscated = make_obfuscated<0x9D>("0F 84 ?? ?? ?? ?? 49 8B 9D ?? ?? ?? ?? 49 63 85 ?? ?? ?? ?? 48 6B ?? ?? 48 ?? ?? 48 ?? ?? 0F 84");
|
||||
constexpr auto DOFStringObfuscated = make_obfuscated<0x84>("48 83 ?? ?? C4 C1 ?? ?? ?? C5 FA ?? ?? C5 F8 ?? ?? C5 F8 ?? ?? ?? ?? C5 F8 ?? ?? ?? C5 F8 ?? ?? 76");
|
||||
constexpr auto VignetteStringObfuscated = make_obfuscated<0x84>("C5 FA ?? ?? ?? 48 83 ?? ?? 0F 85 ?? ?? ?? ?? C5 F8 ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? ?? C6 43");
|
||||
constexpr auto VignetteStringObfuscated = make_obfuscated<0x83>("C5 FA ?? ?? ?? 48 83 ?? ?? 0F 85 ?? ?? ?? ?? C5 F8 ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? ?? C6 43");
|
||||
constexpr auto CameraStringObfuscated = make_obfuscated<0x84>("C5 FA 10 ?? ?? ?? ?? ?? 40 38 ?? ?? ?? ?? ?? 0F 84 ?? ?? ?? ?? C5 FA 10");
|
||||
constexpr auto PSNCheckStringObfuscated = make_obfuscated<0x8A>("E8 ?? ?? ?? ?? 48 89 ?? ?? ?? ?? ?? ?? 48 81 ?? ?? ?? ?? ?? E9 ?? ?? ?? ?? 0F 8A ?? ?? ?? ?? EB");
|
||||
|
||||
|
||||
using AOBScan::Make;
|
||||
using OffsetScan::Make;
|
||||
@@ -72,7 +76,10 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) {
|
||||
Make(&Cutscenesaddress, AspectCutscenesStringObfuscated, "Cutscenes"),
|
||||
Make(&Cameraaddress, CameraStringObfuscated, "Camera"),
|
||||
Make(&DOFaddress, DOFStringObfuscated, "Depth of field"),
|
||||
Make(&Vignetteaddress, VignetteStringObfuscated, "Vignette")
|
||||
Make(&Vignetteaddress, VignetteStringObfuscated, "Vignette"),
|
||||
#ifdef RELEASE_INTERNAL
|
||||
Make(&PSNCheckaddress, PSNCheckStringObfuscated, "PSN check")
|
||||
#endif
|
||||
};
|
||||
// Scan all signature in a batch
|
||||
Memory::AOBScanBatch(signatures, logger);
|
||||
@@ -88,6 +95,7 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) {
|
||||
if (!init && Cameraaddress) CameraFixEnabled();
|
||||
if (!init && DOFaddress) DOFFixEnabled();
|
||||
if (!init && Vignetteaddress) VignetteFixEnabled();
|
||||
PSNCheckRemoval();
|
||||
}
|
||||
|
||||
// Setters for Reshade addon call
|
||||
@@ -199,6 +207,11 @@ static void DOFFixEnabled() {
|
||||
logger->info("Depth of field fix {}", g_fix_enabled && g_DOF_fix_enabled ? "enabled" : "disabled");
|
||||
}
|
||||
|
||||
static void PSNCheckRemoval() {
|
||||
if (!PSNCheckaddress) return;
|
||||
Memory::PatchBytes(PSNCheckaddress, "\x31\xC0\x90\x90\x90", 5); //
|
||||
}
|
||||
|
||||
// Standard dll entry
|
||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID) {
|
||||
if (reason == DLL_PROCESS_ATTACH) {
|
||||
|
||||
Reference in New Issue
Block a user