Function at 0x5313f0
Capabilities:
Check for time delay via queryperformancecounter
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
push ebx
push esi
push edi
mov dword [ebp - 0xc], edx
mov ebx, eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x2c], eax
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [ebp - 0x38], eax
xor eax, eax
mov dword [ebp - 0x40], eax
xor eax, eax
mov dword [ebp - 0x34], eax
call sub.kernel32.dll_GetCurrentThread
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x28]
push eax
call sub.kernel32.dll_QueryPerformanceFrequency
test eax, eax
jne 0x531572
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov esi, edx
mov edi, edx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x5316ba
inc dword [ebp - 0x44]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edi
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x4c]
push eax
call sub.kernel32.dll_GetThreadPriority
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0x7fffffff
je 0x5314a0
push 0xf
mov eax, dword [ebp - 0x4c]
push eax
call sub.kernel32.dll_SetThreadPriority
jmp 0x5314a0
lea eax, [ebp - 0x20]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
push eax
push edx
rdtsc
mov dword [ebp - 4], eax
pop edx
pop eax
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x18]
cmp ebx, eax
ja 0x53148e
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
jmp 0x5314ca
lea eax, [ebp - 0x20]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
push eax
push edx
rdtsc
mov dword [ebp - 8], eax
pop edx
pop eax
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x18]
cmp ebx, eax
ja 0x5314b8
cmp dword [ebp - 0x48], 0x7fffffff
je 0x5314ea
mov eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x4c]
push eax
call sub.kernel32.dll_SetThreadPriority
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 4]
mov dword [ebp - 0x3c], eax
mov esi, dword [ebp - 0x20]
sub esi, dword [ebp - 0x18]
imul eax, esi, 0x186a0
mov esi, eax
cmp dword [ebp - 0x28], 0
jbe 0x531531
mov dword [ebp - 0x54], esi
xor eax, eax
mov dword [ebp - 0x50], eax
fild qword [ebp - 0x54]
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x5c], eax
xor eax, eax
mov dword [ebp - 0x58], eax
fild qword [ebp - 0x5c]
fdiv dword [0x5316c4]
fdivp st(1)
call fcn.0040348c
mov esi, eax
jmp 0x531533
xor esi, esi
add dword [ebp - 0x40], esi
mov eax, dword [ebp - 0x3c]
add dword [ebp - 0x38], eax
test esi, esi
jne 0x531545
mov edi, dword [ebp - 0x3c]
jmp 0x531567
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x54], eax
xor eax, eax
mov dword [ebp - 0x50], eax
fild qword [ebp - 0x54]
mov dword [ebp - 0x5c], esi
xor eax, eax
mov dword [ebp - 0x58], eax
fild qword [ebp - 0x5c]
fdivp st(1)
call fcn.0040348c
mov edi, eax
mov eax, dword [ebp - 0x2c]
add eax, edi
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x44], 3
jl 0x53144b
cmp dword [ebp - 0x44], 0x14
jge 0x5315c4
lea eax, [edi + edi*2]
sub eax, dword [ebp - 0x34]
cdq
xor eax, edx
sub eax, edx
cmp eax, 3
jg 0x53144b
mov eax, dword [ebp - 0x2c]
lea eax, [eax + eax*2]
sub eax, dword [ebp - 0x34]
cdq
xor eax, edx
sub eax, edx
cmp eax, 3
jg 0x53144b
mov eax, dword [ebp - 0x30]
lea eax, [eax + eax*2]
sub eax, dword [ebp - 0x34]
cdq
xor eax, edx
sub eax, edx
cmp eax, 3
jg 0x53144b
cmp dword [ebp - 0x40], 0
jbe 0x531646
mov eax, dword [ebp - 0x38]
add eax, eax
lea eax, [eax + eax*4]
mov dword [ebp - 0x54], eax
xor eax, eax
mov dword [ebp - 0x50], eax
fild qword [ebp - 0x54]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x5c], eax
xor eax, eax
mov dword [ebp - 0x58], eax
fild qword [ebp - 0x5c]
fdivp st(1)
call fcn.0040348c
mov dword [ebp - 0x30], eax
imul eax, dword [ebp - 0x38], 0x64
mov dword [ebp - 0x54], eax
xor eax, eax
mov dword [ebp - 0x50], eax
fild qword [ebp - 0x54]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x5c], eax
xor eax, eax
mov dword [ebp - 0x58], eax
fild qword [ebp - 0x5c]
fdivp st(1)
call fcn.0040348c
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x54], eax
xor eax, eax
mov dword [ebp - 0x50], eax
fild qword [ebp - 0x54]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x5c], eax
xor eax, eax
mov dword [ebp - 0x58], eax
fild qword [ebp - 0x5c]
fdivp st(1)
call fcn.0040348c
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
jmp 0x531657
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0xc]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ebp - 0x30]
add eax, eax
lea eax, [eax + eax*4]
mov edx, dword [ebp - 0x2c]
sub edx, eax
cmp edx, 6
jl 0x53166c
inc dword [ebp - 0x30]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
add edi, edi
lea edi, [edi + edi*4]
mov eax, dword [ebp - 0x30]
sub eax, edi
cmp eax, 6
jl 0x531691
mov eax, dword [ebp - 0xc]
inc dword [eax + 4]
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x40]
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x38]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
call fcn.0053137c
mov edx, dword [ebp - 0xc]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [eax + 8], ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret