PiSwQueuedCreateInfoCreate

__int64 __fastcall PiSwQueuedCreateInfoCreate(PVOID **a1, __int64 a2){
  PVOID *PoolWithTag; 
  int PWSTR; 
  WCHAR **v6; 
  UINT64 *v7; 
  UINT8 *v8; 
  PoolWithTag = (PVOID *)ExAllocatePoolWithTag(PagedPool, 0x58ui64, 0x57706E50ui64);
  *a1 = PoolWithTag;
  if( !PoolWithTag )
  {
    PWSTR = -1073741670;
    goto LABEL_10;
  }
  memset((INT64)PoolWithTag, 0i64);
  PWSTR = PnpAllocatePWSTR(*(WCHAR **)(a2 + 8), 0xC8ui64, 0x57706E50ui64, (WCHAR **)*a1);
  if( PWSTR >= 0 )
  {
    PWSTR = PiSwPnPInfoInit((INT64)(*a1 + 1), a2, v6);
    if( PWSTR >= 0 )
    {
      if( *(_QWORD *)(a2 + 96) )
      {
        *((_DWORD *)*a1 + 16) = *(_DWORD *)(a2 + 88);
        (*a1)[7] = ExAllocatePoolWithTag(PagedPool, *(unsigned int *)(a2 + 88), 0x57706E50ui64);
        v8 = (UINT8 *)(*a1)[7];
        if( !v8 )
        {
          PWSTR = -1073741670;
          goto LABEL_11;
        }
        memmove(v8, *(UINT8 **)(a2 + 96), *(unsigned int *)(a2 + 88));
      }
      PWSTR = PnpCopyDevPropertyArray(
                *(unsigned int *)(a2 + 104),
                *(DEVPROPERTY **)(a2 + 112),
                v7,
                (DEVPROPERTY **)*a1 + 10);
LABEL_10:
      if( PWSTR >= 0 )
        return(unsigned int)PWSTR;
    }
  }
LABEL_11:
  if( *a1 )
  {
    PiSwQueuedCreateInfoFree(*a1);
    *a1 = 0i64;
  }
  return(unsigned int)PWSTR;
}

Referenced by:

PiSwIrpStartCreateWorker