MiSearchChannelTable

NTSTATUS __stdcall MiSearchChannelTable(PVOID BugCheckParameter2){
  int v1; 
  UINT8 *v3; 
  int v4; 
  int v5; 
  UINT8 *v6; 
  v1 = dword_140C4DBD4;
  if( dword_140C4DBD0 > (unsigned int)dword_140C4DBD4
    || (v3 = &qword_140C4DC10[16 * dword_140C4DBD0], (unsigned __int64)BugCheckParameter2 < *(_QWORD *)v3)
    || dword_140C4DBD0 != dword_140C4DBD4 && (unsigned __int64)BugCheckParameter2 >= *((_QWORD *)v3 + 2) )
  {
    v4 = 0;
    if( dword_140C4DBD4 < 0 )
LABEL_13:
      KeBugCheckEx(0x1Au, 0x6202ui64, (ULONG_PTR)BugCheckParameter2, 0i64, 0i64);
    while( 1 )
    {
      v5 = (v4 + v1) >> 1;
      v6 = &qword_140C4DC10[16 * v5];
      if( (unsigned __int64)BugCheckParameter2 >= *(_QWORD *)v6 )
      {
        if( v5 == dword_140C4DBD4 || (unsigned __int64)BugCheckParameter2 < *((_QWORD *)v6 + 2) )
        {
          dword_140C4DBD0 = (v4 + v1) >> 1;
          LODWORD(v3) = (_DWORD)qword_140C4DC10 + 16 * v5;
          return(int)v3;
        }
        v4 = v5 + 1;
      }
      else
      {
        if( !v5 )
          KeBugCheckEx(0x1Au, 0x6200ui64, (ULONG_PTR)BugCheckParameter2, (ULONG_PTR)v6, 0i64);
        v1 = v5 - 1;
      }
      if( v1 < v4 )
        goto LABEL_13;
    }
  }
  return(int)v3;
}

Referenced by:

MiPageToChannel
MiRestrictRangeToNode
MxPageAlwaysHot