'Extracts signedData blob from PECOFF binary and parses first layer.'

def _CollectSignedData(self, (start, length)):

    self.file.seek(start, os.SEEK_SET)
    buf = self.file.read(length)
    signed_data = []
    while (len(buf) >= 8):
        (dw_length, w_revision, w_cert_type) = struct.unpack('<IHH', buf[:8])
        if (dw_length < 8):
            return signed_data
        b_cert = buf[8:dw_length]
        buf = buf[((dw_length + 7) & 2147483640):]
        signed_data.append((w_revision, w_cert_type, b_cert))
    return signed_data
