marcussacana / MwareStuff

My tools to the Mware Engine
The Unlicense
60 stars 12 forks source link

Decryption Error #44

Closed aierblue closed 1 year ago

aierblue commented 1 year ago

An error was reported when using this tool. How to solve it? The error code is as follows

Unhandled exception. System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
   at Internal.Cryptography.UniversalCryptoDecryptor.DepadBlock(Byte[] block, Int32 offset, Int32 count)
   at Internal.Cryptography.UniversalCryptoDecryptor.UncheckedTransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at Internal.Cryptography.UniversalCryptoTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
   at System.Security.Cryptography.CryptoStream.ReadAsyncCore(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken, Boolean useAsync)
   at System.Security.Cryptography.CryptoStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)
   at System.IO.Stream.CopyTo(Stream destination)
   at NPK3Tool.Extensions.ToMemory(Stream Stream) in C:\Users\Marcus\Documents\GitHub\MwareStuff\NPK3Tool\Extensions.cs:line 107
   at NPK3Tool.NPK.GetEntryTable(Stream Package) in C:\Users\Marcus\Documents\GitHub\MwareStuff\NPK3Tool\NPK.cs:line 282
   at NPK3Tool.NPK.Unpack(String Package, String OutDir) in C:\Users\Marcus\Documents\GitHub\MwareStuff\NPK3Tool\NPK.cs:line 229
   at NPK3Tool.Program.Main(String[] args) in C:\Users\Marcus\Documents\GitHub\MwareStuff\NPK3Tool\Program.cs:line 130
aierblue commented 1 year ago

The game is Tokyo Necro(Jast USA)

marcussacana commented 1 year ago

Or your NPK is corrupted or you selected the wrong game, this is basically decryption error. For be sure, use the KeyFinder tool to find your game key and try set it manually

aierblue commented 1 year ago

KeyFinder

Or your NPK is corrupted or you selected the wrong game, this is basically decryption error. For be sure, use the KeyFinder tool to find your game key and try set it manually

Sorry, my mistake. I am using the Chinese version and the key is different from the English version. So can you add a Chinese version?

aierblue commented 1 year ago

Or your NPK is corrupted or you selected the wrong game, this is basically decryption error. For be sure, use the KeyFinder tool to find your game key and try set it manually

Another issue is that I can extract the cg file, but after repackaging the NPK3 Packages, the game cannot recognize it. Even if I directly repackage it after extracting it, it cannot be done, let alone modify the file and repackage it again

aierblue commented 1 year ago

Or your NPK is corrupted or you selected the wrong game, this is basically decryption error. For be sure, use the KeyFinder tool to find your game key and try set it manually

Then when I extract the repackaged file again, the following situation will occur 1

marcussacana commented 1 year ago

try do those steps https://github.com/marcussacana/MwareStuff/issues/30