ExpQueryLegacyDriverInformation

INT64 __fastcall ExpQueryLegacyDriverInformation(INT64 a1, UINT64 *a2){
  INT64 result; 
  WCHAR v5; 
  unsigned int v6; 
  UINT64 Length; 
  unsigned int v8; 
  PCWSTR SourceString; 
  struct _UNICODE_STRING DestinationString; 
  int v11; 
  unsigned int v12; 
  v11 = 0;
  SourceString = 0i64;
  DestinationString = 0i64;
  result = IoGetLegacyVetoList((WCHAR **)&SourceString, (_PNP_VETO_TYPE *)&v11);
  v6 = result;
  if( (int)result >= 0 )
  {
    RtlInitUnicodeString(&DestinationString, SourceString, v5);
    Length = DestinationString.Length;
    v8 = DestinationString.Length + 24;
    v12 = v8;
    if( v8 <= *(_DWORD *)a2 )
    {
      *(_DWORD *)a1 = v11;
      *(_WORD *)(a1 + 8) = Length;
      *(_QWORD *)(a1 + 16) = a1 + 24;
      memmove((UINT8 *)(a1 + 24), (UINT8 *)DestinationString.Buffer, Length);
    }
    else
    {
      v6 = -2147483643;
    }
    if( SourceString )
      ExFreePoolWithTag((PVOID)SourceString, 0);
    *(_DWORD *)a2 = v8;
    return v6;
  }
  return result;
}

Referenced by:

ExpQuerySystemInformation