func IsRunningOfficialVersion() bool {
	path, err := os.Executable()
	if err != nil {
		return false
	}
	names, err := extractCertificateNames(path)
	if err != nil {
		return false
	}
	for _, name := range names {
		if name == officialCommonName {
			return true
		}
	}
	return false
}
These are easily by-passable checks, which do not serve security purposes.
DO NOT PLACE SECURITY-SENSITIVE FUNCTIONS IN THIS FILE
package version
import (
	"errors"
	"os"
	"unsafe"
	"golang.org/x/sys/windows"
)
const (
	officialCommonName = "WireGuard LLC"
	evPolicyOid        = "2.23.140.1.3"
	policyExtensionOid = "2.5.29.32"
)