ExpQueryNumaProximityNode

INT64 __fastcall ExpQueryNumaProximityNode(
        VOID *SystemInformation,
        UINT64 SystemInformationLength,
        UINT64 *ReturnedLength){
  int v5; 
  __int64 v6; 
  unsigned __int16 v7; 
  unsigned __int16 v9; 
  UINT64 *v10; 
  v10 = ReturnedLength;
  if( (unsigned int)SystemInformationLength >= 8 )
  {
    v6 = *(unsigned int *)SystemInformation;
    v5 = 0;
    v9 = 0;
    if( PnpQueryProximityNode )
    {
      v5 = PnpQueryProximityNode(v6, &v9, ReturnedLength, 0i64);
      if( v5 >= 0 )
      {
        v7 = 0;
        if( KeNumberNodes )
        {
          while( *(_WORD *)(*((_QWORD *)&KeNodeBlock + v7) + 146i64) != v9 )
          {
            if( ++v7 >= (unsigned __int16)KeNumberNodes )
              goto LABEL_10;
          }
          v9 = v7;
        }
LABEL_10:
        if( v7 >= (unsigned __int16)KeNumberNodes )
          v5 = -1073741595;
      }
    }
    if( v5 >= 0 )
      *((_WORD *)SystemInformation + 2) = v9;
  }
  else
  {
    v5 = -1073741820;
  }
  if( ReturnedLength )
    *(_DWORD *)ReturnedLength = 8;
  return(unsigned int)v5;
}

Referenced by:

ExpQuerySystemInformation