HalpPciGetMmConfigPhysicalAddress

NTSTATUS __stdcall HalpPciGetMmConfigPhysicalAddress(INT16 a1, UINT8 a2, UINT8 a3){
  unsigned int v3; 
  UINT8 *v4; 
  __int64 v5; 

  v3 = 0;
  if( *(&CmpDummyThreadEvent + 1480) )
  {
    v4 = (UINT8 *)(*(&CmpDummyThreadEvent + 743) + 54i64);
    while( a1 != *((_WORD *)v4 - 1) || a2 < *v4 || a2 > v4[1] )
    {
      ++v3;
      v4 += 16;
      if( v3 >= *(&CmpDummyThreadEvent + 1480) )
        goto LABEL_7;
    }
    return *(_QWORD *)(v4 - 10) + (((a3 >> 5) + 8 * ((a3 & 0x1F) + 32i64 * a2)) << 12);
  }
  else
  {
LABEL_7:
    LODWORD(v5) = 0;
  }
  return v5;
}

Referenced by:

HalpPciAccessMmConfigSpace