Advertisement
Guest User

Metal Gear Solid V: Ground Zeroes

a guest
Oct 31st, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. "
  2. Security:
  3. -> Custom Encryption
  4. -> MD5
  5.   -> Offset: 0
  6.   -> Calculation Start: 16
  7.   -> Calculation Length: Size - 16
  8.  
  9. Additional:
  10. The same function is used to de/encrypt the save.
  11. MD5 hash is stored at the beginning of the decrypted data.
  12. "
  13.  
  14. private byte[] EncData(byte[] source) {
  15.     uint next = 0x2E789090;
  16.     using (var src = new MasterIO(source)) {
  17.         using (var res = new MasterIO()) {
  18.             for (int i = 0; i < source.Length >> 2; ++i) {
  19.                 next ^= (next << 13);
  20.                 next ^= (next >> 7);
  21.                 next ^= (next << 5);
  22.                 res.Writer.WriteUInt32(src.Reader.ReadUInt32() ^ next);
  23.             }
  24.             return res.Buffer;
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement