def METHOD_NAME(self):
    for dir in self.directories:
        if dir.stream_type == 'MD_MISC_INFO_STREAM':
            info = self.Read(MINIDUMP_MISC_INFO_2, dir.location.rva)
            if info.Flags1 & MINIDUMP_MISC1_PROCESS_ID != 0:
                return info.ProcessId
    return -1