17#define SEED_BUFFER_SIZE 6
21#define TICKS_PER_CLOCK_TICK 1000
22#define SECSPERDAY 86400
23#define TICKSPERSEC 10000000
26#define SECS_15_OCT_1582_TO_1601 ((17 + 30 + 31 + 365 * 18 + 5) * SECSPERDAY)
27#define TICKS_15_OCT_1582_TO_1601 ((ULONGLONG)SECS_15_OCT_1582_TO_1601 * TICKSPERSEC)
30#define TIME_FRAME 10000
67#define VALUE_BUFFER_SIZE 20
106 DPRINT(
"ZwQueryValueKey() failed (Status %lx)\n",
Status);
117 DPRINT(
"Loaded sequence %lx\n", *Sequence);
121#undef VALUE_BUFFER_SIZE
162 DPRINT(
"ZwSetValueKey() failed (Status %lx)\n",
Status);
400 sizeof(Uuid->Data4));
409 if (AllocatedCount >= 0)
450 Uuid->Data3 = ((
Time.
HighPart >> 16) & 0x0FFF) | 0x1000;
466 ULONG IntRange, IntSequence;
524 *Sequence = IntSequence;
#define InterlockedDecrement
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define KeQuerySystemTime(t)
#define ExGetPreviousMode
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
_Inout_ PLIST_ENTRY _In_ PVOID _In_ PSTRING _In_ BOOLEAN _In_ BOOLEAN _In_ ULONG _In_ PFLT_CALLBACK_DATA _In_opt_ PCHECK_FOR_TRAVERSE_ACCESS _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
LARGE_INTEGER NTAPI KeQueryPerformanceCounter(IN PLARGE_INTEGER PerformanceFreq)
LONG NTAPI ExSystemExceptionFilter(VOID)
#define EXCEPTION_EXECUTE_HANDLER
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
#define InterlockedExchangeAdd64
#define InitializeObjectAttributes(p, n, a, r, s)
static PLARGE_INTEGER Time
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
#define KeGetPreviousMode()
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
DECLSPEC_NORETURN NTSYSAPI VOID NTAPI RtlRaiseStatus(_In_ NTSTATUS Status)
@ KeyValuePartialInformation
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
struct _KEY_VALUE_PARTIAL_INFORMATION * PKEY_VALUE_PARTIAL_INFORMATION
ULONG ExpUuidSequenceNumber
#define TICKS_15_OCT_1582_TO_1601
static NTSTATUS ExpAllocateUuids(PULARGE_INTEGER Time, PULONG Range, PULONG Sequence)
NTSTATUS NTAPI NtAllocateUuids(OUT PULARGE_INTEGER Time, OUT PULONG Range, OUT PULONG Sequence, OUT PUCHAR Seed)
BOOLEAN ExpUuidSequenceNumberNotSaved
UUID_CACHED_VALUES_STRUCT ExpUuidCachedValues
BOOLEAN ExpUuidSequenceNumberValid
VOID NTAPI ExAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId)
LARGE_INTEGER ExpUuidLastTimeAllocated
static NTSTATUS ExpUuidLoadSequenceNumber(PULONG Sequence)
NTSTATUS NTAPI NtAllocateLocallyUniqueId(OUT LUID *LocallyUniqueId)
BOOLEAN ExpUuidCacheValid
static VOID ExpUuidSaveSequenceNumberIf(VOID)
#define TICKS_PER_CLOCK_TICK
static NTSTATUS ExpUuidSaveSequenceNumber(PULONG Sequence)
BOOLEAN NTAPI ExLuidInitialization(VOID)
NTSTATUS NTAPI NtSetUuidSeed(IN PUCHAR Seed)
#define VALUE_BUFFER_SIZE
static NTSTATUS ExpUuidGetValues(PUUID_CACHED_VALUES_STRUCT CachedValues)
BOOLEAN NTAPI ExpUuidInitialization(VOID)
NTSTATUS NTAPI ExUuidCreate(OUT UUID *Uuid)
NTSTATUS NTAPI SeQueryAuthenticationIdToken(_In_ PACCESS_TOKEN Token, _Out_ PLUID LogonId)
Queries the authentication ID of an access token.
#define RPC_NT_UUID_LOCAL_ONLY
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
UCHAR ClockSeqHiAndReserved
VOID NTAPI SeReleaseSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Releases both the primary and client tokens of a security subject context.
VOID NTAPI SeCaptureSubjectContext(_Out_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Captures the security subject context of the calling thread and calling process.
static LARGE_INTEGER Frequency
static LARGE_INTEGER Counter
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_ACCESS_DENIED
#define STATUS_UNSUCCESSFUL
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
#define RtlEqualLuid(Luid1, Luid2)
#define SeQuerySubjectContextToken(SubjectContext)
_In_ KPROCESSOR_MODE PreviousMode