KeAndGroupAffinityEx

VOID __fastcall KeAndGroupAffinityEx(_KAFFINITY_EX *Affinity, _GROUP_AFFINITY *GroupAffinity, _GROUP_AFFINITY *Result){
  __int64 Group; 
  unsigned __int64 v4; 
  char v5; 

  if( Result )
  {
    *(_DWORD *)Result->Reserved = 0;
    Result->Reserved[2] = 0;
    Result->Group = GroupAffinity->Group;
  }
  else
  {
    Result = (_GROUP_AFFINITY *)&v5;
  }
  Group = GroupAffinity->Group;
  if( Affinity->Count <= (unsigned __int16)Group )
    v4 = 0i64;
  else
    v4 = GroupAffinity->Mask & Affinity->Bitmap[Group];
  Result->Mask = v4;
}

Referenced by:

HalRequestSoftwareInterrupt
HalSendNMI
HalpInterruptSendIpi
KeQueryLogicalProcessorRelationship
PnpSetDeviceAffinityThread
PpmEventDomainPerfStateChange
PpmEventTraceProcessorPerformanceDomainRundown