parameters: (self)
return_statement: return nt_header
docstring: Carve out the NT header from this DOS header. This reflects on the
          PE file's Machine type to create a 32- or 64-bit NT header structure.
  
          Returns:
              <_IMAGE_NT_HEADERS> or <_IMAGE_NT_HEADERS64> instance
docstring_summary: Carve out the NT header from this DOS header. This reflects on the
          PE file's Machine type to create a 32- or 64-bit NT header structure.
docstring_tokens: Carve out the NT header from this DOS header . This reflects on the PE file s Machine type to create a 32 - or 64 - bit NT header structure .
function: def get_nt_header(self) -> interfaces.objects.ObjectInterface:
          """Carve out the NT header from this DOS header. This reflects on the
          PE file's Machine type to create a 32- or 64-bit NT header structure.
  
          Returns:
              <_IMAGE_NT_HEADERS> or <_IMAGE_NT_HEADERS64> instance
          """
  
          if self.e_magic != 0x5a4d:
              raise ValueError("e_magic {0:04X} is not a valid DOS signature.".format(self.e_magic))
  
          layer_name = self.vol.layer_name
          symbol_table_name = self.get_symbol_table_name()
  
          nt_header = self._context.object(symbol_table_name + constants.BANG + "_IMAGE_NT_HEADERS",
                                           layer_name = layer_name,
                                           offset = self.vol.offset + self.e_lfanew)
  
          if nt_header.Signature != 0x4550:
              raise ValueError("NT header signature {0:04X} is not a valid".format(nt_header.Signature))
  
          # this checks if we need a PE32+ header
          if nt_header.FileHeader.Machine == 34404:
              nt_header = nt_header.cast("_IMAGE_NT_HEADERS64")
  
          return nt_header
function_tokens: def get_nt_header ( self ) -> interfaces . objects . ObjectInterface : if self . e_magic != 0x5a4d : raise ValueError ( "e_magic {0:04X} is not a valid DOS signature." . format ( self . e_magic ) ) layer_name = self . vol . layer_name symbol_table_name = self . get_symbol_table_name ( ) nt_header = self . _context . object ( symbol_table_name + constants . BANG + "_IMAGE_NT_HEADERS" , layer_name = layer_name , offset = self . vol . offset + self . e_lfanew ) if nt_header . Signature != 0x4550 : raise ValueError ( "NT header signature {0:04X} is not a valid" . format ( nt_header . Signature ) ) # this checks if we need a PE32+ header if nt_header . FileHeader . Machine == 34404 : nt_header = nt_header . cast ( "_IMAGE_NT_HEADERS64" ) return nt_header