KiTrackSystemCallExit

UINT64 __fastcall KiTrackSystemCallExit(INT64 a1, UINT64 a2){
  UINT64 SysCallReturnValue; 
  SysCallReturnValue = a2;
  if( a1 && *(_BYTE *)(a1 + 41) )
  {
    _InterlockedAdd(&KiSystemServiceTraceCallbacksActive, 1u);
    if( *(_BYTE *)(a1 + 41) )
      ((void(__fastcall *)(_QWORD, _QWORD, __int64, UINT64 *, int, _QWORD))qword_140CFBBA8)(
        *(_QWORD *)(a1 + 24),
        *(_QWORD *)(a1 + 56),
        1i64,
        &SysCallReturnValue,
        1,
        0i64);
    _InterlockedDecrement(&KiSystemServiceTraceCallbacksActive);
  }
  return SysCallReturnValue;
}

Referenced by:

KiSystemCall64