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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffac
push ebx
push esi
xor edx, edx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5789a2
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov eax, dword [ebp - 4]
dec eax
je 0x5786fb
dec eax
je 0x578723
dec eax
je 0x57874b
dec eax
je 0x578773
jmp 0x578799
mov eax, dword [ebp + 8]
add eax, 0xffffffc8
mov edx, dword [0x586a98]
mov edx, dword [edx]
mov edx, dword [edx + 0x24c]
call fcn.00405240
mov eax, dword [0x586a98]
mov eax, dword [eax]
mov ebx, dword [eax + 0x240]
jmp 0x578799
mov eax, dword [ebp + 8]
add eax, 0xffffffc8
mov edx, dword [0x586a98]
mov edx, dword [edx]
mov edx, dword [edx + 0x244]
call fcn.00405240
mov eax, dword [0x586a98]
mov eax, dword [eax]
mov ebx, dword [eax + 0x238]
jmp 0x578799
mov eax, dword [ebp + 8]
add eax, 0xffffffc8
mov edx, dword [0x586a98]
mov edx, dword [edx]
mov edx, dword [edx + 0x248]
call fcn.00405240
mov eax, dword [0x586a98]
mov eax, dword [eax]
mov ebx, dword [eax + 0x23c]
jmp 0x578799
mov eax, dword [ebp + 8]
add eax, 0xffffffc8
mov edx, dword [0x586a98]
mov edx, dword [edx]
mov edx, dword [edx + 0x364]
call fcn.00405240
mov eax, dword [0x586a98]
mov eax, dword [eax]
mov ebx, dword [eax + 0x35c]
test ebx, ebx
je 0x578987
mov eax, dword [ebp + 8]
lea ecx, [eax - 0x34]
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0x38]
mov eax, dword [0x5865d0]
mov eax, dword [eax]
call fcn.0050d68c
test al, al
je 0x578987
call fcn.0040c448
fsub dword [0x5789b4]
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x4c]
mov eax, dword [ebp - 4]
call fcn.00409fe0
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x48]
mov edx, 0x5789c0
call fcn.004054c0
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x3c]
mov eax, dword [eax + 0x1ac]
mov edx, 0x5789d4
mov esi, dword [eax]
call dword [esi + 0x20]
fstp qword [ebp - 0x10]
wait
call fcn.0040c448
add esp, 0xfffffff8
fstp qword [esp]
wait
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.004c01cc
push edx
push eax
mov eax, ebx
cdq
cmp edx, dword [esp + 4]
jne 0x57883a
cmp eax, dword [esp]
pop edx
pop eax
ja 0x578987
jmp 0x578842
pop edx
pop eax
jg 0x578987
call fcn.004b9988
mov esi, eax
xor ebx, ebx
jmp 0x5788dc
call fcn.004b9988
sub eax, esi
mov ecx, 0x12c
xor edx, edx
div ecx
xor edx, edx
push edx
push eax
mov eax, ebx
cdq
cmp edx, dword [esp + 4]
jne 0x578870
cmp eax, dword [esp]
pop edx
pop eax
jne 0x57888c
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0x30]
mov eax, dword [0x5865d0]
mov eax, dword [eax]
or ecx, 0xffffffff
call fcn.00511928
inc ebx
jmp 0x5788c7
lea ecx, [ebp - 0x44]
mov eax, dword [ebp + 8]
mov edx, dword [eax - 0x30]
mov eax, dword [0x5865d0]
mov eax, dword [eax]
call fcn.0050d67c
test al, al
jne 0x5788ab
mov byte [ebp - 5], 1
jmp 0x5788ec
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x2c]
cmp eax, dword [ebp - 0x3c]
jg 0x5788c1
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x28]
cmp eax, dword [ebp - 0x38]
jle 0x5788c7
mov byte [ebp - 5], 1
jmp 0x5788ec
call fcn.004b9988
sub eax, esi
cmp eax, 0x2bc
ja 0x5788ec
push 0x32
call sub.kernel32.dll_Sleep_2
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x3c]
cmp byte [eax + 0xd], 0
je 0x578850
call fcn.0040c448
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x54]
mov eax, dword [ebp - 4]
call fcn.00409fe0
mov ecx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
mov edx, 0x5789c0
call fcn.004054c0
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 0x3c]
mov eax, dword [eax + 0x1ac]
mov edx, 0x5789d4
mov ebx, dword [eax]
call dword [ebx + 0x34]
mov eax, dword [ebp - 4]
dec eax
je 0x57893d
dec eax
je 0x578950
dec eax
je 0x578963
dec eax
je 0x578976
jmp 0x578987
call fcn.004b9988
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x3c]
mov dword [edx + 0x19c], eax
jmp 0x578987
call fcn.004b9988
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x3c]
mov dword [edx + 0x1a0], eax
jmp 0x578987
call fcn.004b9988
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x3c]
mov dword [edx + 0x1a4], eax
jmp 0x578987
call fcn.004b9988
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x3c]
mov dword [edx + 0x1a8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5789a9
lea eax, [ebp - 0x54]
mov edx, 4
call fcn.004051cc
ret