You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: pe.go
    path of file: ./repos/sliver/vendor/github.com/dblohm7/wingoes/pe
    
    the code of the file until where you have to start completion: // Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

// Package pe provides facilities for extracting information from PE binaries.
// It only supports the same CPU architectures as the rest of wingoes.
package pe

import (
	"bufio"
	"bytes"
	dpe "debug/pe"
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"math/bits"
	"os"
	"reflect"
	"strings"
	"unsafe"

	"github.com/dblohm7/wingoes"
	"golang.org/x/exp/constraints"
)

// The following constants are from the PE spec
const (
	maxNumSections                 = 96
	mzSignature                    = uint16(0x5A4D) // little-endian
	offsetIMAGE_DOS_HEADERe_lfanew = 0x3C
	peSignature                    = uint32(0x00004550) // little-endian
    
func (nfo *PEHeaders) extractAuthenticode(dde DataDirectoryEntry) (any, error) {
	if _, ok := nfo.r.(*peFile); !ok {
		// Authenticode; only available in file, not loaded at runtime.
		return nil, ErrUnavailableInModule
	}

	var result []AuthenticodeCert
	// The VirtualAddress is a file offset.
	sr := io.NewSectionReader(nfo.r, int64(dde.VirtualAddress), int64(dde.Size))
	var curOffset int64
	szEntry := unsafe.Sizeof(_WIN_CERTIFICATE_HEADER{})

	for {
		var entry AuthenticodeCert
		if err := binaryRead(sr, &entry.header); err != nil {
			if err == io.EOF {
				break
			}
			return nil, err
		}
		curOffset += int64(szEntry)

		if uintptr(entry.header.Length) < szEntry {
			return nil, ErrInvalidBinary
		}

		entry.data = make([]byte, uintptr(entry.header.Length)-szEntry)
		n, err := readFull(sr, entry.data)
		if err != nil {
			return nil, err
		}
		curOffset += int64(n)

		result = append(result, entry)

		curOffset = alignUp(curOffset, 8)
		if _, err := sr.Seek(curOffset, io.SeekStart); err != nil {
			if err == io.EOF {
				break
			}
			return nil, err
		}
	}

	return result, nil
}