Beispiel #1
0
 public static GClass104.GEnum7 smethod_1(Stream stream_0)
 {
     byte[] buffer = new byte[4];
     if (stream_0.Length > 68L)
     {
         stream_0.Seek(64L, SeekOrigin.Begin);
         stream_0.Read(buffer, 0, buffer.Length);
         if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0)) == (int)GClass104.uint_1)
         {
             return(GClass104.GEnum7.const_1);
         }
     }
     if (stream_0.Length > 132L)
     {
         stream_0.Seek(128L, SeekOrigin.Begin);
         stream_0.Read(buffer, 0, buffer.Length);
         if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0)) == (int)GClass104.uint_1)
         {
             return(GClass104.GEnum7.const_2);
         }
     }
     if (stream_0.Length > 4L)
     {
         stream_0.Seek(0L, SeekOrigin.Begin);
         stream_0.Read(buffer, 0, buffer.Length);
         if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0)) == (int)GClass104.uint_0)
         {
             return(GClass104.GEnum7.const_3);
         }
     }
     return(GClass104.GEnum7.const_0);
 }
Beispiel #2
0
 private void method_4(Stream stream_0)
 {
     stream_0.Seek(0L, SeekOrigin.Begin);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_1)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_0)), 0, 4);
     stream_0.Write(this.byte_1, 0, this.byte_1.Length);
     stream_0.Write(this.byte_0, 0, this.byte_0.Length);
 }
Beispiel #3
0
 public void method_0(Stream stream_0)
 {
     stream_0.Seek(0L, SeekOrigin.Begin);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_3)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_7)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_0)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_4)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_5)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_6)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_1)), 0, 4);
     stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_2)), 0, 4);
 }
Beispiel #4
0
 public static GClass104.GEnum7 smethod_0(byte[] byte_0)
 {
     if (byte_0.Length > 68 && (int)GClass27.smethod_5(BitConverter.ToUInt32(byte_0, 64)) == (int)GClass104.uint_1)
     {
         return(GClass104.GEnum7.const_1);
     }
     if (byte_0.Length > 132 && (int)GClass27.smethod_5(BitConverter.ToUInt32(byte_0, 128)) == (int)GClass104.uint_1)
     {
         return(GClass104.GEnum7.const_2);
     }
     return(byte_0.Length > 4 && (int)GClass27.smethod_5(BitConverter.ToUInt32(byte_0, 0)) == (int)GClass104.uint_0 ? GClass104.GEnum7.const_3 : GClass104.GEnum7.const_0);
 }
Beispiel #5
0
            private void method_2(Stream stream_0)
            {
                stream_0.Seek(0L, SeekOrigin.Begin);
                byte[] buffer1 = new byte[4];
                if (!this.bool_1)
                {
                    stream_0.Read(this.byte_0, 0, this.byte_0.Length);
                }
                stream_0.Read(this.byte_9, 0, this.byte_9.Length);
                stream_0.Read(buffer1, 0, 4);
                if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0)) != (int)this.uint_3)
                {
                    throw new Exception("Invalid Magic!");
                }
                stream_0.Read(buffer1, 0, 4);
                if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0)) != (int)this.uint_4)
                {
                    throw new Exception("Invalid Header Size!");
                }
                stream_0.Read(buffer1, 0, 4);
                this.uint_6 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(buffer1, 0, 4);
                this.uint_2 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(buffer1, 0, 4);
                this.uint_0 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(buffer1, 0, 4);
                this.uint_5 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(buffer1, 0, 4);
                this.uint_1 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
                stream_0.Read(this.byte_7, 0, this.byte_7.Length);
                stream_0.Read(this.byte_2, 0, this.byte_2.Length);
                stream_0.Read(this.byte_4, 0, this.byte_4.Length);
                stream_0.Read(this.byte_3, 0, this.byte_3.Length);
                stream_0.Read(this.byte_11, 0, this.byte_11.Length);
                stream_0.Read(this.byte_6, 0, this.byte_6.Length);
                stream_0.Read(this.byte_1, 0, this.byte_1.Length);
                stream_0.Read(this.byte_12, 0, this.byte_12.Length);
                stream_0.Read(this.byte_13, 0, this.byte_13.Length);
                stream_0.Read(this.byte_8, 0, this.byte_8.Length);
                stream_0.Read(this.byte_10, 0, this.byte_10.Length);
                stream_0.Read(this.byte_5, 0, this.byte_5.Length);
                stream_0.Seek(-16L, SeekOrigin.Current);
                stream_0.Write(new byte[16], 0, 16);
                byte[] buffer2 = new byte[stream_0.Length];
                stream_0.Seek(0L, SeekOrigin.Begin);
                stream_0.Read(buffer2, 0, buffer2.Length);
                MD5 md5 = MD5.Create();

                byte[] hash = md5.ComputeHash(buffer2, this.bool_1 ? 0 : 64, 1536);
                md5.Clear();
                this.bool_0 = GClass27.smethod_1(hash, this.byte_5);
            }
Beispiel #6
0
 private void method_3(Stream stream_0)
 {
     stream_0.Seek(0L, SeekOrigin.Begin);
     byte[] buffer = new byte[4];
     stream_0.Read(buffer, 0, 4);
     if ((int)GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0)) != (int)this.uint_1)
     {
         throw new Exception("Invalid Magic!");
     }
     stream_0.Read(buffer, 0, 4);
     this.uint_0 = GClass27.smethod_5(BitConverter.ToUInt32(buffer, 0));
     stream_0.Read(this.byte_1, 0, this.byte_1.Length);
     stream_0.Read(this.byte_0, 0, this.byte_0.Length);
 }
Beispiel #7
0
            private void method_5(Stream stream_0)
            {
                stream_0.Seek(0L, SeekOrigin.Begin);
                if (!this.bool_1)
                {
                    stream_0.Write(this.byte_0, 0, this.byte_0.Length);
                }
                stream_0.Write(this.byte_9, 0, this.byte_9.Length);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_3)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_4)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_6)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_2)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_0)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_5)), 0, 4);
                stream_0.Write(BitConverter.GetBytes(GClass27.smethod_5(this.uint_1)), 0, 4);
                stream_0.Write(this.byte_7, 0, this.byte_7.Length);
                stream_0.Write(this.byte_2, 0, this.byte_2.Length);
                stream_0.Write(this.byte_4, 0, this.byte_4.Length);
                stream_0.Write(this.byte_3, 0, this.byte_3.Length);
                stream_0.Write(this.byte_11, 0, this.byte_11.Length);
                stream_0.Write(this.byte_6, 0, this.byte_6.Length);
                stream_0.Write(this.byte_1, 0, this.byte_1.Length);
                stream_0.Write(this.byte_12, 0, this.byte_12.Length);
                stream_0.Write(this.byte_13, 0, this.byte_13.Length);
                stream_0.Write(this.byte_8, 0, this.byte_8.Length);
                stream_0.Write(this.byte_10, 0, this.byte_10.Length);
                int position = (int)stream_0.Position;

                this.byte_5 = new byte[16];
                stream_0.Write(this.byte_5, 0, this.byte_5.Length);
                byte[] numArray = new byte[stream_0.Position];
                stream_0.Seek(0L, SeekOrigin.Begin);
                stream_0.Read(numArray, 0, numArray.Length);
                this.method_1(numArray, this.bool_1 ? 0 : 64);
                stream_0.Seek((long)position, SeekOrigin.Begin);
                stream_0.Write(this.byte_5, 0, this.byte_5.Length);
            }
Beispiel #8
0
 private void method_0(Stream stream_0, GEnum3 genum3_0)
 {
     stream_0.Seek(0L, SeekOrigin.Begin);
     byte[] buffer1 = new byte[8];
     stream_0.Read(buffer1, 0, 4);
     this.uint_1 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
     stream_0.Read(this.byte_7, 0, this.byte_7.Length);
     stream_0.Read(this.byte_4, 0, this.byte_4.Length);
     stream_0.Read(this.byte_3, 0, this.byte_3.Length);
     stream_0.Read(buffer1, 0, 4);
     this.byte_9 = buffer1[0];
     this.byte_2 = buffer1[1];
     this.byte_8 = buffer1[2];
     this.byte_5 = buffer1[3];
     stream_0.Read(buffer1, 0, 8);
     stream_0.Read(buffer1, 0, 8);
     this.TitleId = GClass27.smethod_6(BitConverter.ToUInt64(buffer1, 0));
     stream_0.Read(buffer1, 0, 4);
     this.uint_2 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
     stream_0.Read(buffer1, 0, 2);
     this.ushort_3 = GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 0));
     stream_0.Read(buffer1, 0, 2);
     this.ushort_4 = GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 0));
     stream_0.Read(buffer1, 0, 2);
     this.ushort_6 = GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 0));
     stream_0.Read(this.byte_6, 0, this.byte_6.Length);
     stream_0.Read(buffer1, 0, 4);
     this.uint_0 = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
     stream_0.Read(buffer1, 0, 8);
     this.TitleVersion  = GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 0));
     this.NumOfContents = GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 2));
     this.ushort_2      = GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 4));
     this.ushort_5      = GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 6));
     if (genum3_0 != GEnum3.const_3)
     {
         stream_0.Position = 2820L;
     }
     this.list_0 = new List <GClass101>();
     for (int index = 0; index < (int)this.NumOfContents; ++index)
     {
         GClass101 gclass101;
         if (genum3_0 != GEnum3.const_1 && genum3_0 != GEnum3.const_3)
         {
             if (genum3_0 != GEnum3.const_0)
             {
                 throw new NotImplementedException();
             }
             GClass102 gclass102 = new GClass102();
             gclass102.Hash = new byte[32];
             gclass101      = (GClass101)gclass102;
         }
         else
         {
             GClass103 gclass103 = new GClass103();
             gclass103.Hash = new byte[20];
             gclass101      = (GClass101)gclass103;
         }
         stream_0.Read(buffer1, 0, 8);
         gclass101.ContentId = GClass27.smethod_5(BitConverter.ToUInt32(buffer1, 0));
         gclass101.Index     = GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 4));
         gclass101.GEnum6_0  = (GEnum6)GClass27.smethod_4(BitConverter.ToUInt16(buffer1, 6));
         stream_0.Read(buffer1, 0, 8);
         gclass101.Size = new DataSize(GClass27.smethod_6(BitConverter.ToUInt64(buffer1, 0)));
         stream_0.Read(gclass101.Hash, 0, gclass101.Hash.Length);
         this.list_0.Add(gclass101);
         if (genum3_0 == GEnum3.const_1)
         {
             byte[] buffer2 = new byte[12];
             stream_0.Read(buffer2, 0, 12);
         }
     }
     stream_0.Read(this.Certificate1, 0, this.Certificate1.Length);
     stream_0.Read(this.Certificate2, 0, this.Certificate2.Length);
 }