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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
xor ecx, ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x580812
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5ab6c4]
cmp dword [eax], 0
je 0x5807ef
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
je 0x5807ef
mov eax, dword [0x5ab4b4]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x20]
jne 0x5807ef
push 1
mov eax, dword [ebp - 8]
call fcn.00486030
call fcn.00428720
push eax
call sub.gdi32.dll_SetBkMode
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x5807ef
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov edx, dword [eax]
call dword [edx + 0x14]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x14]
jg 0x580673
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x5807ef
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x18]
test eax, eax
je 0x5807ef
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
call fcn.00486030
mov edx, 0x580828
call fcn.004284f0
push eax
mov eax, 0x324
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x18]
pop edx
mov ecx, edx
cdq
idiv ecx
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x18], 0xffffff6a
jg 0x580719
mov eax, dword [ebp - 8]
call fcn.00486030
mov edx, 0x580828
call fcn.004284f0
push eax
mov eax, 0xffffff6a
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x18]
pop edx
mov ecx, edx
cdq
idiv ecx
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x18]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ebx, dword [eax]
call dword [ebx + 0xc]
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
call fcn.00580344
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x18]
call fcn.00404820
cmp dword [ebp - 0x18], 0
je 0x580771
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x24]
call fcn.00404a48
cmp eax, dword [ebp - 0x10]
jge 0x580781
mov eax, dword [ebp - 4]
mov dword [eax + 0x18], 0x320
mov eax, dword [ebp - 4]
inc dword [eax + 0x14]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x18]
inc edx
mov eax, 0xffffff6a
call fcn.00475b5c
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
call fcn.00581958
push eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 4]
call fcn.00581958
push eax
mov eax, dword [ebp - 0x18]
push eax
mov ecx, 0xf
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
call fcn.00507d98
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x1c]
cmp eax, 0x64
jbe 0x5807e2
mov eax, dword [ebp - 4]
sub dword [eax + 0x18], 2
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x1c], eax
mov eax, dword [ebp - 8]
call fcn.00486030
call fcn.00484e10
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x580819
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004047ac
lea eax, [ebp - 0x18]
call fcn.00404788
ret