KeAndGroupAffinityEx

UINT64 __stdcall KeAndGroupAffinityEx(_KAFFINITY_EX *Affinity, _GROUP_AFFINITY *GroupAffinity, _GROUP_AFFINITY *Result){
  unsigned int v3; 
  __int64 Group; 
  unsigned __int64 v5; 
  char v7; 
  v3 = 0;
  if( Result )
  {
    *(_DWORD *)Result->Reserved = 0;
    Result->Reserved[2] = 0;
    Result->Group = GroupAffinity->Group;
  }
  else
  {
    Result = (_GROUP_AFFINITY *)&v7;
  }
  Group = GroupAffinity->Group;
  if( Affinity->Count <= (unsigned __int16)Group )
    v5 = 0i64;
  else
    v5 = GroupAffinity->Mask & Affinity->Bitmap[Group];
  Result->Mask = v5;
  LOBYTE(v3) = v5 != 0;
  return v3;
}

Referenced by:

HalRequestSoftwareInterrupt
HalSendNMI
HalpInterruptSendIpi
KeQueryLogicalProcessorRelationship
PnpSetDeviceAffinityThread
PpmEventDomainPerfStateChange
PpmEventTraceProcessorPerformanceDomainRundown