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

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 8
add esp, 0xfffff004
push eax
dec eax
jne 0x405ac9
add esp, 0xffffffe0
mov eax, dword [ebp - 4]
mov ax, word [0x5025fc]
push ebx
push esi
push edi
mov word [ebp - 0xf], ax
mov al, byte [0x5025fe]
mov byte [ebp - 0xd], al
lea eax, [ebp - 0x8014]
xor esi, esi
mov byte [eax], 0
inc esi
inc eax
cmp esi, 0x8000
jl 0x405af8
call fcn.004a2ec0
mov dword [ebp - 0xc], eax
xor ebx, ebx
mov eax, dword [ebp + 0x24]
xor edx, edx
mov dword [eax], edx
lea eax, [ebp - 0x8024]
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 0x39], 0
mov byte [ebp - 5], 0
push 0x10
push 0
push eax
call fcn.0049af44
add esp, 0xc
xor esi, esi
lea edx, [ebp - 0x8024]
lea eax, [ebp - 0xf]
mov cl, byte [eax]
mov byte [edx], cl
inc esi
inc edx
inc eax
cmp esi, 3
jl 0x405b3f
push 1
call sub.KERNEL32.DLL_Sleep
call fcn.00403fd0
mov eax, dword [ebp + 0xc]
cmp byte [eax + 0x39], 0
je 0x405b68
or eax, 0xffffffff
jmp 0x405d9c
cmp byte [ebp - 5], 0
jne 0x405c4a
push 0x2000
push ebx
lea edx, [ebp - 0x8014]
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.00403618
add esp, 0x10
mov ebx, eax
xor eax, eax
xor esi, esi
lea edx, [ebp - 0x8014]
jmp 0x405bba
mov ecx, eax
mov edi, dword [ebp + 0x10]
inc eax
movzx ecx, byte [edi + ecx]
movzx edi, byte [edx]
and edi, 0xff
and ecx, 0xff
cmp ecx, edi
je 0x405bb8
xor eax, eax
inc esi
inc edx
cmp ebx, esi
jle 0x405bc3
cmp eax, dword [ebp + 0x14]
jl 0x405b99
cmp eax, dword [ebp + 0x14]
jne 0x405d24
mov edx, ebx
sub edx, esi
cmp edx, dword [ebp + 0x1c]
jl 0x405d24
xor edx, edx
lea eax, [ebp + esi - 0x8014]
jmp 0x405c05
mov ecx, edx
mov edi, dword [ebp + 0x18]
inc edx
movzx ecx, byte [edi + ecx]
movzx edi, byte [eax]
and edi, 0xff
and ecx, 0xff
cmp ecx, edi
je 0x405c03
xor edx, edx
inc esi
inc eax
cmp ebx, esi
jle 0x405c0e
cmp edx, dword [ebp + 0x1c]
jl 0x405be4
cmp edx, dword [ebp + 0x1c]
jne 0x405d24
mov byte [ebp - 5], 1
xor eax, eax
lea ecx, [ebp - 0x8014]
mov dword [ebp - 0x14], ecx
lea edx, [ebp + esi - 0x8014]
jmp 0x405c3b
mov cl, byte [edx]
mov edi, dword [ebp - 0x14]
mov byte [edi], cl
inc eax
inc dword [ebp - 0x14]
inc edx
mov ecx, ebx
sub ecx, esi
cmp eax, ecx
jl 0x405c2f
sub ebx, esi
jmp 0x405d24
push 0x800
push 0x800
push ebx
lea eax, [ebp - 0x8014]
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00403678
add esp, 0x14
mov ebx, eax
xor eax, eax
mov edx, dword [ebp + 0x20]
mov esi, edx
lea edx, [ebp - 0x8014]
cmp ebx, eax
jle 0x405c8e
mov ecx, dword [ebp + 0x24]
inc eax
mov ecx, dword [ecx]
lea edi, [esi + ecx]
mov cl, byte [edx]
inc edx
inc esi
cmp ebx, eax
mov byte [edi], cl
jg 0x405c7b
mov eax, dword [ebp + 0x24]
add dword [eax], ebx
xor edx, edx
xor esi, esi
mov eax, dword [ebp + 0x20]
dec eax
jmp 0x405ceb
cmp edx, 1
jne 0x405cb2
mov cl, byte [eax]
cmp cl, byte [eax + 1]
jne 0x405cc6
cmp cl, 0x45
jne 0x405cc6
xor edx, edx
jmp 0x405cc6
cmp edx, 2
jne 0x405cc6
mov cl, byte [eax - 1]
cmp cl, byte [eax + 1]
jne 0x405cc6
cmp cl, 0x45
jne 0x405cc6
xor edx, edx
xor ecx, ecx
xor ebx, ebx
mov bl, byte [ebp + edx - 0x8024]
mov cl, byte [eax + 1]
and ecx, 0xff
and ebx, 0xff
cmp ecx, ebx
je 0x405ce8
xor edx, edx
jmp 0x405ce9
inc edx
inc esi
inc eax
mov ecx, dword [ebp + 0x24]
cmp esi, dword [ecx]
jge 0x405cf7
cmp edx, 0x10
jl 0x405c9d
cmp edx, 0x10
jne 0x405d22
add esi, 0xfffffff0
mov eax, dword [ebp + 0x24]
mov dword [eax], esi
push 0x8000
push 0
lea edx, [ebp - 0x8014]
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.00403618
add esp, 0x10
xor eax, eax
jmp 0x405d9c
xor ebx, ebx
call fcn.004a2ec0
sub eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x28]
jle 0x405b4b
call fcn.004a2ec0
mov dword [ebp - 0xc], eax
push 0x8000
lea eax, [ebp - 0x8014]
push 0
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00403618
add esp, 0x10
mov ebx, eax
test ebx, ebx
jle 0x405d97
xor eax, eax
mov edx, dword [ebp + 0x20]
mov esi, edx
lea edx, [ebp - 0x8014]
cmp ebx, eax
jle 0x405d81
mov ecx, dword [ebp + 0x24]
inc eax
mov ecx, dword [ecx]
lea edi, [esi + ecx]
mov cl, byte [edx]
inc edx
inc esi
cmp ebx, eax
mov byte [edi], cl
jg 0x405d6e
mov eax, dword [ebp + 0x24]
add dword [eax], ebx
call fcn.004a2ec0
sub eax, dword [ebp - 0xc]
cmp eax, 0x3e8
jg 0x405d97
jmp 0x405d3d
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret