PopDirectedDripsDiagNotifySessionStop

VOID __stdcall PopDirectedDripsDiagNotifySessionStop(INT64 a1, INT64 a2, INT64 a3){
  int v3; 
  int v4; 
  int v5; 
  signed __int32 v6; 
  signed __int32 v7; 
  UINT64 v8; 
  int v9; 
  int v10; 
  __int64 v11; 
  __int64 v12; 
  UINT64 v13; 
  __int64 v14; 
  __int64 v15; 
  _EVENT_DATA_DESCRIPTOR v16; 
  __int64 *v17; 
  int v18; 
  int v19; 
  int *v20; 
  int v21; 
  int v22; 
  int *v23; 
  int v24; 
  int v25; 
  __int64 *v26; 
  int v27; 
  int v28; 
  __int64 *v29; 
  int v30; 
  int v31; 
  char *v32; 
  int v33; 
  int v34; 
  char *v35; 
  int v36; 
  int v37; 
  __int64 *v38; 
  int v39; 
  int v40; 
  char v41; 
  char v42; 

  v12 = 0i64;
  v3 = a3;
  v4 = a2;
  v5 = a1;
  _m_prefetchw((char *)&stru_140C23628 + 5048);
  v6 = *(&stru_140C23628 + 1262);
  do
  {
    v7 = v6;
    v6 = _InterlockedCompareExchange((_DWORD *)&stru_140C23628 + 1262, v6, v6);
  }
  while( v7 != v6 );
  if( (v6 & 1) != 0 )
  {
    PopDirectedDripsDiagQueryAndResetPnpAccounting(a1);
    v8 = PopWnfCsEnterScenarioId;
    ExAcquirePushLockExclusiveEx(&PopDirectedDripsDiagLock, 0i64);
    if( PopDirectedDripsDiagTraceHandleRegistered
      && (unsigned int)dword_140D2C920 > 5
      && tlgKeywordOn((__int64)&dword_140D2C920, 0x400000000000i64) )
    {
      v19 = 0;
      v22 = 0;
      v25 = 0;
      v28 = 0;
      v31 = 0;
      v34 = 0;
      v37 = 0;
      v40 = 0;
      v17 = (__int64 *)&v13;
      v20 = &v9;
      v23 = &v10;
      v26 = &v11;
      v14 = v12;
      v29 = &v14;
      v32 = &v41;
      v35 = &v42;
      v38 = &v15;
      v18 = 8;
      v21 = 4;
      v24 = 4;
      v27 = 4;
      v30 = 8;
      v39 = 8;
      v13 = v8;
      v9 = v5;
      v10 = v4;
      LODWORD(v11) = v3;
      v33 = 104;
      v36 = 208;
      v15 = 0x1000000i64;
      tlgWriteTransfer_EtwWriteTransfer(
        (__int64)&dword_140D2C920,
        (unsigned __int8 *)byte_1400290A3,
        0i64,
        0i64,
        0xAu,
        &v16);
    }
    PopDirectedDripsDiagRundownBroadcastTrees();
    PopDirectedDripsDiagRundownDevices();
    if( (_InterlockedExchangeAdd64(&PopDirectedDripsDiagLock._bf_0, 0xFFFFFFFFFFFFFFFFui64) & 6) == 2 )
      ExfTryToWakePushLock(&PopDirectedDripsDiagLock);
    KeAbPostRelease(&PopDirectedDripsDiagLock);
  }
}

Referenced by:

PopDirectedDripsSendSessionData