private void method_17() { MemoryStream sectionStream = new MemoryStream(); Class889 class889 = Class889.Create((Stream)sectionStream, this.dxfVersion_0, this.encoding_0); class889.vmethod_9(this.list_0.Count); class889.vmethod_9(2); class889.vmethod_9(29696); class889.vmethod_9(0); class889.vmethod_9(this.list_0.Count); foreach (Class617 class617 in this.list_0) { class889.vmethod_15(class617.SectionSize); class889.vmethod_9(class617.PageCount); class889.vmethod_9(class617.MaxDecompressedPageSize); class889.vmethod_9(1); class889.vmethod_9(class617.Compressed); class889.vmethod_9(class617.SectionId); class889.vmethod_9(class617.Encrypted); byte[] buffer = new byte[64]; if (!string.IsNullOrEmpty(class617.Name)) { byte[] bytes = Encodings.Ascii.GetBytes(class617.Name); int num = Math.Min(bytes.Length, buffer.Length); for (int index = 0; index < num; ++index) { buffer[index] = bytes[index]; } } sectionStream.Write(buffer, 0, buffer.Length); foreach (Class616 page in class617.Pages) { if (page.PageNumber > 0) { class889.vmethod_9(page.PageNumber); class889.vmethod_9(page.CompressedSize); class889.vmethod_15(page.StartOffset); } } } Class615 page1 = this.method_20(1097007163, sectionStream); int count = Class998.smethod_0((int)(this.stream_0.Position - page1.StreamOffset)); this.stream_0.Write(Class998.byte_0, 0, count); page1.Length = this.stream_0.Position - page1.StreamOffset; this.method_19(page1); }
private void method_2(MemoryStream fileHeaderDataStream) { Stream2 stream2 = new Stream2((Stream)fileHeaderDataStream, 0U); Class889 class889 = Class889.Create((Stream)stream2, this.dxfVersion_0, this.encoding_0); byte[] bytes = Class1045.encoding_0.GetBytes("AcFssFcAJMB"); stream2.Write(bytes, 0, 11); stream2.WriteByte((byte)0); class889.vmethod_9(0); class889.vmethod_9(108); class889.vmethod_9(4); class889.vmethod_9(this.class564_0.GapsRootId); class889.vmethod_9(this.class564_0.GapsLeftId); class889.vmethod_9(this.class564_0.GapsRightId); class889.vmethod_9(this.class564_0.GapsUnknown); class889.vmethod_9(this.class564_0.LastPageId); class889.vmethod_15(this.class564_0.LastPageEndOffset); class889.vmethod_15(this.class564_0.Header2Offset); class889.vmethod_11(this.class564_0.GapCount); class889.vmethod_11(this.class564_0.PageCount); class889.vmethod_9(32); class889.vmethod_9(128); class889.vmethod_9(64); class889.vmethod_11(this.class564_0.PagesMapId); class889.vmethod_15(this.class564_0.PagesMapOffset - 256UL); class889.vmethod_11(this.class564_0.SectionsMapId); class889.vmethod_11(this.class564_0.PagesMaxId); class889.vmethod_11(this.class564_0.GapsMaxId); long position = stream2.Position; class889.vmethod_11(0U); uint crc = stream2.Crc; stream2.Position = position; class889.vmethod_11(crc); stream2.Flush(); this.method_3(fileHeaderDataStream); }
private void method_3(Class889 byteStream) { byteStream.vmethod_15(this.class954_0.HeaderSize); byteStream.vmethod_15(this.class954_0.FileSize); byteStream.vmethod_15(this.class954_0.PagesMapCrcCompressed); byteStream.vmethod_15(this.class954_0.PagesMapDataRepeatCount); byteStream.vmethod_15(this.class954_0.PagesMapCrcSeed); byteStream.vmethod_15(this.class954_0.PagesMap2Offset); byteStream.vmethod_15(this.class954_0.PagesMap2Id); byteStream.vmethod_15(this.class954_0.PagesMapOffset); byteStream.vmethod_15(this.class954_0.PagesMapId); byteStream.vmethod_15(this.class954_0.Header2Offset); byteStream.vmethod_15(this.class954_0.PagesMapSizeCompressed); byteStream.vmethod_15(this.class954_0.PagesMapSizeDecompressed); byteStream.vmethod_15(this.class954_0.PageCount); byteStream.vmethod_15(this.class954_0.PagesMaxId); byteStream.vmethod_15(this.class954_0.Unknown1); byteStream.vmethod_15(this.class954_0.Unknown2); byteStream.vmethod_15(this.class954_0.PagesMapCrcDecompressed); byteStream.vmethod_15(this.class954_0.Unknown3); byteStream.vmethod_15(this.class954_0.Unknown4); byteStream.vmethod_15(this.class954_0.Unknown5); byteStream.vmethod_15(this.class954_0.SectionCount); byteStream.vmethod_15(this.class954_0.SectionsMapCrcDecompressed); byteStream.vmethod_15(this.class954_0.SectionsMapSizeCompressed); byteStream.vmethod_15(this.class954_0.SectionsMap2Id); byteStream.vmethod_15(this.class954_0.SectionsMapId); byteStream.vmethod_15(this.class954_0.SectionsMapSizeDecompressed); byteStream.vmethod_15(this.class954_0.SectionsMapCrcCompressed); byteStream.vmethod_15(this.class954_0.SectionsMapDataRepeatCount); byteStream.vmethod_15(this.class954_0.SectionsMapCrcSeed); byteStream.vmethod_15(this.class954_0.StreamVersion); byteStream.vmethod_15(this.class954_0.CrcSeed); byteStream.vmethod_15(this.class954_0.CrcSeedEncoded); byteStream.vmethod_15(this.class954_0.RandomSeed); byteStream.vmethod_15(0UL); }
private void method_17(Class504 section, Class889 byteStream) { byteStream.vmethod_15(section.DataSize); byteStream.vmethod_15(section.MaxDecompressedPageSize); byteStream.vmethod_15(section.Encrypted); byteStream.vmethod_15(section.HashCode); ulong num = (ulong)section.Name.Length; if (num > 0UL) { num = (ulong)((long)num + 1L << 1); } byteStream.vmethod_15(num); byteStream.vmethod_15(section.Unknown); byteStream.vmethod_15(section.Encoding); byteStream.vmethod_15(section.PageCount); if (num > 0UL) { byte[] bytes = Encoding.Unicode.GetBytes(section.Name); byteStream.Stream.Write(bytes, 0, bytes.Length); byteStream.vmethod_1((byte)0); byteStream.vmethod_1((byte)0); } foreach (Class443 page in section.Pages) { byteStream.vmethod_15(page.DataOffset); byteStream.vmethod_15(page.PageSize); byteStream.vmethod_13(page.Id); byteStream.vmethod_15(page.DecompressedSize); byteStream.vmethod_15(page.CompressedSize); byteStream.vmethod_15(page.CheckSum); byteStream.vmethod_15(page.Crc); } }
private unsafe void method_1() { this.stream_0.Position = this.stream_0.Length; this.class954_0.FileSize = (ulong)(this.stream_0.Length + 1024L); this.class954_0.Header2Offset = (ulong)(this.stream_0.Position - 1152L); this.class954_0.SectionsMapCrcSeed = this.class995_0.method_2((uint)this.class954_0.SectionsMapCrcSeed); this.class954_0.PagesMapCrcSeed = this.class995_0.method_2((uint)this.class954_0.PagesMapCrcSeed); Class888 class888 = new Class888(); class888.method_0(this.class954_0.CrcSeed, this.class995_0); this.class954_0.CrcSeedEncoded = this.class995_0.method_2((uint)(this.class954_0.CrcSeed & (ulong)ushort.MaxValue)); MemoryStream memoryStream1 = new MemoryStream(); Class889 byteStream = Class889.Create((Stream)memoryStream1, this.dxfVersion_0, this.encoding_0); this.method_3(byteStream); ulong num1 = Class656.class656_0.method_0(memoryStream1.GetBuffer(), 0U, (uint)memoryStream1.Length, Class656.smethod_1(0UL, (uint)memoryStream1.Length)); memoryStream1.Position = 264L; byteStream.vmethod_15(num1); Class955 class955 = new Class955(); MemoryStream memoryStream2 = new MemoryStream(); class955.method_1(memoryStream1.GetBuffer(), 0, (int)memoryStream1.Length, (Stream)memoryStream2); if (memoryStream2.Length >= memoryStream1.Length) { memoryStream2 = memoryStream1; } ulong num2 = Class656.class656_0.method_0(memoryStream2.GetBuffer(), 0U, (uint)memoryStream2.Length, Class656.smethod_1(0UL, (uint)memoryStream2.Length)); MemoryStream memoryStream3 = new MemoryStream(12); Class889 class889_1 = Class889.Create((Stream)memoryStream3, this.dxfVersion_0, this.encoding_0); ulong control = this.class995_0.method_1(); class889_1.vmethod_15(control); class889_1.vmethod_15(Class888.smethod_0(control, control)); ulong num3 = Class656.class656_0.method_0(memoryStream3.GetBuffer(), 0U, (uint)memoryStream3.Length, Class656.smethod_0(0UL, (uint)memoryStream3.Length)); MemoryStream memoryStream4 = new MemoryStream(1024); Class889 class889_2 = Class889.Create((Stream)memoryStream4, this.dxfVersion_0, this.encoding_0); class889_2.vmethod_15(num3); class889_2.vmethod_15(control); class889_2.vmethod_15(num2); if (memoryStream2.Length < 272L) { class889_2.vmethod_13(memoryStream2.Length); } else { if (memoryStream2.Length != 272L) { throw new Exception(); } class889_2.vmethod_13(-272L); } memoryStream4.Write(memoryStream2.GetBuffer(), 0, (int)memoryStream2.Length); uint num4 = Class746.class746_0.K * 3U; uint length = (uint)class889_2.Stream.Length; uint num5 = (uint)((ulong)(uint)((int)length + 8 - 1) & 18446744073709551608UL); uint paddingSize1 = num5 - length; this.method_25((Stream)memoryStream4, paddingSize1); uint num6 = num4 / num5; for (int index = 1; (long)index < (long)num6; ++index) { memoryStream4.Write(memoryStream4.GetBuffer(), 0, (int)num5); } uint paddingSize2 = num4 - (uint)memoryStream4.Length; this.method_25((Stream)memoryStream4, paddingSize2); byte[] buffer = new byte[1024]; fixed(byte *source = memoryStream4.GetBuffer()) fixed(byte *destination = buffer) { this.method_28(destination, source, (int)num4, Class746.class746_0); this.method_24(destination + 765, 259U); } MemoryStream memoryStream5 = new MemoryStream(buffer, true); memoryStream5.Position = memoryStream5.Length - 40L; class888.Write((Stream)memoryStream5); if (memoryStream5.Length != 1024L) { throw new Exception(); } this.stream_0.Write(buffer, 0, buffer.Length); this.stream_0.Position = 128L; this.stream_0.Write(buffer, 0, buffer.Length); }