PiSwInterfaceCreate

INT64 __fastcall PiSwInterfaceCreate(WCHAR *InString, DEVPROPERTY *InProperties, UINT64 InPropertyCount, CHAR **a4){
  unsigned int v5; 
  CHAR *PoolWithTag; 
  int PWSTR; 
  UINT64 *v10; 
  v5 = InPropertyCount;
  PoolWithTag = (CHAR *)ExAllocatePoolWithTag(PagedPool, 0x28ui64, 0x57706E50ui64);
  *a4 = PoolWithTag;
  if( PoolWithTag )
  {
    *(_OWORD *)PoolWithTag = 0i64;
    *((_OWORD *)PoolWithTag + 1) = 0i64;
    *((_QWORD *)PoolWithTag + 4) = 0i64;
    PWSTR = PnpAllocatePWSTR(InString, 0x7FFFFFFFui64, 0x57706E50ui64, (WCHAR **)*a4 + 2);
    if( PWSTR >= 0 )
    {
      PWSTR = PnpCopyDevPropertyArray(v5, InProperties, v10, (DEVPROPERTY **)*a4 + 4);
      if( PWSTR >= 0 )
        return(unsigned int)PWSTR;
    }
  }
  else
  {
    PWSTR = -1073741670;
  }
  if( *a4 )
  {
    PiSwInterfaceFree(*a4);
    *a4 = 0i64;
  }
  return(unsigned int)PWSTR;
}

Referenced by:

PiSwCompleteCreate
PiSwIrpInterfaceRegister