diff --git a/PokemonGoAPI/Helpers/Crypt/PCrypt.cs b/PokemonGoAPI/Helpers/Crypt/PCrypt.cs index 3958aa8e7..14d4023b3 100644 --- a/PokemonGoAPI/Helpers/Crypt/PCrypt.cs +++ b/PokemonGoAPI/Helpers/Crypt/PCrypt.cs @@ -121,7 +121,9 @@ public static byte[] decrypt(byte[] input, out int length) for (int i = 0; i < outputcontent.Count; i++) { uint[] temp2 = new uint[0x100 / 4]; + uint[] temp3 = new uint[0x100 / 4]; Buffer.BlockCopy(outputcontent[i], 0, temp2, 0, 0x100); + Buffer.BlockCopy(temp2, 0, temp3, 0, 0x100); if (version == 1) Shuffles.Unshuffle(temp2); else Shuffles.Unshuffle2(temp2); Buffer.BlockCopy(temp2, 0, outputcontent[i], 0, 0x100); @@ -129,6 +131,7 @@ public static byte[] decrypt(byte[] input, out int length) { outputcontent[i][j] ^= cipher8[j]; } + Buffer.BlockCopy(temp3, 0, cipher8, 0, 0x100); } byte[] ret = new byte[output_len];