KeInitializeGate

VOID __stdcall KeInitializeGate(_KGATE *Gate, UINT8 State){
  *((_DWORD *)Gate + 1) = 0;
  *((_QWORD *)Gate + 2) = (char *)Gate + 8;
  *((_QWORD *)Gate + 1) = (char *)Gate + 8;
  *(_WORD *)Gate = 263;
  *((_BYTE *)Gate + 2) = 6;
}

Referenced by:

KiInitializeProcessor
MiInitializePartition
NtSetInformationProcess
PspGetContextThreadInternal
PspRundownUmsThreadForApcDelivery
PspSetContextThreadInternal