From 3d267cecfa4d63d44e2bd54516def17932516376 Mon Sep 17 00:00:00 2001 From: jvyden Date: Sun, 3 Nov 2024 03:36:21 -0500 Subject: [PATCH] Always try to decrypt without rif/rap keys as fallback --- Refresher.Core/Pipelines/Steps/DecryptGameEbootStep.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Refresher.Core/Pipelines/Steps/DecryptGameEbootStep.cs b/Refresher.Core/Pipelines/Steps/DecryptGameEbootStep.cs index dcd0a20..41f58d6 100644 --- a/Refresher.Core/Pipelines/Steps/DecryptGameEbootStep.cs +++ b/Refresher.Core/Pipelines/Steps/DecryptGameEbootStep.cs @@ -15,11 +15,6 @@ public override Task ExecuteAsync(CancellationToken cancellationToken = default) LibSce sce = this.Encryption.Sce!; byte[] selfData = File.ReadAllBytes(this.Game.DownloadedEbootPath!); - // if we don't need to decrypt, just don't. ez - if (!this.Game.ShouldUseNpdrmEncryption.GetValueOrDefault()) - { - this.Encryption.Self = new Self(sce, selfData); - } // if we downloaded an act.dat file, we downloaded a rif. use full console decryption. if (this.Encryption.DownloadedActDatPath != null) { @@ -34,10 +29,10 @@ public override Task ExecuteAsync(CancellationToken cancellationToken = default) byte[] rapData = File.ReadAllBytes(this.Encryption.DownloadedLicensePath!); this.Encryption.Self = new Self(sce, selfData, rapData); } - // otherwise, we're fucked + // otherwise, we're either fucked or this is a free-type npdrm eboot. decrypt it without any rif/rap else { - throw new InvalidOperationException("No encryption method could be determined."); + this.Encryption.Self = new Self(sce, selfData); } string tempFile = this.Game.DecryptedEbootPath = Path.GetTempFileName();