예제 #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);
 }
예제 #2
0
 private ImageFileHeader ReadFileHeader()
 {
     HasValidPESignature.CheckThrowing();
     return(_headerReader.Read <ImageFileHeader>(PEHeaderOffset + 0x4));
 }
예제 #3
0
파일: PEFile.cs 프로젝트: runt18/symstore
 private CoffFileHeader ReadCoffFileHeader()
 {
     HasValidPESignature.CheckThrowing();
     return(_peHeaderReader.Read <CoffFileHeader>(PEHeaderOffset + 0x4));
 }