Пример #1
0
			public bool Read(CLIFile pFile)
			{
				Signature = pFile.ReadUInt32();
				MajorVersion = pFile.ReadUInt16();
				MinorVersion = pFile.ReadUInt16();
				Reserved = pFile.ReadUInt32();
				VersionLength = pFile.ReadUInt32();
				Version = pFile.ReadBytes((int)VersionLength);
				Flags = pFile.ReadUInt16();
				StreamCount = pFile.ReadUInt16();

				Streams = new CLIMetadataStreamHeader[StreamCount];
				for (int index = 0; index < Streams.Length; ++index)
				{
					Streams[index] = new CLIMetadataStreamHeader();
					Streams[index].Read(pFile);
				}
				return true;
			}
Пример #2
0
			public void Read(CLIFile pFile)
			{
				ReservedA = pFile.ReadUInt32();
				MajorVersion = pFile.ReadByte();
				MinorVersion = pFile.ReadByte();
				HeapOffsetSizes = pFile.ReadByte();
				ReservedB = pFile.ReadByte();
				PresentTables = pFile.ReadUInt64();
				SortedTables = pFile.ReadUInt64();
			}
Пример #3
0
			public void Read(CLIFile pFile)
			{
				SizeOfHeader = pFile.ReadUInt32();
				MajorRuntimeVersion = pFile.ReadUInt16();
				MinorRuntimeVersion = pFile.ReadUInt16();
				Metadata.Read(pFile);
				Flags = pFile.ReadUInt32();
				EntryPointToken = pFile.ReadUInt32();
				EntryPointRVA = pFile.ReadUInt16();
				Resources.Read(pFile);
				StrongNameSignature.Read(pFile);
				CodeManagerTable.Read(pFile);
				VTableFixups.Read(pFile);
				ExportAddressTableJumps.Read(pFile);
				ManagedNativeHeader.Read(pFile);
			}
Пример #4
0
			public void Read(CLIFile pFile)
			{
				Offset = pFile.ReadUInt32();
				Size = pFile.ReadUInt32();
				Name = pFile.ReadString();
				uint headerSize = (uint)(sizeof(uint) * 2 + (Name.Length + 1));
				if ((headerSize & 0x03) != 0) pFile.mCursor += (int)(4 - (headerSize & 0x03));
			}
Пример #5
0
			public void Read(CLIFile pFile)
			{
				Name = pFile.ReadString(8);
				PhysicalAddress = VirtualSize = pFile.ReadUInt32();
				VirtualAddress = pFile.ReadUInt32();
				SizeOfRawData = pFile.ReadUInt32();
				PointerToRawData = pFile.ReadUInt32();
				PointerToRelocations = pFile.ReadUInt32();
				PointerToLineNumbers = pFile.ReadUInt32();
				NumberOfRelocations = pFile.ReadUInt16();
				NumberOfLineNumbers = pFile.ReadUInt16();
				Characteristics = pFile.ReadUInt32();
			}
Пример #6
0
			public bool Read(CLIFile pFile)
			{
				Magic = pFile.ReadUInt16();
				MajorLinkerVersion = pFile.ReadByte();
				MinorLinkerVersion = pFile.ReadByte();
				SizeOfCode = pFile.ReadUInt32();
				SizeOfInitializedData = pFile.ReadUInt32();
				SizeOfUninitializedData = pFile.ReadUInt32();
				AddressOfEntryPoint = pFile.ReadUInt32();
				BaseOfCode = pFile.ReadUInt32();
				BaseOfData = pFile.ReadUInt32();
				ImageBase = pFile.ReadUInt32();
				SectionAlignment = pFile.ReadUInt32();
				FileAlignment = pFile.ReadUInt32();
				MajorOperatingSystemVersion = pFile.ReadUInt16();
				MinorOperatingSystemVersion = pFile.ReadUInt16();
				MajorImageVersion = pFile.ReadUInt16();
				MinorImageVersion = pFile.ReadUInt16();
				MajorSubsystemVersion = pFile.ReadUInt16();
				MinorSubsystemVersion = pFile.ReadUInt16();
				Reserved = pFile.ReadUInt32();
				SizeOfImage = pFile.ReadUInt32();
				SizeOfHeaders = pFile.ReadUInt32();
				Checksum = pFile.ReadUInt32();
				Subsystem = pFile.ReadUInt16();
				DllCharacteristics = pFile.ReadUInt16();
				SizeOfStackReserve = pFile.ReadUInt32();
				SizeOfStackCommit = pFile.ReadUInt32();
				SizeOfHeapReserve = pFile.ReadUInt32();
				SizeOfHeapCommit = pFile.ReadUInt32();
				LoaderFlags = pFile.ReadUInt32();
				NumberOfRVAAndSizes = pFile.ReadUInt32();
				for (int index = 0; index < DataDirectories.Length; ++index)
				{
					DataDirectories[index] = new DataDirectory();
					DataDirectories[index].Read(pFile);
				}
				return true;
			}
Пример #7
0
			public void Read(CLIFile pFile)
			{
				VirtualAddress = pFile.ReadUInt32();
				Size = pFile.ReadUInt32();
			}
Пример #8
0
			public void Read(CLIFile pFile)
			{
				Signature = pFile.ReadUInt32();
				Machine = pFile.ReadUInt16();
				NumberOfSections = pFile.ReadUInt16();
				Timestamp = pFile.ReadUInt32();
				PointerToSymbolTable = pFile.ReadUInt32();
				NumberOfSymbols = pFile.ReadUInt32();
				SizeOfOptionalHeader = pFile.ReadUInt16();
				Characteristics = pFile.ReadUInt16();
			}
Пример #9
0
			public void Read(CLIFile pFile)
			{
				Signature = pFile.ReadUInt16();
				LastPageByteCount = pFile.ReadUInt16();
				PageCount = pFile.ReadUInt16();
				RelocationCount = pFile.ReadUInt16();
				HeaderParagraphCount = pFile.ReadUInt16();
				MinimumParagraphCount = pFile.ReadUInt16();
				MaximumParagraphCount = pFile.ReadUInt16();
				RegisterSS = pFile.ReadUInt16();
				RegisterSP = pFile.ReadUInt16();
				Checksum = pFile.ReadUInt16();
				RegisterIP = pFile.ReadUInt16();
				RegisterCS = pFile.ReadUInt16();
				RelocationOffset = pFile.ReadUInt16();
				Overlay = pFile.ReadUInt16();
				for (int index = 0; index < ReservedA.Length; ++index) ReservedA[index] = pFile.ReadUInt16();
				OEMIdentifier = pFile.ReadUInt16();
				OEMInformation = pFile.ReadUInt16();
				for (int index = 0; index < ReservedB.Length; ++index) ReservedB[index] = pFile.ReadUInt16();
				NextHeaderOffset = pFile.ReadUInt32();
			}