PiControlQueryConflictList

INT64 __fastcall PiControlQueryConflictList(INT64 a1, INT64 a2){
  INT8 v2; 
  PVOID *v3; 
  bool v4; 
  INT8 v5; 
  _DWORD *v7; 
  UINT64 v8; 
  _DWORD *v9; 
  _DEVICE_OBJECT *v10; 
  int UserModeCallersCopy; 
  _DEVICE_OBJECT *v12; 
  INT64 v13; 
  _DWORD *v14; 
  int v15; 
  UINT64 CallerMode; 
  UINT64 AllocateDestination; 
  UINT64 AllocateDestinationa; 
  UINT64 AllocateDestinationb; 
  VOID *Destination; 
  INT64 a1a[2]; 
  _DWORD *a4; 
  v3 = (PVOID *)(a2 + 32);
  v4 = *(_QWORD *)(a2 + 32) == 0i64;
  v5 = v2;
  *(_OWORD *)a1a = 0i64;
  if( v4 || *(_DWORD *)(a2 + 40) < 0x20u )
    return 3221225507i64;
  v7 = *(_DWORD **)(a2 + 16);
  if( !v7 )
    return 3221225485i64;
  v8 = *(unsigned int *)(a2 + 24);
  if( (unsigned int)v8 < 0x28 )
    return 3221225485i64;
  if( *v7 != 1 )
    return 3221225485i64;
  if( v7[4] != 1 )
    return 3221225485i64;
  WORD1(a1a[0]) = *(_WORD *)a2;
  LOWORD(a1a[0]) = WORD1(a1a[0]);
  if( (unsigned __int16)(WORD1(a1a[0]) - 1) > 0x18Fu || (a1a[0] & 0x10000) != 0 )
    return 3221225485i64;
  Destination = 0i64;
  LODWORD(AllocateDestination) = 1;
  v9 = 0i64;
  v10 = 0i64;
  a4 = 0i64;
  a1a[1] = 0i64;
  UserModeCallersCopy = PiControlMakeUserModeCallersCopy(&Destination, v7, v8, 1ui64, v2, AllocateDestination);
  if( UserModeCallersCopy >= 0 )
  {
    UserModeCallersCopy = PiControlAllocateBufferForUserModeCaller((PVOID *)&a4, *(unsigned int *)(a2 + 40), v5, *v3);
    if( UserModeCallersCopy < 0
      || (LODWORD(AllocateDestinationa) = 1,
          UserModeCallersCopy = PiControlMakeUserModeCallersCopy(
                                  (VOID **)&a1a[1],
                                  *(VOID **)(a2 + 8),
                                  *(unsigned __int16 *)a2,
                                  2ui64,
                                  v5,
                                  AllocateDestinationa),
          UserModeCallersCopy < 0) )
    {
      v9 = a4;
    }
    else
    {
      UserModeCallersCopy = -1073741810;
      PpDevNodeLockTree(1);
      v12 = (_DEVICE_OBJECT *)PnpDeviceObjectFromDeviceInstanceWithTag((INT64)a1a, 0x43706E50ui64);
      v9 = a4;
      v10 = v12;
      if( v12 )
      {
        v14 = *(_DWORD **)(*((_QWORD *)v12 + 39) + 40i64);
        if( v14 )
        {
          if( v14 != IopRootDeviceNode && (unsigned int)(v14[75] - 787) > 1 )
          {
            LODWORD(CallerMode) = *(_DWORD *)(a2 + 40);
            LODWORD(AllocateDestinationb) = 0;
            UserModeCallersCopy = IopQueryConflictList(v10, (UINT64)Destination, v13, a4, CallerMode);
            v15 = PiControlMakeUserModeCallersCopy(v3, v9, *(unsigned int *)(a2 + 40), 1ui64, v5, AllocateDestinationb);
            if( v15 < 0 )
              UserModeCallersCopy = v15;
          }
        }
      }
      PpDevNodeUnlockTree(1);
    }
  }
  PiControlFreeUserModeCallersBuffer(v5, Destination);
  PiControlFreeUserModeCallersBuffer(v5, v9);
  PiControlFreeUserModeCallersBuffer(v5, (PVOID)a1a[1]);
  if( v10 )
    ObfDereferenceObjectWithTag(v10, 0x43706E50ui64);
  *(_DWORD *)(a2 + 48) = UserModeCallersCopy;
  return(unsigned int)UserModeCallersCopy;
}

Referenced by:

No references.