WmipAddProviderIdToPIList

__int64 __fastcall WmipAddProviderIdToPIList(
        const void **a1,
        _DWORD *a2,
        unsigned int *a3,
        void *a4,
        volatile signed __int64 *a5){
  __int64 v5; 
  int v6; 
  __int64 v7; 
  UINT8 *v8; 
  volatile signed __int64 *v9; 
  unsigned int v11; 
  __int64 v12; 
  UINT8 *PoolWithTag; 
  UINT8 *v14; 
  volatile signed __int64 **v15; 
  _DWORD *v17; 
  v17 = a2;
  v5 = (unsigned int)*a2;
  v6 = 0;
  v7 = *a3;
  v8 = (UINT8 *)*a1;
  v9 = a5;
  if( (_DWORD)v5 != (_DWORD)v7 )
    goto LABEL_2;
  v11 = 2 * v7;
  v12 = *a3;
  if( (unsigned __int64)(2 * v7) > 0xFFFFFFFF )
  {
    v11 = -1;
    v6 = -1073741675;
    PoolWithTag = 0i64;
  }
  else
  {
    PoolWithTag = (UINT8 *)ExAllocatePoolWithTag(PagedPool, 8i64 * v11, 0x70696D57ui64);
  }
  v14 = v8;
  if( PoolWithTag )
  {
    memmove(PoolWithTag, v8, 8 * v7);
    v8 = PoolWithTag;
    *a3 = v11;
  }
  else
  {
    if( (_DWORD)v7 )
    {
      v15 = (volatile signed __int64 **)v8;
      do
      {
        WmipUnreferenceEntry((__int64)&WmipISChunkInfo, *v15++);
        --v12;
      }
      while( v12 );
    }
    WmipUnreferenceEntry((__int64)&WmipISChunkInfo, a5);
    PoolWithTag = 0i64;
    v6 = -1073741670;
  }
  *a1 = PoolWithTag;
  if( v14 != a4 )
    ExFreePoolWithTag(v14, 0);
  if( v6 >= 0 )
  {
    v9 = a5;
    a2 = v17;
LABEL_2:
    *(_QWORD *)&v8[8 * v5] = v9;
    *a2 = v5 + 1;
  }
  return(unsigned int)v6;
}

Referenced by:

WmipPrepareForWnodeAD
WmipPrepareWnodeSI