I just read an answer on StackOverflow with this code:

Unfortunately it lacked explanation, so what does this code do?

It reads offset $4 from the Thread Information Block (the top of stack) into eax and then offset $8 (stack base) into ebx.

Then it substracts the two and moves that into variable eu, that’s all!