title: Accesing LDT register in x64 application c++
body: <p>im trying to detect VM using LDT register but i've encoutered a problem. In x64 there are no inline asm so i have to use intrinsics, but there aren't any intrinsic for ldt. In x86 it looks like this:</p>
  
  <pre><code>UCHAR ldtr[5] = "\xef\xbe\xad\xde";
  _asm sldt ldtr
  unsigned long ldt = *((unsigned long *)&amp;ldtr[0]);
  </code></pre>
  
  <p>Is there any possible workaround to implement it in x64 ?</p>
  
  <p>Compiler: from visual studio</p>
  
  <p>Version: 1915</p>