> Windows Syscalls
ntoskrnl.exeT1562.001T1106

NtThawRegistry

Releases a previous registry freeze so writes resume; counterpart of NtFreezeRegistry.

Prototype

NTSTATUS NtThawRegistry(VOID);

Arguments

NameTypeDirDescription

Syscall IDs by Windows version

Windows versionSyscall IDBuild
Win10 15070x1A4win10-1507
Win10 16070x1ADwin10-1607
Win10 17030x1B3win10-1703
Win10 17090x1B7win10-1709
Win10 18030x1B9win10-1803
Win10 18090x1BAwin10-1809
Win10 19030x1BBwin10-1903
Win10 19090x1BBwin10-1909
Win10 20040x1C1win10-2004
Win10 20H20x1C1win10-20h2
Win10 21H10x1C1win10-21h1
Win10 21H20x1C3win10-21h2
Win10 22H20x1C3win10-22h2
Win11 21H20x1CDwin11-21h2
Win11 22H20x1D1win11-22h2
Win11 23H20x1D1win11-23h2
Win11 24H20x1D4win11-24h2
Server 20160x1ADwinserver-2016
Server 20190x1BAwinserver-2019
Server 20220x1C9winserver-2022
Server 20250x1D4winserver-2025

Kernel module

ntoskrnl.exeNtThawRegistry

Related APIs

NtFreezeRegistryZwThawRegistryVSS IVssWriter::OnThawNtSaveKeyEx

Syscall stub

4C 8B D1            mov r10, rcx
B8 D4 01 00 00      mov eax, 0x1D4     ; Win11 24H2 SSN
F6 04 25 08 03 FE 7F 01   test byte ptr [0x7FFE0308], 1
75 03               jne short +3
0F 05               syscall
C3                  ret
CD 2E               int 2Eh
C3                  ret

Undocumented notes

Zero-argument counterpart to `NtFreezeRegistry`. Hits `CmpRegistryThaw`, which releases the global freeze lock; pending writers that were blocked in the kernel `KeWaitForSingleObject` chain get unblocked. Also requires `SeBackupPrivilege`. Calling `NtThawRegistry` when the registry is not frozen returns `STATUS_INVALID_PARAMETER` — useful when probing whether a freeze is in effect (an unusual diagnostic an attacker might use to confirm the success of a paired `NtFreezeRegistry`).

Common malware usage

Same weak-signal caveat as `NtFreezeRegistry`: no widely reported commodity family uses it. The only realistic offensive patterns are paired use with a freeze (DoS, TOCTTOU race) or explicit cleanup after a malicious snapshot attempt to avoid leaving the system in a degraded state and tripping watchdogs. Note that the kernel auto-thaw timeout means an attacker who *only* freezes still has the system recover on its own; calling `NtThawRegistry` is essentially a politeness primitive.

Detection opportunities

Treat freeze/thaw as a pair. A `NtThawRegistry` event from a process that did not itself call `NtFreezeRegistry` (i.e. cleaning up someone else's mess) is itself anomalous. Detection rules should look for the *holder* of `SeBackupPrivilege` issuing freeze→thaw outside the well-known VSS writers (`VSSVC.exe`, `svchost.exe -k swprv`, vendor backup agents on a known allowlist).

Direct syscall examples

cPolitely thaw after a freeze

NTSTATUS st = NtFreezeRegistry(30);
if (NT_SUCCESS(st)) {
    do_snapshot_work();
    NtThawRegistry();    // explicit; the 30s timeout would also auto-thaw
}

asmx64 direct stub

; NtThawRegistry direct syscall (Win11 24H2 SSN 0x1D4)
NtThawRegistry PROC
    mov  r10, rcx
    mov  eax, 1D4h
    syscall
    ret
NtThawRegistry ENDP

rustProbe freeze state

// STATUS_INVALID_PARAMETER (0xC000000D) from NtThawRegistry means 'not frozen'.
use windows_sys::Win32::System::LibraryLoader::*;
type NtThawFn = unsafe extern "system" fn() -> i32;
unsafe fn is_frozen() -> bool {
    let nt = GetModuleHandleA(b"ntdll.dll\0".as_ptr());
    let f: NtThawFn = std::mem::transmute(
        GetProcAddress(nt, b"NtThawRegistry\0".as_ptr()).unwrap()
    );
    // Caller must already have stored a prior freeze if they actually want to probe;
    // otherwise this is a destructive test.
    let st = f();
    st == 0 // success means we just thawed an active freeze
}

MITRE ATT&CK mappings

Last verified: 2026-05-20