RtlTimeFieldsToTime

UINT8 __stdcall RtlTimeFieldsToTime(_TIME_FIELDS *TimeFields, _LARGE_INTEGER *Time){
  __int64 v2; 
  UINT8 v3; 
  unsigned int v5; 
  LONGLONG v6; 
  unsigned int v7; 
  __int64 *v9; 
  __int64 v10; 
  __int64 v11; 
  int v12[10]; 
  LONGLONG v13; 

  v2 = *(&ExBootDevicesRemovedEvent + 103);
  v3 = 0;
  v13 = 0i64;
  if( !*(&ExBootDevicesRemovedEvent + 103) || !**(&ExBootDevicesRemovedEvent + 103) )
    return RtlpTimeFieldsToTimeNoLeapSeconds(&TimeFields->Year, Time);
  v5 = *(_DWORD *)(*(&ExBootDevicesRemovedEvent + 103) + 4i64);
  _InterlockedOr(v12, 0);
  if( RtlpTimeFieldsToTimeNoLeapSeconds(&TimeFields->Year, &v13) )
  {
    v6 = v13;
    v7 = 0;
    if( !v5 )
      goto LABEL_5;
    v9 = (__int64 *)(v2 + 8);
    while( 1 )
    {
      v10 = *v9;
      if( *v9 < 0 )
      {
        v11 = v10 & 0x7FFFFFFFFFFFFFFFi64;
        if( v6 < v11 + 10000000 )
        {
          if( v6 < v11 )
          {
LABEL_5:
            Time->QuadPart = v6;
            return 1;
          }
          return v3;
        }
        v6 -= 10000000i64;
      }
      else if( v6 < v10 + 10000000 )
      {
        if( v6 < v10 )
          goto LABEL_5;
        v6 = 2 * v6 - v10;
      }
      else
      {
        v6 += 10000000i64;
      }
      ++v7;
      ++v9;
      if( v7 >= v5 )
        goto LABEL_5;
    }
  }
  return v3;
}

Referenced by:

ExGetExpirationDate
ExUpdateSystemTimeFromCmos
ExpRefreshSystemTime
ExpRefreshTimeZoneInformation
HaliSetWakeAlarm
HalpAcpiRealTimeToUtcTime
NtSetSystemTime
PiDevCfgSplitDriverConfigurationId
RtlCutoverTimeToSystemTime