func IsSignedEXE(exe io.ReadSeeker) (bool, error) {
	pos, _ := exe.Seek(0, io.SeekCurrent)
	exe.Seek(0, io.SeekStart)
	h, err := readPEHeaders(exe)
	exe.Seek(pos, io.SeekStart)
	if err != nil {
		return false, err
	}
	return len(h.dirs) > pe.IMAGE_DIRECTORY_ENTRY_SECURITY && h.dirs[pe.IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress > 0, nil
}
// IsSignedEXE helps knowing if an exe file is signed before encountering an error with WriteToEXE.
IsSignedEXE helps knowing if an exe file is signed before encountering an error with WriteToEXE.
// IsSignedEXE helps knowing if an exe file is signed before encountering an error with WriteToEXE .
func IsSignedEXE(exe io.ReadSeeker) (bool, error) {
	pos, _ := exe.Seek(0, io.SeekCurrent)
	exe.Seek(0, io.SeekStart)
	h, err := readPEHeaders(exe)
	exe.Seek(pos, io.SeekStart)
	if err != nil {
		return false, err
	}
	return len(h.dirs) > pe.IMAGE_DIRECTORY_ENTRY_SECURITY && h.dirs[pe.IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress > 0, nil
}
func IsSignedEXE ( exe io . ReadSeeker ) ( bool , error ) { pos , _ := exe . Seek ( 0 , io . SeekCurrent ) exe . Seek ( 0 , io . SeekStart ) h , err := readPEHeaders ( exe ) exe . Seek ( pos , io . SeekStart ) if err != nil { return false , err } return len ( h . dirs ) > pe . IMAGE_DIRECTORY_ENTRY_SECURITY && h . dirs [ pe . IMAGE_DIRECTORY_ENTRY_SECURITY ] . VirtualAddress > 0 , nil }
IsSignedEXE helps knowing if an exe file is signed before encountering an error with WriteToEXE.
IsSignedEXE helps knowing if an exe file is signed before encountering an error with WriteToEXE .