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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x284
mov eax, dword [0x4151a8]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
push edi
mov dword [esp + 0x28c], eax
mov dword [esp + 0xc], ebx
mov dword [0x41604c], 0x2710
call esi
push eax
call fcn.00408727
mov al, byte [0x417392]
add esp, 4
cmp al, bl
jne 0x406f93
lea esp, [esp]
call esi
mov ecx, dword [0x416050]
sub eax, 0x186a0
cmp ecx, eax
jae 0x4068dc
cmp byte [0x416021], 1
jne 0x4068dc
mov eax, dword [0x416008]
cmp eax, ebx
jbe 0x406a34
call fcn.00401ca0
cmp byte [0x416021], bl
mov eax, dword [0x416008]
jne 0x406a34
cmp eax, ebx
jbe 0x4068f8
push eax
call dword [0x417194]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x64
mov dword [0x416008], ebx
call edi
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx*4 + 0x415124]
lea eax, [esp + 0x20]
push eax
push edx
call fcn.00401c10
add esp, 4
push eax
call fcn.00402930
add esp, 8
cmp al, 1
jne 0x406a19
lea eax, [esp + 0x20]
push eax
call dword [0x4164a8]
push 6
push 1
push 2
mov dword [0x41601c], eax
call dword [0x416068]
xor edx, edx
mov dx, word [0x415120]
xor ecx, ecx
mov dword [0x41600c], ecx
mov dword [0x416010], ecx
mov dword [0x416014], ecx
mov dword [0x416008], eax
mov dword [0x416018], ecx
push edx
mov word [0x41600c], 2
call dword [0x417388]
mov word [0x41600e], ax
mov eax, dword [0x41601c]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push 0x32
mov dword [0x416010], eax
mov byte [0x416020], bl
mov byte [0x416022], bl
mov byte [0x416023], bl
mov dword [0x41604c], 0x2710
call edi
mov ecx, dword [0x416008]
push 0x10
push 0x41600c
push ecx
call dword [0x415fec]
cmp eax, 0xffffffff
je 0x406f7f
xor edx, edx
mov dword [0x416032], edx
mov dword [0x416036], edx
mov dword [0x41603a], edx
mov word [0x41603e], dx
mov byte [0x416040], dl
mov byte [0x416021], 1
call esi
mov dword [0x416024], eax
call esi
push 0x64
mov dword [0x416050], eax
call edi
jmp 0x406f7f
mov eax, dword [esp + 0xc]
inc eax
cmp eax, 4
mov dword [esp + 0xc], eax
jl 0x406f7f
mov dword [esp + 0xc], ebx
jmp 0x406f7f
cmp byte [0x416020], bl
jne 0x406b18
push ebx
push 2
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [str.P_f_tP7_t0_]
cmp eax, 2
jne 0x406b02
call esi
mov dl, byte [esp + 0x10]
mov dword [0x416050], eax
mov al, byte [esp + 0x11]
mov byte [0x416022], dl
mov byte [0x416023], al
call esi
mov dl, byte [0x416022]
xor ecx, ecx
mov dword [0x416032], ecx
mov dword [0x416036], ecx
mov dword [0x41603a], ecx
mov dword [0x416024], eax
mov al, byte [0x416023]
mov word [0x41603e], cx
mov byte [0x416040], cl
mov byte [esp + 0x10], dl
mov byte [esp + 0x11], al
call fcn.004024f0
mov byte [esp + 0x12], al
call fcn.004026a0
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x11]
dec al
neg al
sbb al, al
inc al
mov byte [esp + 0x13], al
add al, cl
mov cl, byte [esp + 0x10]
add al, dl
add al, cl
push 0x64
mov byte [esp + 0x18], al
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x416008]
cmp eax, ebx
jbe 0x406b02
push ebx
push 5
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [0x4165c4]
cmp eax, 5
je 0x406b0c
call fcn.00401ca0
jmp 0x406f7f
mov byte [0x416020], 1
jmp 0x406f7f
mov cl, byte [0x416033]
cmp cl, bl
jne 0x406cb1
push 0xf
push 0x416032
push eax
call fcn.00401540
add esp, 0xc
cmp eax, 0xffffffff
jne 0x406b45
call fcn.00401ca0
jmp 0x406da7
cmp eax, ebx
je 0x406da7
cmp eax, 0xf
jne 0x406da7
call esi
mov dword [0x416050], eax
xor ecx, ecx
xor eax, eax
cmp eax, 2
jne 0x406b68
xor eax, eax
mov dl, byte [eax + 0x416022]
xor dl, byte [ecx + 0x416032]
xor dl, cl
inc eax
cmp eax, 2
mov byte [ecx + 0x416032], dl
jne 0x406b84
xor eax, eax
mov dl, cl
inc dl
xor dl, byte [eax + 0x416022]
xor byte [ecx + 0x416033], dl
inc eax
cmp eax, 2
jne 0x406b9c
xor eax, eax
mov dl, cl
add dl, 2
xor dl, byte [eax + 0x416022]
xor byte [ecx + 0x416034], dl
inc eax
cmp eax, 2
jne 0x406bb5
xor eax, eax
mov dl, cl
add dl, 3
xor dl, byte [eax + 0x416022]
xor byte [ecx + 0x416035], dl
inc eax
cmp eax, 2
jne 0x406bce
xor eax, eax
mov dl, cl
add dl, 4
xor dl, byte [eax + 0x416022]
add ecx, 5
xor byte [ecx + 0x416031], dl
inc eax
cmp ecx, 0xf
jl 0x406b61
xor cl, cl
xor eax, eax
mov dl, byte [eax + 0x416033]
add dl, byte [eax + 0x416032]
add eax, 2
add cl, dl
cmp eax, 0xe
jl 0x406bf0
cmp byte [0x416040], cl
jne 0x406da1
cmp byte [0x416033], bl
jne 0x406da1
movzx eax, byte [0x416032]
sub eax, 0xa
je 0x406ca2
sub eax, 0x26
je 0x406c4a
dec eax
jne 0x406ca7
cmp byte [0x416035], bl
setne al
mov byte [0x416054], al
call fcn.004015c0
jmp 0x406da1
movzx ecx, byte [0x416036]
movzx edx, byte [0x416037]
movzx eax, byte [0x416038]
shl ecx, 8
add ecx, edx
movzx edx, byte [0x41603b]
shl ecx, 8
add ecx, eax
movzx eax, byte [0x416039]
mov dword [0x416044], ecx
movzx ecx, byte [0x41603a]
shl eax, 8
add eax, ecx
shl eax, 8
add eax, edx
mov dword [0x416048], eax
mov dword [0x41604c], eax
call fcn.004015c0
jmp 0x406da1
call fcn.00401ca0
call fcn.004015c0
jmp 0x406da1
movzx ecx, cl
push ecx
lea edx, [esp + 0x8c]
push edx
push eax
call fcn.00401540
add esp, 0xc
cmp eax, 0xffffffff
jne 0x406cd5
call fcn.00401ca0
jmp 0x406da7
movzx ecx, byte [0x416033]
cmp eax, ecx
je 0x406cec
call esi
mov dword [0x416050], eax
jmp 0x406da7
call esi
movzx esi, byte [0x416033]
push 0x416022
lea edx, [esp + 0x8c]
push esi
push edx
mov dword [0x416050], eax
call fcn.00401650
xor eax, eax
mov ecx, 0x3f
lea edi, [esp + 0x194]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push esi
lea eax, [esp + 0x198]
push eax
lea ecx, [esp + 0x9c]
push ecx
call fcn.00401c70
add esp, 0x18
xor cl, cl
xor eax, eax
cmp esi, ebx
jle 0x406d4d
add cl, byte [esp + eax + 0x88]
inc eax
cmp eax, esi
jl 0x406d41
cmp byte [0x416034], cl
jne 0x406d80
movzx eax, byte [0x416032]
sub eax, 2
je 0x406d70
sub eax, 0x16
jne 0x406d80
lea edx, [esp + 0x188]
push edx
jmp 0x406d78
lea eax, [esp + 0x188]
push eax
call fcn.00406270
add esp, 4
xor ecx, ecx
mov dword [0x416032], ecx
mov dword [0x416036], ecx
mov dword [0x41603a], ecx
mov word [0x41603e], cx
mov byte [0x416040], cl
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov ecx, dword [0x416024]
sub eax, 0x7530
cmp ecx, eax
ja 0x406f7f
cmp byte [0x416020], 1
jne 0x406f7f
call esi
mov dword [0x416024], eax
mov byte [esp + 0x10], 1
mov byte [esp + 0x11], bl
mov byte [esp + 0x12], bl
call fcn.00408731
and eax, 0x800000ff
jns 0x406df0
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x13], al
call fcn.00408731
and eax, 0x800000ff
jns 0x406e07
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x14], al
call fcn.00408731
and eax, 0x800000ff
jns 0x406e1e
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x15], al
call fcn.00408731
and eax, 0x800000ff
jns 0x406e35
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x16], al
call fcn.00408731
and eax, 0x800000ff
jns 0x406e4c
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x17], al
call fcn.00408731
and eax, 0x800000ff
jns 0x406e63
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x18], al
call fcn.00408731
and eax, 0x800000ff
jns 0x406e7a
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x19], al
call fcn.00408731
and eax, 0x800000ff
jns 0x406e91
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x1a], al
call fcn.00408731
and eax, 0x800000ff
jns 0x406ea8
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x1b], al
xor cl, cl
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], bl
xor eax, eax
jmp 0x406ec0
mov dl, byte [esp + eax + 0x11]
add dl, byte [esp + eax + 0x10]
add eax, 2
add cl, dl
cmp eax, 0xe
jl 0x406ec0
mov byte [esp + 0x1e], cl
xor ecx, ecx
xor eax, eax
lea ebx, [ebx]
cmp eax, 2
jne 0x406ee7
xor eax, eax
mov dl, byte [eax + 0x416022]
xor dl, cl
xor byte [esp + ecx + 0x10], dl
inc eax
cmp eax, 2
jne 0x406efb
xor eax, eax
mov dl, cl
inc dl
xor dl, byte [eax + 0x416022]
xor byte [esp + ecx + 0x11], dl
inc eax
cmp eax, 2
jne 0x406f11
xor eax, eax
mov dl, cl
add dl, 2
xor dl, byte [eax + 0x416022]
xor byte [esp + ecx + 0x12], dl
inc eax
cmp eax, 2
jne 0x406f28
xor eax, eax
mov dl, cl
add dl, 3
xor dl, byte [eax + 0x416022]
xor byte [esp + ecx + 0x13], dl
inc eax
cmp eax, 2
jne 0x406f3f
xor eax, eax
mov dl, cl
add dl, 4
xor dl, byte [eax + 0x416022]
add ecx, 5
xor byte [esp + ecx + 0xf], dl
inc eax
cmp ecx, 0xf
jl 0x406ee0
mov eax, dword [0x416008]
cmp eax, ebx
jbe 0x406f74
push ebx
push 0xf
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [0x4165c4]
cmp eax, 0xf
je 0x406f79
call fcn.00401ca0
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x417392], bl
je 0x4068b0
call fcn.00401ca0
mov ecx, dword [esp + 0x28c]
call fcn.004088de
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret