FS Indicate the address of TIB.
Offset Description
0x20 ProcessID
0x24 ThreadID
0x2c Handle To Tls
0x30 address of PEB or adress of PDB not very sure
0x34 the last error code
GetCurrentThreadID() asm:
mov eax,fs:[18h]
mov eax,[eax+24h]
ret