PiSwInterfaceCreate

NTSTATUS __stdcall PiSwInterfaceCreate(
        WCHAR *InterfaceId,
        _DEVPROPERTY *Properties,
        UINT64 PropertyCount,
        VOID **Interface){
  unsigned int v5; 
  VOID **PoolWithTag; 
  NTSTATUS PWSTR; 
  __int64 v10; 

  v5 = PropertyCount;
  PoolWithTag = ExAllocatePoolWithTag(1ui64, 0x28ui64, 1466986064i64);
  *Interface = PoolWithTag;
  if( PoolWithTag )
  {
    *(_OWORD *)PoolWithTag = 0i64;
    *((_OWORD *)PoolWithTag + 1) = 0i64;
    PoolWithTag[4] = 0i64;
    PWSTR = PnpAllocatePWSTR(InterfaceId, 0x7FFFFFFFui64, 0x57706E50u, (PVOID *)*Interface + 2);
    if( PWSTR >= 0 )
    {
      PWSTR = PnpCopyDevPropertyArray(v5, (__int64)Properties, v10, (_DWORD *)*Interface + 8, (__int64)*Interface + 24);
      if( PWSTR >= 0 )
        return PWSTR;
    }
  }
  else
  {
    PWSTR = -1073741670;
  }
  if( *Interface )
  {
    PiSwInterfaceFree((_PI_SWD_INTERFACE *)*Interface);
    *Interface = 0i64;
  }
  return PWSTR;
}

Referenced by:

PiSwCompleteCreate
PiSwIrpInterfaceRegister