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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 7
push 0
push 0
dec ecx
jne 0x586cac
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x587091
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [edx + 0x47c], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x586ced
mov eax, dword [ebp - 0x10]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x586e60
mov eax, dword [ebp - 8]
cmp word [eax + 0x28], 0
jne 0x586e4e
mov eax, dword [ebp - 8]
cmp byte [eax + 0x30], 0
jne 0x586e4e
xor edx, edx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x24]
call fcn.0040a8dc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x586e60
cmp dword [ebp - 0xc], 0xffff
jg 0x586e60
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 8]
mov dword [edx + 0x34], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x478], 0
je 0x586d5d
mov eax, dword [ebp - 4]
add eax, 0x478
call fcn.00410e9c
xor ecx, ecx
mov dl, 1
mov eax, dword [0x509d74]
call fcn.0050c1a8
mov edx, dword [ebp - 4]
mov dword [edx + 0x478], eax
xor edx, edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
call fcn.0050b964
xor edx, edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
call fcn.0050ba70
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
mov edx, dword [ebp - 4]
mov dword [eax + 0x54], edx
mov dword [eax + 0x50], 0x5872c8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
mov edx, dword [ebp - 4]
mov dword [eax + 0x64], edx
mov dword [eax + 0x60], 0x58735c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
mov edx, dword [ebp - 4]
mov dword [eax + 0x8c], edx
mov dword [eax + 0x88], 0x587388
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
mov edx, dword [ebp - 4]
mov dword [eax + 0x7c], edx
mov dword [eax + 0x78], 0x5873ac
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
call fcn.004ea724
test al, al
je 0x586e17
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
call fcn.0050b9e4
jmp 0x586e2b
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
call fcn.0050ba70
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
call fcn.0050bafc
mov dl, 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x478]
call fcn.0050b964
jmp 0x586e60
mov eax, dword [ebp - 8]
cmp word [eax + 0x28], 1
je 0x586e60
mov eax, dword [ebp - 8]
cmp word [eax + 0x28], 2
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x47c]
cmp byte [eax + 0x2a], 0
je 0x586e94
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x47c]
sub eax, dword [edx + 0x2c]
cmp eax, 0x2bf20
jb 0x586e94
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x47c]
mov byte [eax + 0x2a], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x47c]
cmp byte [eax + 0x2a], 0
je 0x586efb
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3fc]
mov edx, dword [eax + 0x67b]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x380]
mov eax, dword [eax + 0x68]
call fcn.0042d660
lea edx, [ebp - 0x18]
mov eax, dword [0x5a4030]
call fcn.004077b0
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x14]
call fcn.004da43c
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x380]
call fcn.00457868
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.00587844
jmp 0x587076
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3fc]
mov edx, dword [eax + 0x677]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x380]
mov eax, dword [eax + 0x68]
call fcn.0042d660
lea edx, [ebp - 0x20]
mov eax, dword [0x5a3e60]
call fcn.004077b0
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x1c]
call fcn.004da43c
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x380]
call fcn.00457868
mov eax, dword [0x5a3fb4]
mov eax, dword [eax]
mov eax, dword [eax + 0x394]
mov eax, dword [eax + 0x68]
mov edx, 0xffffff
call fcn.0042d660
lea edx, [ebp - 0x28]
mov eax, dword [0x5a3e60]
call fcn.004077b0
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x24]
call fcn.004da43c
mov edx, dword [ebp - 0x24]
mov eax, dword [0x5a3fb4]
mov eax, dword [eax]
mov eax, dword [eax + 0x394]
call fcn.00457868
mov eax, dword [0x5a3e38]
mov eax, dword [eax]
mov eax, dword [eax + 0x37c]
mov eax, dword [eax + 0x68]
mov edx, 0xffffff
call fcn.0042d660
lea edx, [ebp - 0x30]
mov eax, dword [0x5a3e60]
call fcn.004077b0
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x2c]
call fcn.004da43c
mov edx, dword [ebp - 0x2c]
mov eax, dword [0x5a3e38]
mov eax, dword [eax]
mov eax, dword [eax + 0x37c]
call fcn.00457868
mov eax, dword [0x5a3bf0]
mov eax, dword [eax]
mov eax, dword [eax + 0x374]
mov eax, dword [eax + 0x68]
mov edx, 0xffffff
call fcn.0042d660
lea edx, [ebp - 0x38]
mov eax, dword [0x5a3e60]
call fcn.004077b0
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x34]
call fcn.004da43c
mov edx, dword [ebp - 0x34]
mov eax, dword [0x5a3bf0]
mov eax, dword [eax]
mov eax, dword [eax + 0x374]
call fcn.00457868
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.00587844
mov eax, dword [ebp - 4]
mov byte [eax + 0x402], 0
mov eax, dword [ebp - 4]
add eax, 0x404
call fcn.00405404
mov eax, dword [ebp - 4]
add eax, 0x408
call fcn.00405404
mov eax, dword [ebp - 4]
add eax, 0x40c
call fcn.00405404
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x410], edx
push 1
mov eax, dword [ebp - 8]
mov cx, word [eax + 0x18]
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
call fcn.00586b48
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x587098
lea eax, [ebp - 0x38]
mov edx, 0xa
call fcn.00405428
ret