PsIsGuiThread

UINT8 __stdcall PsIsGuiThread(_ETHREAD *Thread){
  return *((_BYTE *)Thread + 120) >> 7;
}

Referenced by:

NtSetInformationProcess