Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Fix SkipConnectionPatching checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabi committed Sep 7, 2023
1 parent 7570591 commit 4ceab93
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public static bool LaunchGame(string appPath, string gameCommandLine, ParseResul
var modulusOffset = memory.Data.FindPattern(Patterns.Common.SignatureModulus);
var legacyCertMode = clientVersion is (1, >= 14, <= 3, _) or (3, 4, <= 1, _) or (9, _, _, _) or (10, <= 1, < 5, _);

if (commandLineResult.GetValueForOption(LaunchOptions.SkipConnectionPatching))
if (!commandLineResult.GetValueForOption(LaunchOptions.SkipConnectionPatching))
{
if (legacyCertMode)
{
Expand Down Expand Up @@ -287,23 +287,23 @@ clientVersion is (9, 2, 7, _) or (3, _, _, _) or (10, _, _, _) or (1, >= 14, >=
WaitForUnpack(ref processInfo, memory, ref mbi, gameAppData, antiCrash);

#if x64
if (commandLineResult.GetValueForOption(LaunchOptions.SkipConnectionPatching))
if (!commandLineResult.GetValueForOption(LaunchOptions.SkipConnectionPatching))
{
if (legacyCertMode)
{
Task.WaitAll(new[]
{
memory.QueuePatch(Patterns.Windows.CertBundle, Patches.Windows.CertBundle, "CertBundle"),
memory.QueuePatch(Patterns.Windows.CertCommonName, Patches.Windows.CertCommonName, "CertCommonName", 5)
}, CancellationTokenSource.Token);
memory.QueuePatch(Patterns.Windows.CertBundle, Patches.Windows.CertBundle, "CertBundle"),
memory.QueuePatch(Patterns.Windows.CertCommonName, Patches.Windows.CertCommonName, "CertCommonName", 5)
}, CancellationTokenSource.Token);
}
else if (LaunchOptions.IsDevModeAllowed && commandLineResult.GetValueForOption(LaunchOptions.DevMode))
{
Task.WaitAll(new[]
{
memory.QueuePatch(Patterns.Windows.CertChain, Patches.Windows.CertChain, "CertChain"),
memory.QueuePatch(Patterns.Windows.CertCommonName, Patches.Windows.CertCommonName, "CertCommonName", 5)
}, CancellationTokenSource.Token);
memory.QueuePatch(Patterns.Windows.CertChain, Patches.Windows.CertChain, "CertChain"),
memory.QueuePatch(Patterns.Windows.CertCommonName, Patches.Windows.CertCommonName, "CertCommonName", 5)
}, CancellationTokenSource.Token);
}
}

Expand Down

0 comments on commit 4ceab93

Please sign in to comment.