that appears to be an antidebugging trick using rdtsc.
(read date time stamp counter) it is a monitonically increasing counter
when the process is executing without any external interference like a debugger the difference between two successive readings will be small
the loops look like junk interspersed in between
this code block supposedly checks for that