HalpFreePmcCounterSet
void __fastcall HalpFreePmcCounterSet(__int64 a1){
__int64 v2;
unsigned __int8 CurrentIrql;
__int64 v4;
_QWORD *v5;
unsigned int v6;
__int64 v7;
struct _GROUP_AFFINITY v8;
struct _GROUP_AFFINITY PreviousAffinity;
v2 = *(unsigned int *)(a1 + 16);
v8 = 0i64;
*(_DWORD *)v8.Reserved = 0;
LODWORD(v2) = KiProcessorIndexToNumberMappingTable[v2];
*(_DWORD *)&v8.Group = (unsigned __int16)((unsigned int)v2 >> 6);
v8.Reserved[2] = 0;
v8.Mask = 1i64 << (v2 & 0x3F);
PreviousAffinity = 0i64;
KeSetSystemGroupAffinityThread(&v8, &PreviousAffinity);
CurrentIrql = KeGetCurrentIrql();
__writecr8(0xFui64);
v4 = *(_QWORD *)a1;
v5 = *(_QWORD **)(a1 + 8);
if( *(_QWORD *)(*(_QWORD *)a1 + 8i64) != a1 || *v5 != a1 )
__fastfail(3u);
*v5 = v4;
v6 = 0;
for( *(_QWORD *)(v4 + 8) = v5; v6 < *(_DWORD *)(a1 + 20); ++v6 )
(*((void(__fastcall **)(_QWORD, __int64))HalpProfileInterface[0] + 2))(
*(unsigned int *)(32i64 * v6 + a1 + 24),
32i64 * v6 + a1 + 28);
__writecr8(CurrentIrql);
KeRevertToUserGroupAffinityThread(&PreviousAffinity);
HalpMmAllocCtxFree(v7, a1);
}Referenced by:
No references.