AlpcpAllocateBlob

CHAR *__fastcall AlpcpAllocateBlob(const _BLOB_TYPE *ResourceType, UINT64 PrivateSize, UINT64 LongTerm){
  unsigned __int64 v3; 
  CHAR *result; 
  char v6; 
  CHAR *v7; 
  char v8; 
  v3 = PrivateSize + 48;
  if( (_DWORD)LongTerm || ResourceType->UsualSize < v3 )
  {
    if( ResourceType->UsualSize )
      result = (CHAR *)((__int64(__fastcall *)(__int64, unsigned __int64, _QWORD))AlpcpLookasides[16
                                                                                                 * (unsigned __int64)ResourceType->LookasideIndex
                                                                                                 + 6])(
                         1i64,
                         v3,
                         ResourceType->PoolTag);
    else
      result = (CHAR *)ExAllocatePoolWithTag(PagedPool, v3, ResourceType->PoolTag);
    v6 = 0;
  }
  else
  {
    LODWORD(result) = ExAllocateFromNPagedLookasideList((NPAGED_LOOKASIDE_LIST *)&AlpcpLookasides[16
                                                                                                * (unsigned __int64)ResourceType->LookasideIndex]);
    v6 = 2;
  }
  v7 = result;
  if( result )
  {
    *(_OWORD *)result = 0i64;
    *((_OWORD *)result + 1) = 0i64;
    *((_OWORD *)result + 2) = 0i64;
    result[17] = ResourceType->ResourceId;
    v8 = result[16] & 0xFD;
    *((_QWORD *)v7 + 1) = v7;
    *(_QWORD *)v7 = v7;
    v7[16] = v6 | v8;
    result = v7 + 48;
    *((_QWORD *)v7 + 3) = 1i64;
  }
  return result;
}

Referenced by:

AlpcpAllocateMessage
AlpcpCaptureHandleAttributeInternal
AlpcpCreateClientPort
AlpcpCreateConnectionPort
AlpcpCreateRegion
AlpcpCreateReserve
AlpcpCreateSection
AlpcpCreateSecurityContext
AlpcpCreateView