예제 #1
0
파일: Param.cs 프로젝트: oathgg/GameSharp
 public Param(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Flags    = (ushort)ReadSize(2);
     Sequence = (ushort)ReadSize(2);
     Name     = ReadSize(HeapSizes.String);
 }
예제 #2
0
 public MethodSemantics(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Semantics   = (ushort)ReadSize(2);
     Method      = ReadSize(IndexSizes[Index.MethodDef]);
     Association = ReadSize(IndexSizes[Index.HasSemantics]);
 }
예제 #3
0
 public MemberRef(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Class     = ReadSize(IndexSizes[Index.MemberRefParent]);
     Name      = ReadSize(HeapSizes.String);
     Signature = ReadSize(HeapSizes.Blob);
 }
예제 #4
0
파일: TypeRef.cs 프로젝트: yoshiask/PeNet
 public TypeRef(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     ResolutionScope = ReadSize(IndexSizes[Index.ResolutionScope]);
     TypeName        = ReadSize(HeapSizes.String);
     TypeNamespace   = ReadSize(HeapSizes.String);
 }
예제 #5
0
파일: Event.cs 프로젝트: xclemence/PeNet
 public Event(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     EventFlags = (ushort)ReadSize(2);
     Name       = ReadSize(HeapSizes.String);
     EventType  = ReadSize(IndexSizes[Index.TypeDefOrRef]);
 }
예제 #6
0
파일: Field.cs 프로젝트: xclemence/PeNet
 public Field(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Flags     = (ushort)ReadSize(2);
     Name      = ReadSize(HeapSizes.String);
     Signature = ReadSize(HeapSizes.Blob);
 }
예제 #7
0
 public AssemblyOS(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     OSPlatformID   = ReadSize(4);
     OSMajorVersion = ReadSize(4);
     OSMinorVersion = ReadSize(4);
 }
예제 #8
0
 public ClassLayout(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     PackingSize = (ushort)ReadSize(2);
     ClassSize   = ReadSize(4);
     Parent      = ReadSize(IndexSizes[Index.TypeDef]);
 }
예제 #9
0
 public Param(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Flags    = (ushort)ReadSize(2);
     Sequence = (ushort)ReadSize(2);
     Name     = ReadSize(HeapSizes.String);
 }
예제 #10
0
파일: Property.cs 프로젝트: xclemence/PeNet
 public Property(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Flags = (ushort)ReadSize(2);
     Name  = ReadSize(HeapSizes.String);
     Type  = ReadSize(HeapSizes.Blob);
 }
예제 #11
0
파일: File.cs 프로젝트: oathgg/GameSharp
 public File(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Flags     = ReadSize(4);
     Name      = ReadSize(HeapSizes.String);
     HashValue = ReadSize(HeapSizes.Blob);
 }
예제 #12
0
 public MethodImpl(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Class             = ReadSize(IndexSizes[Index.TypeDef]);
     MethodBody        = ReadSize(IndexSizes[Index.MethodDefOrRef]);
     MethodDeclaration = ReadSize(IndexSizes[Index.MethodDefOrRef]);
 }
예제 #13
0
 public DeclSecurity(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Action        = (ushort)ReadSize(2);
     Parent        = ReadSize(IndexSizes[Index.HasDeclSecurity]);
     PermissionSet = ReadSize(HeapSizes.Blob);
 }
예제 #14
0
 public MethodImpl(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Class             = ReadSize(IndexSizes[Index.TypeDef]);
     MethodBody        = ReadSize(IndexSizes[Index.MethodDefOrRef]);
     MethodDeclaration = ReadSize(IndexSizes[Index.MethodDefOrRef]);
 }
예제 #15
0
 public AbstractTable(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset)
 {
     HeapSizes     = heapSizes;
     IndexSizes    = indexSizes;
     CurrentOffset = Offset;
 }
예제 #16
0
 public ClassLayout(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     PackingSize = (ushort)ReadSize(2);
     ClassSize   = ReadSize(4);
     Parent      = ReadSize(IndexSizes[Index.TypeDef]);
 }
예제 #17
0
파일: Property.cs 프로젝트: yoshiask/PeNet
 public Property(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Flags = (ushort)ReadSize(2);
     Name  = ReadSize(HeapSizes.String);
     Type  = ReadSize(HeapSizes.Blob);
 }
예제 #18
0
 public MemberRef(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Class     = ReadSize(IndexSizes[Index.MemberRefParent]);
     Name      = ReadSize(HeapSizes.String);
     Signature = ReadSize(HeapSizes.Blob);
 }
예제 #19
0
 public Field(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Flags     = (ushort)ReadSize(2);
     Name      = ReadSize(HeapSizes.String);
     Signature = ReadSize(HeapSizes.Blob);
 }
예제 #20
0
파일: File.cs 프로젝트: yoshiask/PeNet
 public File(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Flags     = ReadSize(4);
     Name      = ReadSize(HeapSizes.String);
     HashValue = ReadSize(HeapSizes.Blob);
 }
예제 #21
0
 public DeclSecurity(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Action        = (ushort)ReadSize(2);
     Parent        = ReadSize(IndexSizes[Index.HasDeclSecurity]);
     PermissionSet = ReadSize(HeapSizes.Blob);
 }
예제 #22
0
 public CustomAttribute(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Parent = ReadSize(IndexSizes[Index.HasCustomAttribute]);
     Type   = ReadSize(IndexSizes[Index.CustomAttributeType]);
     Value  = ReadSize(HeapSizes.Blob);
 }
예제 #23
0
 public Event(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     EventFlags = (ushort)ReadSize(2);
     Name       = ReadSize(HeapSizes.String);
     EventType  = ReadSize(IndexSizes[Index.TypeDefOrRef]);
 }
예제 #24
0
 public AssemblyOS(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     OSPlatformID   = ReadSize(4);
     OSMajorVersion = ReadSize(4);
     OSMinorVersion = ReadSize(4);
 }
예제 #25
0
 public MethodSemantics(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Semantics   = (ushort)ReadSize(2);
     Method      = ReadSize(IndexSizes[Index.MethodDef]);
     Association = ReadSize(IndexSizes[Index.HasSemantics]);
 }
예제 #26
0
파일: TypeRef.cs 프로젝트: xclemence/PeNet
 public TypeRef(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     ResolutionScope = ReadSize(IndexSizes[Index.ResolutionScope]);
     TypeName        = ReadSize(HeapSizes.String);
     TypeNamespace   = ReadSize(HeapSizes.String);
 }
예제 #27
0
 public AbstractTable(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset)
 {
     HeapSizes     = heapSizes;
     IndexSizes    = indexSizes;
     CurrentOffset = Offset;
 }
예제 #28
0
 public CustomAttribute(IRawFile peFile, long offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(peFile, offset, heapSizes, indexSizes)
 {
     Parent = ReadSize(IndexSizes[Index.HasCustomAttribute]);
     Type   = ReadSize(IndexSizes[Index.CustomAttributeType]);
     Value  = ReadSize(HeapSizes.Blob);
 }
예제 #29
0
파일: ImplMap.cs 프로젝트: oathgg/GameSharp
 public ImplMap(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     MappingFlags    = (ushort)ReadSize(2);
     MemberForwarded = ReadSize(IndexSizes[Index.MemberForwarded]);
     ImportName      = ReadSize(HeapSizes.String);
     ImportScope     = ReadSize(IndexSizes[Index.ModuleRef]);
 }
예제 #30
0
 public ManifestResource(byte[] buff, uint offset, HeapSizes heapSizes, IndexSize indexSizes)
     : base(buff, offset, heapSizes, indexSizes)
 {
     Offset         = ReadSize(4);
     Flags          = ReadSize(4);
     Name           = ReadSize(HeapSizes.String);
     Implementation = ReadSize(IndexSizes[Index.Implementation]);
 }
예제 #31
0
 /// <summary>
 /// Reads an index with the specified index size of the stream.
 /// </summary>
 /// <param name="reader">The reader to use for reading the data.</param>
 /// <param name="size">The size of the index.</param>
 /// <returns>The index.</returns>
 public static uint ReadIndex(this IBinaryStreamReader reader, IndexSize size)
 {
     switch (size)
     {
         case IndexSize.Short:
             return reader.ReadUInt16();
         case IndexSize.Long:
             return reader.ReadUInt32();
         default:
             throw new ArgumentOutOfRangeException("size");
     }
 }
예제 #32
0
 /// <summary>
 /// Writes an index with the specified size to the stream.
 /// </summary>
 /// <param name="writer">The writer to use.</param>
 /// <param name="indexSize">The size of the index.</param>
 /// <param name="value">The value to write.</param>
 public static void WriteIndex(this IBinaryStreamWriter writer, IndexSize indexSize, uint value)
 {
     if (indexSize == IndexSize.Short)
         writer.WriteUInt16((ushort)value);
     else
         writer.WriteUInt32(value);
 }