Function at 0x514184
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
mov eax, dword [ebp - 4]
call fcn.00406ad8
xor eax, eax
push ebp
push 0x5146ef
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [0x58d174]
call fcn.0050fbe4
mov word [ebp - 0x2a], ax
cmp dword [ebp + 0x10], 0
je 0x5141e3
mov eax, dword [ebp + 0x10]
call fcn.005246c0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x10]
call fcn.005246d0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x10]
call fcn.00524270
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
call fcn.004067a0
test eax, eax
jl 0x5146d3
inc eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x10], 0
mov eax, dword [0x58d174]
call fcn.0050fbe4
cmp ax, word [ebp - 0x2a]
jne 0x5146d3
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
cmp dword [eax + edx*8], 0
jl 0x5146c7
cmp dword [ebp - 8], 0
je 0x514235
mov eax, dword [ebp - 8]
cmp byte [eax + 0xd], 0
jne 0x5146d3
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
mov esi, dword [eax + edx*8]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
mov edi, dword [eax + edx*8 + 4]
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x50], esi
fild dword [ebp - 0x50]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x54], edi
fild dword [ebp - 0x54]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b8060
mov ebx, dword [ebp - 0x10]
inc ebx
mov eax, dword [ebp - 4]
call fcn.004067a0
sub eax, ebx
jl 0x51432d
inc eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 4]
cmp dword [eax + ebx*8], 0
jl 0x514327
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp - 4]
fild dword [eax + ebx*8]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp - 4]
fild dword [eax + ebx*8 + 4]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fcomp dword [0x514704]
wait
fnstsw ax
sahf
ja 0x51432d
mov eax, dword [ebp - 4]
mov esi, dword [eax + ebx*8]
mov eax, dword [ebp - 4]
mov edi, dword [eax + ebx*8 + 4]
mov eax, dword [ebp - 4]
mov dword [eax + ebx*8], 0xffffffff
inc ebx
dec dword [ebp - 0x44]
jne 0x5142ad
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x50], esi
fild dword [ebp - 0x50]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x54], edi
fild dword [ebp - 0x54]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fcomp dword [0x514708]
wait
fnstsw ax
sahf
jbe 0x5143a6
push 0x7d0
mov ecx, edi
mov edx, esi
mov eax, dword [0x58d174]
call fcn.0050eb2c
test al, al
je 0x5146d3
jmp 0x51453b
call fcn.004b9988
mov dword [ebp - 0x18], eax
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x50], esi
fild dword [ebp - 0x50]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x54], edi
fild dword [ebp - 0x54]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
call fcn.00403424
mov ebx, eax
imul eax, ebx, 0x1f4
mov dword [ebp - 0x1c], eax
call fcn.004b9988
mov dword [ebp - 0x30], eax
mov ecx, edi
mov edx, esi
mov eax, dword [0x58d174]
call fcn.0050f220
jmp 0x51452e
push 0x32
call sub.kernel32.dll_Sleep_2
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x50], esi
fild dword [ebp - 0x50]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x54], edi
fild dword [ebp - 0x54]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fstp qword [ebp - 0x38]
wait
fld qword [ebp - 0x38]
fcomp dword [0x51470c]
wait
fnstsw ax
sahf
jae 0x514499
mov dword [ebp - 0xc], 1
jmp 0x51453b
fld qword [ebp - 0x38]
call fcn.00403424
push edx
push eax
mov eax, ebx
cdq
cmp edx, dword [esp + 4]
jne 0x5144b5
cmp eax, dword [esp]
pop edx
pop eax
jbe 0x5144cd
jmp 0x5144b9
pop edx
pop eax
jle 0x5144cd
fld qword [ebp - 0x38]
call fcn.00403424
mov ebx, eax
call fcn.004b9988
mov dword [ebp - 0x18], eax
jmp 0x5144ff
call fcn.004b9988
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x18]
cdq
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
cmp edx, 0
jne 0x5144f1
cmp eax, 0x1f4
jbe 0x5144ff
jmp 0x5144f3
jle 0x5144ff
mov eax, 0x514718
call fcn.004b8ff8
jmp 0x51453b
call fcn.004b9988
sub eax, dword [ebp - 0x30]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x1c]
cdq
cmp edx, dword [esp + 4]
jne 0x51451e
cmp eax, dword [esp]
pop edx
pop eax
jae 0x51452e
jmp 0x514522
pop edx
pop eax
jge 0x51452e
mov eax, 0x514730
call fcn.004b8ff8
jmp 0x51453b
mov eax, dword [ebp - 8]
cmp byte [eax + 0xd], 0
je 0x514426
cmp dword [ebp + 0x10], 0
je 0x514621
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp + 0x10]
call fcn.005246c0
mov dword [ebp - 0x50], eax
fild dword [ebp - 0x50]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp + 0x10]
call fcn.005246d0
mov dword [ebp - 0x54], eax
fild dword [ebp - 0x54]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fild dword [ebp + 0x14]
fcompp
wait
fnstsw ax
sahf
jb 0x5145b9
mov dword [ebp - 0xc], 1
jmp 0x5146d3
mov eax, dword [ebp + 0x10]
call fcn.005246c0
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp + 0x10]
call fcn.005246d0
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp - 0x20]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp - 0x24]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fcomp dword [0x514708]
wait
fnstsw ax
sahf
jbe 0x51467c
mov eax, dword [ebp + 0x10]
call fcn.00524270
cmp eax, dword [ebp - 0x28]
jle 0x51467c
mov dword [ebp - 0xc], 2
jmp 0x5146d3
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x48], eax
fild dword [ebp - 0x48]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x4c], eax
fild dword [ebp - 0x4c]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp + 0x1c]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp + 0x18]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fild dword [ebp + 0x14]
fcompp
wait
fnstsw ax
sahf
jb 0x51467c
mov dword [ebp - 0xc], 1
jmp 0x5146d3
cmp word [ebp + 0xa], 0
je 0x5146c7
mov byte [ebp - 0x3a], 0
mov byte [ebp - 0x39], 0
xor eax, eax
push ebp
push 0x5146b7
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x3a]
push eax
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x39]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
call dword [ebp + 8]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5146c1
cmp byte [ebp - 0x3a], 0
jne 0x5146d3
inc dword [ebp - 0x10]
dec dword [ebp - 0x40]
jne 0x5141fe
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5146f6
lea eax, [ebp - 4]
mov edx, dword [0x509db4]
call fcn.00406a74
ret