IopQueryConflictFillString

INT64 __stdcall IopQueryConflictFillString(DEVICE_OBJECT *DeviceObject, WCHAR *Buffer, UINT64 *Length, UINT64 *Flags){
  unsigned int v7; 
  unsigned int v8; 
  int v9; 
  __int64 v10; 
  unsigned __int16 *v11; 
  __int64 v12; 
  _QWORD *v13; 
  UINT64 v14; 
  v7 = 0;
  v8 = 0;
  v9 = 0;
  if( Length )
    v7 = *(_DWORD *)Length;
  if( Flags )
    v9 = *(_DWORD *)Flags;
  if( DeviceObject )
  {
    if( (*((_DWORD *)DeviceObject + 12) & 0x1000) == 0 )
    {
      v10 = *((_QWORD *)DeviceObject + 1);
LABEL_8:
      if( !v10 )
        goto LABEL_20;
      v11 = (unsigned __int16 *)(v10 + 56);
      v9 |= 1u;
      goto LABEL_15;
    }
    v12 = *((_QWORD *)DeviceObject + 39);
    if( !v12 )
      goto LABEL_20;
    v13 = *(_QWORD **)(v12 + 40);
    if( !v13 )
      goto LABEL_20;
    if( v13 == IopRootDeviceNode )
    {
      v9 |= 2u;
    }
    else if( !v13[2] )
    {
      v10 = v13[54];
      goto LABEL_8;
    }
    v11 = (unsigned __int16 *)(v13 + 5);
LABEL_15:
    if( v11 )
    {
      if( Buffer )
      {
        v14 = *v11;
        if( 2 * (unsigned __int64)v7 > v14 )
          memmove((UINT8 *)Buffer, *((UINT8 **)v11 + 1), v14);
      }
      v8 = *v11 >> 1;
    }
  }
LABEL_20:
  if( Buffer && v7 > v8 )
    Buffer[v8] = 0;
  if( Length )
    *(_DWORD *)Length = v8 + 1;
  if( Flags )
    *(_DWORD *)Flags = v9;
  return 0i64;
}

Referenced by:

IopQueryConflictFillConflicts