HalpRemoveProfileSourceFromList

char __fastcall HalpRemoveProfileSourceFromList(int *a1, _QWORD **a2, _QWORD *a3){
  _QWORD *v3; 
  __int64 v4; 
  __int64 v5; 
  __int64 v6; 
  _QWORD *v7; 
  char result; 
  __int64 v9; 

  *a3 = 0i64;
  v9 = 0i64;
  if( (int)HalpGetProfileDescriptor(*a1, a2, &v9) < 0 )
    return 0;
  v5 = v9;
  *v3 = v9;
  if( KeSubtractAffinityEx((WORD *)(v5 + 32), (INT8 *)(v4 + 8), (INT8 *)(v5 + 32)) )
    return 0;
  v6 = *(_QWORD *)(v5 + 8);
  if( *(_QWORD *)(v6 + 8) != v5 + 8 || (v7 = *(_QWORD **)(v5 + 16), *v7 != v5 + 8) )
    __fastfail(3u);
  *v7 = v6;
  result = 1;
  *(_QWORD *)(v6 + 8) = v7;
  return result;
}

Referenced by:

Amd64RemoveProfileSource
EmonRemoveProfileSource