public void Read(XeReader reader) { reader.Seek(Origin, SeekOrigin.Begin); // First read the header var header = new byte[0x10]; reader.Read(header, 0, 0x10); // Parse info bits magic = BufferUtils.ToUInt16(header, 0x00); version = BufferUtils.ToUInt16(header, 0x02); unkWord1 = BufferUtils.ToUInt16(header, 0x04); unkWord2 = BufferUtils.ToUInt16(header, 0x06); entryPoint = BufferUtils.ToUInt32(header, 0x08); length = BufferUtils.ToUInt32(header, 0x0c); hmacSalt = new byte[0x10]; reader.Read(hmacSalt, 0, 0x10); reader.Seek(Origin + length, SeekOrigin.Begin); }
public void Read(XeReader reader, int length) { data = new byte[length]; reader.Read(data, 0, length); }