RtlpGetTimeZoneInfoHandle

NTSTATUS __stdcall RtlpGetTimeZoneInfoHandle(BOOL WriteAccess, PHANDLE Key){
  NTSTATUS result; 
  INT64 a6; 
  __int64 a7[2]; 
  WCHAR KeyName[264]; 

  if( dword_140C4C2EC == 2 )
    return RtlpGetRegistryHandle(2ui64, L"TimeZoneInformation", WriteAccess, Key);
  LODWORD(a6) = 520;
  result = RtlGetPersistedStateLocation(
             (WCHAR *)L"TimeZoneInformationSettings",
             L"TargetNtPath",
             0i64,
             0i64,
             KeyName,
             a6,
             (INT64)a7);
  if( result >= 0 )
  {
    dword_140C4C2EC = 1;
    result = RtlpGetRegistryHandle(0i64, KeyName, WriteAccess, Key);
    if( result != -1073741772 )
      return result;
    return RtlpGetRegistryHandle(2ui64, L"TimeZoneInformation", WriteAccess, Key);
  }
  if( result == -1073741772 )
  {
    dword_140C4C2EC = 2;
    return RtlpGetRegistryHandle(2ui64, L"TimeZoneInformation", WriteAccess, Key);
  }
  return result;
}

Referenced by:

RtlSetActiveTimeBias
RtlpQueryTimeZoneInformationWorker
RtlpSetTimeZoneInformationWorker