HalpDmaLinkContiguousTranslations

_HALP_DMA_TRANSLATION_ENTRY *__stdcall HalpDmaLinkContiguousTranslations(
        _HALP_DMA_ADAPTER_OBJECT *Adapter,
        UINT64 BitmapIndex,
        UINT64 PageCount){
  unsigned int v3; 
  _HALP_DMA_TRANSLATION_ENTRY *v4; 
  _QWORD *v5; 
  _HALP_DMA_TRANSLATION_ENTRY *v6; 
  __int64 v7; 
  unsigned int v8; 
  __int64 v9; 
  __int64 v10; 
  __int64 v11; 

  v3 = PageCount;
  v4 = HalpDmaIndexToTranslationEntry(Adapter, (_HALP_DMA_TRANSLATION_BUFFER **)BitmapIndex);
  v5 = 0i64;
  v6 = v4;
  v7 = 0i64;
  v8 = MEMORY[8];
  v9 = ((__int64)v4 - MEMORY[0x10]) / 72;
  v10 = MEMORY[0x10] + 72i64 * (unsigned int)v9;
  if( v3 )
  {
    v11 = v3;
    do
    {
      if( (unsigned int)v9 >= v8 )
      {
        v5 = (_QWORD *)*v5;
        LODWORD(v9) = 0;
        v10 = v5[2];
      }
      if( v7 )
        *(_QWORD *)(v7 + 8) = v10;
      v7 = v10;
      LODWORD(v9) = v9 + 1;
      v10 += 72i64;
      --v11;
    }
    while( v11 );
  }
  return v6;
}

Referenced by:

HalpDmaAllocateContiguousPagesFromContiguousPoolV2
HalpDmaAllocateContiguousPagesFromContiguousPoolV3