Exemplo n.º 1
0
 public bool IsValid()
 {
     if (_headerReader.Length > sizeof(ushort))
     {
         try
         {
             if (HasValidDosSignature.Check())
             {
                 if (_headerReader.Length > PESignatureOffsetLocation)
                 {
                     return(HasValidPESignature.Check());
                 }
             }
         }
         catch (Exception ex) when(ex is InvalidVirtualAddressException || ex is BadInputFormatException)
         {
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 private ImageFileHeader ReadFileHeader()
 {
     HasValidPESignature.CheckThrowing();
     return(_headerReader.Read <ImageFileHeader>(PEHeaderOffset + 0x4));
 }
Exemplo n.º 3
0
 private CoffFileHeader ReadCoffFileHeader()
 {
     HasValidPESignature.CheckThrowing();
     return(_peHeaderReader.Read <CoffFileHeader>(PEHeaderOffset + 0x4));
 }