public static CertificateTable Load(PEImage image)
        {
            if (image == null)
            {
                return(null);
            }

            var dd = image.Directories[DataDirectories.CertificateTable];

            if (dd.IsNull)
            {
                return(null);
            }

            var table = new CertificateTable();

            using (var accessor = image.OpenImage((long)dd.RVA))
            {
                long endOffset = accessor.Position + dd.Size;
                while (accessor.Position < endOffset)
                {
                    var entry = CertificateEntry.Load(accessor);
                    entry._parent = table;
                    table._list.Add(entry);

                    accessor.Align(8);
                }
            }

            return(table);
        }
        public CertificateTable Clone()
        {
            CertificateTable copy = new CertificateTable();

            CopyTo(copy);

            return(copy);
        }
 protected void CopyTo(CertificateTable copy)
 {
     foreach (var childNode in _list)
     {
         var copyChildNode = childNode.Clone();
         copy._list.Add(copyChildNode);
         copyChildNode._parent = this;
     }
 }