IoGetIoRateControl

__int64 __fastcall IoGetIoRateControl(
        unsigned __int64 a1,
        unsigned __int64 a2,
        __int64 a3,
        unsigned __int64 *a4,
        __int64 *a5,
        __int64 a6,
        _QWORD *a7,
        _DWORD *a8){
  UINT8 v9; 
  unsigned int v10; 
  __int64 v12; 
  __int64 *v13; 
  signed __int64 v14; 
  __int64 v15; 
  struct _EX_RUNDOWN_REF *v16; 
  _QWORD *v17; 
  _QWORD *i; 
  __int64 v19; 
  PVOID *v20; 
  __int64 v22; 
  __int128 v23; 
  PVOID OpaqueContext; 
  PVOID OwnerHandle; 
  UINT64 Size[2]; 
  __int128 v27; 
  __int128 v28; 
  __int128 v29; 
  __int128 v30; 
  OwnerHandle = 0i64;
  OpaqueContext = 0i64;
  v9 = a2;
  v10 = 0;
  *a7 = 0i64;
  *(_OWORD *)Size = 0i64;
  v29 = 0i64;
  v30 = 0i64;
  v27 = 0i64;
  v28 = 0i64;
  if( IopAcquireReferencesFromIoAttributionHandle((PVOID)a1, &OpaqueContext, &OwnerHandle) < 0 )
  {
LABEL_12:
    v16 = (struct _EX_RUNDOWN_REF *)OpaqueContext;
    goto LABEL_13;
  }
  PsIoRateControlReference(OwnerHandle, v9, (UINT16)a4, Size, (PVOID *)a5);
  v12 = a6 + 16;
  v13 = (__int64 *)Size;
  v14 = (char *)a4 - (char *)Size;
  v15 = 2i64;
  do
  {
    if( *(__int64 *)((char *)v13 + v14) )
    {
      IoDiskIoAttributionQuery(*v13, &v29, &v27);
      v22 = *((_QWORD *)&v28 + 1);
      v23 = v30;
      *(_OWORD *)(v12 - 16) = v29;
      *(_OWORD *)v12 = v23;
      *(_QWORD *)(v12 + 8) += v22;
      *(_QWORD *)v12 += v28;
      *(_QWORD *)(v12 - 16) += v27;
      *(_QWORD *)(v12 - 8) += *((_QWORD *)&v27 + 1);
      ++v10;
    }
    ++v13;
    v12 += 32i64;
    --v15;
  }
  while( v15 );
  v16 = (struct _EX_RUNDOWN_REF *)OpaqueContext;
  v17 = OpaqueContext;
  for( i = (_QWORD *)*((_QWORD *)OpaqueContext + 22); i; i = (_QWORD *)i[22] )
    v17 = i;
  *a7 = v17[3];
  if( a8 )
  {
    *a8 = 0;
    v19 = *(_QWORD *)(a3 + 544);
    if( *(_QWORD *)(v19 + 1296) )
      v20 = *(PVOID **)(*(_QWORD *)(v19 + 1296) + 1568i64);
    else
      v20 = 0i64;
    if( v20 && (v20 == OwnerHandle || v20[169] == OwnerHandle) )
      *a8 |= 1u;
    goto LABEL_12;
  }
LABEL_13:
  if( v16 )
  {
    ExReleaseRundownProtection(v16 + 21);
    IoDiskIoAttributionDereference(v16);
  }
  return v10;
}

Referenced by:

No references.