PopDirectedDripsDiagNotifySessionStop

VOID __fastcall PopDirectedDripsDiagNotifySessionStop(INT64 a1, INT64 a2, INT64 a3){
  int v3; 
  int v4; 
  int v5; 
  signed __int32 v6; 
  signed __int32 v7; 
  UINT64 v8; 
  INT64 v9; 
  UINT64 v10; 
  UINT64 v11; 
  int v12; 
  int v13; 
  __int64 v14; 
  __int64 v15; 
  UINT64 v16; 
  __int64 v17; 
  __int64 v18; 
  struct _EVENT_DATA_DESCRIPTOR v19; 
  __int64 *v20; 
  int v21; 
  int v22; 
  int *v23; 
  int v24; 
  int v25; 
  int *v26; 
  int v27; 
  int v28; 
  __int64 *v29; 
  int v30; 
  int v31; 
  __int64 *v32; 
  int v33; 
  int v34; 
  char *v35; 
  int v36; 
  int v37; 
  __int128 *v38; 
  int v39; 
  int v40; 
  __int64 *v41; 
  int v42; 
  int v43; 
  char v44; 
  __int128 v45[13]; 
  v15 = 0i64;
  v3 = a3;
  v4 = a2;
  v5 = a1;
  _m_prefetchw(&PopDirectedDripsState);
  v6 = PopDirectedDripsState;
  do
  {
    v7 = v6;
    v6 = _InterlockedCompareExchange((volatile signed __int32 *)&PopDirectedDripsState, v6, v6);
  }
  while( v7 != v6 );
  if( (v6 & 1) != 0 )
  {
    PopDirectedDripsDiagQueryAndResetPnpAccounting(a1);
    v8 = PopWnfCsEnterScenarioId;
    ExAcquirePushLockExclusiveEx((UINT64)&PopDirectedDripsDiagLock, 0i64);
    if( PopDirectedDripsDiagTraceHandleRegistered
      && (unsigned int)dword_140D2C920 > 5
      && tlgKeywordOn((__int64)&dword_140D2C920, 0x400000000000i64) )
    {
      v22 = 0;
      v25 = 0;
      v28 = 0;
      v31 = 0;
      v34 = 0;
      v37 = 0;
      v40 = 0;
      v43 = 0;
      v20 = (__int64 *)&v16;
      v23 = &v12;
      v26 = &v13;
      v29 = &v14;
      v17 = v15;
      v32 = &v17;
      v35 = &v44;
      v38 = v45;
      v41 = &v18;
      v21 = 8;
      v24 = 4;
      v27 = 4;
      v30 = 4;
      v33 = 8;
      v42 = 8;
      v16 = v8;
      v12 = v5;
      v13 = v4;
      LODWORD(v14) = v3;
      v36 = 104;
      v39 = 208;
      v18 = 0x1000000i64;
      tlgWriteTransfer_EtwWriteTransfer(
        (__int64)&dword_140D2C920,
        (unsigned __int8 *)byte_1400290A3,
        0i64,
        0i64,
        0xAu,
        &v19);
    }
    PopDirectedDripsDiagRundownBroadcastTrees();
    PopDirectedDripsDiagRundownDevices(v10, v9, v11);
    if( (_InterlockedExchangeAdd64((volatile signed __int64 *)&PopDirectedDripsDiagLock, 0xFFFFFFFFFFFFFFFFui64) & 6) == 2 )
      ExfTryToWakePushLock((volatile INT64 *)&PopDirectedDripsDiagLock);
    KeAbPostRelease(&PopDirectedDripsDiagLock);
  }
}

Referenced by:

PopDirectedDripsSendSessionData