func()

in pe.go [154:171]


func (f *peFile) sectionStats() ([]Section, error) {
	s := make([]Section, len(f.objFile.Sections))
	for i, sect := range f.objFile.Sections {
		h, sigma, err := streamEntropy(sect.Open())
		if err != nil {
			return nil, err
		}
		s[i] = Section{
			Name:       sect.Name,
			Size:       uint64(sect.Size),
			FileSize:   uint64(sect.Size),
			Entropy:    h,
			VarEntropy: sigma,
			Flags:      sect.Characteristics,
		}
	}
	return s, nil
}