Post · 1 min read· p. 1421

KSPECIAL_REGISTERS (i386)

The KSPECIAL_REGISTERS (formally _KSPECIAL_REGISTERS) is a structure for recording processor state that is not ordinarily needed in a CONTEXT structure. It is necessarily highly specific to the processor architecture. Public symbols for the kernel starting with Windows 8 confirm that Microsoft defines the structure separately (in different headers) for different processors. This page concerns itself only with the KSPECIAL_REGISTERS in 32-bit Windows for the processor architecture that’s variously named i386 or x86. The x64 KSPECIAL_REGISTERS is presented separately.

The KSPECIAL_REGISTERS is 0x54 bytes in all known versions. Note that the structure contains a ULONG64 that does not have 8-byte alignment.

OffsetDefinitionVersions
0x00ULONG Cr0;all
0x04ULONG Cr2;all
0x08ULONG Cr3;all
0x0CULONG Cr4;all
0x10ULONG KernelDr0;all
0x14ULONG KernelDr1;all
0x18ULONG KernelDr2;all
0x1CULONG KernelDr3;all
0x20ULONG KernelDr6;all
0x24ULONG KernelDr7;all
0x28KDESCRIPTOR Gdtr;all
0x30KDESCRIPTOR Idtr;all
0x38USHORT Tr;all
0x3AUSHORT Ldtr;all
0x3CULONG64 Xcr0;all
0x44ULONG ExceptionList;all
0x48ULONG Reserved [3];all