public static void SaveToDisk(string path, byte[] WzIv, List<string> listEntries) { int lastIndex = listEntries.Count - 1; string lastEntry = listEntries[lastIndex]; listEntries[lastIndex] = lastEntry.Substring(0, lastEntry.Length - 1) + "/"; WzBinaryWriter wzWriter = new WzBinaryWriter(File.Create(path), WzIv); string s; for (int i = 0; i < listEntries.Count; i++) { s = listEntries[i]; wzWriter.Write((int)s.Length); char[] encryptedChars = wzWriter.EncryptString(s + (char)0); for (int j = 0; j < encryptedChars.Length; j++) wzWriter.Write((short)encryptedChars[j]); } listEntries[lastIndex] = lastEntry.Substring(0, lastEntry.Length - 1) + "/"; }