ExpLicenseWatchInitWorker

NTSTATUS __stdcall ExpLicenseWatchInitWorker(){
  _KPRCB *v0; 
  unsigned __int64 v1; 
  __int64(__fastcall *v2)(unsigned __int64); 
  char v3; 
  char v4; 
  char v5; 
  unsigned __int64 v6; 
  NTSTATUS result; 

  _mm_lfence();
  v0 = KiProcessorBlock;
  v1 = KiProcessorBlock->HalReserved[6];
  v2 = (__int64(__fastcall *)(unsigned __int64))KiProcessorBlock->HalReserved[5];
  KiProcessorBlock->HalReserved[6] = 0i64;
  v0->HalReserved[5] = 0i64;
  v3 = KUSER_SHARED_DATA.KdDebuggerEnabled >> 1;
  v4 = KUSER_SHARED_DATA.KdDebuggerEnabled >> 1;
  v5 = (InitSafeBootMode != 0) & (KiSwInterruptPresent() < 0) | v3;
  v6 = __rdtsc() >> 3;
  result = 100 * ((unsigned int)v6 / 0x64);
  if( (unsigned int)v6 % 0x64 > 3 )
    v5 = v4 | 1;
  if( !v5 )
  {
    result = v2(v1);
    if( result != 1 )
      KeBugCheckEx(0x9Au, (PVOID)0x42424242, (PVOID)0xC000026Ai64, 0i64, 0i64);
  }
  return result;
}

Referenced by:

ExpWatchProductTypeInitialization