WmipEnableCollectOrEvent

NTSTATUS __stdcall WmipEnableCollectOrEvent(tagGUIDENTRY *GuidEntry, UINT64 Ioctl, UINT8 *RequestSent){
  int v5; 
  NTSTATUS v6; 
  UINT8 v7; 
  tagGUIDENTRY *i; 
  tagGUIDENTRY v9; 

  *RequestSent = 0;
  v5 = Ioctl - 2244924;
  if( !v5 )
  {
    v6 = 0;
    v7 = 0;
    KeWaitForSingleObject((UINT64)&ExBootDevicesRemovedEvent + 3072, 0, 0, 0, 0i64);
    for( i = (tagGUIDENTRY *)*((_QWORD *)GuidEntry + 7); i != GuidEntry + 14; i = *(tagGUIDENTRY **)i )
    {
      v9 = i[4];
      if( (v9 & 0x1000) == 0 && ((v9 & 0x8000) == 0 || !v6) && (v6 || (v9 & 4) != 0) )
        v6 = 1;
    }
    KeReleaseMutex((_KMUTANT *)((char *)&ExBootDevicesRemovedEvent + 3072), 0);
    if( !v6 )
      return v6;
LABEL_14:
    KeWaitForSingleObject((UINT64)&ExBootDevicesRemovedEvent + 3072, 0, 0, 0, 0i64);
    v6 = WmipSendEnableRequest(GuidEntry, v7);
    KeReleaseMutex((_KMUTANT *)((char *)&ExBootDevicesRemovedEvent + 3072), 0);
    if( v6 >= 0 )
      *RequestSent = 1;
    return v6;
  }
  if( v5 == 4 )
  {
    v7 = 1;
    goto LABEL_14;
  }
  return -1073741649;
}

Referenced by:

WmipOpenBlock