Advertisement
Guest User

LEGO Games v1

a guest
Oct 31st, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "
  2. Security:
  3. -> Custom Checksum
  4.   -> Offset: Size - 4
  5.   -> Calculation Start: 0
  6.   -> Calculation Length: Size - 4
  7. "
  8.  
  9. private int CalculateChecksum(byte[] data) {
  10.     using (var xIO = new MasterIO(data, Endian.BIG)) {
  11.         int count = (data.Length / 4) - 1;
  12.  
  13.         int sum = 0x5C0999;
  14.         for (int i = 0; i < count; ++i)
  15.             sum += xIO.Reader.ReadInt32();
  16.  
  17.         return sum;
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement