code: def _CollectSignedData(self, extent):
      
      start, length = extent
  
      self.file.seek(start, os.SEEK_SET)
      buf = self.file.read(length)
      signed_data = []
      # This loop ignores trailing cruft, or too-short signedData chunks.
      while len(buf) >= 8:
        dw_length, w_revision, w_cert_type = struct.unpack('<IHH', buf[:8])
        if dw_length < 8:
          # If the entire blob is smaller than its header, bail out.
          return signed_data
        b_cert = buf[8:dw_length]
        buf = buf[(dw_length + 7) & 0x7ffffff8:]
        signed_data.append((w_revision, w_cert_type, b_cert))
      return signed_data
docs: Extracts signedData blob from PECOFF binary and parses first layer.