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

Disassembly:
push 0xffffffffffffffff
push 0x4cc51b
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x4eadc8]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4eadc8]
xor eax, esp
push eax
lea eax, [esp + 0x15c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x16c]
mov dword [esp + 0x1c], eax
call fcn.00483cb0
call dword [sym.imp.winmm.dll_timeGetTime]
mov ecx, dword [0x4fa670]
mov esi, dword [ecx + 0x18]
mov dword [esp + 0x30], eax
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x4058f9
mov ecx, dword [eax]
mov edx, dword [ecx + 0x60]
push eax
call edx
test eax, eax
jge 0x4058f9
mov eax, dword [esi]
mov ecx, dword [eax + 0x64]
push esi
call ecx
test byte [0x68999c], 1
mov esi, dword [sym.imp.kernel32.dll_GetTickCount]
mov edi, 1
jne 0x40591a
or dword [0x68999c], edi
call esi
mov dword [0x689998], eax
call esi
fld qword [0x4e1218]
fld1
mov esi, eax
mov ebx, esi
sub ebx, dword [0x689998]
add dword [0x4fa68c], ebx
add dword [0x4fa688], edi
mov dword [esp + 0x34], ebx
mov edi, 0x516a18
mov ebp, dword [edi]
test ebp, ebp
je 0x40597e
mov edx, ebx
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
test edx, edx
jge 0x40595d
fadd dword [0x4e11d0]
fdiv st(2)
movsx eax, word [ebp + 0x2ec]
mov dword [esp + 0x14], eax
fsubr st(1)
fild dword [esp + 0x14]
fmulp st(1)
call fcn.004c63a0
mov word [ebp + 0x2ec], ax
add edi, 4
cmp edi, 0x516e18
jl 0x405943
mov eax, dword [esp + 0x1c]
fstp st(1)
mov byte [eax + 0x12dc], 0
fstp st(0)
mov ecx, dword [eax + 0x432f8]
mov dword [eax + 0x43318], ecx
xor ecx, ecx
mov dword [0x689998], esi
mov dword [esp + 0x18], 1
mov dword [eax + 0x4272c], ecx
mov dword [eax + 0x42730], ecx
cmp byte [0x6391a2], cl
je 0x4059cf
xor eax, eax
jmp 0x406018
mov ecx, dword [0x63921c]
call fcn.0048a2d0
mov ecx, dword [0x63921c]
xor ebp, ebp
push ebp
push ebp
call fcn.0048a500
mov ecx, dword [0x639220]
push ebp
push ebp
call fcn.0048a500
mov ecx, dword [0x639224]
push ebp
push ebp
call fcn.0048a500
mov ecx, dword [0x639220]
push 1
call fcn.0048a3b0
test eax, eax
je 0x405a5e
mov ecx, dword [0x639220]
call fcn.0048a3f0
movzx eax, byte [eax]
sub eax, ebp
je 0x405a51
sub eax, 0xfa
je 0x405b46
sub eax, 3
jne 0x405a5e
mov ecx, dword [0x639220]
push 0xfd
call fcn.00489fd0
mov ecx, dword [0x639220]
call fcn.0048a2d0
mov ecx, dword [0x639220]
push 1
call fcn.0048a670
mov esi, dword [esp + 0x1c]
mov eax, esi
call fcn.0041a9f0
test eax, eax
jne 0x405a62
cmp byte [0x4f7900], al
je 0x405c28
call fcn.00483770
cmp byte [0x4f6cca], 0
je 0x405a98
mov byte [0x4f6cca], 0
call fcn.00406190
call fcn.00444330
cmp dword [0x680bd0], ebp
je 0x405aae
mov byte [0x4f6cc3], 0
mov byte [0x4f6cc5], 0
call fcn.00483940
mov dword [esi + 0x127c], eax
cmp byte [0x680bc4], 0
je 0x405c17
cmp byte [0x4f6c06], 0
je 0x405b80
cmp byte [0x4fa694], 0
jne 0x405b87
mov eax, dword [0x68910c]
mov ebx, dword [eax + 0x1c]
mov ebp, dword [eax + 4]
lea edi, [eax + 4]
lea edx, [esp + 0x14]
mov esi, eax
push edx
lea eax, [esp + 0x50]
push eax
mov byte [0x4fa694], 1
mov dword [esp + 0x1c], 0x1f5
call fcn.0046e420
mov edi, eax
test ebp, ebp
je 0x405b18
cmp ebp, dword [edi]
je 0x405b1d
call fcn.0048dc57
cmp ebx, dword [edi + 4]
je 0x405b87
push 0x1f5
mov ecx, esi
call fcn.0046d6f0
test eax, eax
je 0x405b87
mov eax, dword [eax + 0x20]
test eax, eax
je 0x405b87
push 0
push 0
mov ecx, eax
call fcn.0048bdd0
jmp 0x405b87
mov ecx, dword [0x639220]
push 1
call fcn.0048a670
call fcn.00417c50
test eax, eax
je 0x405a5e
mov ecx, dword [0x639220]
push 0xfe
call fcn.00489fd0
mov ecx, dword [0x639220]
call fcn.0048a2d0
jmp 0x405a5e
mov byte [0x4fa694], 0
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x127c]
cmp eax, 0x20
je 0x405bbb
cmp eax, 9
je 0x405bbb
cmp eax, 0x20
jle 0x405c17
cmp eax, 0x7d
jge 0x405c17
mov eax, dword [0x68910c]
lea edx, [esp + 0x14]
mov esi, eax
lea edi, [eax + 4]
push edx
lea eax, [esp + 0x24]
push eax
jmp 0x405bcf
mov eax, dword [0x68910c]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x24]
mov esi, eax
lea edi, [eax + 4]
push edx
mov ebx, dword [edi + 0x18]
mov ebp, dword [edi]
mov dword [esp + 0x1c], 0x1f6
call fcn.0046e420
mov edi, eax
test ebp, ebp
je 0x405beb
cmp ebp, dword [edi]
je 0x405bf0
call fcn.0048dc57
cmp ebx, dword [edi + 4]
je 0x405c17
push 0x1f6
mov ecx, esi
call fcn.0046d6f0
test eax, eax
je 0x405c17
mov eax, dword [eax + 0x20]
test eax, eax
je 0x405c17
push 0
push 0
mov ecx, eax
call fcn.0048bdd0
call fcn.00489f10
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x34]
xor ebp, ebp
jmp 0x405c3b
push 0x100
push ebp
push 0x4f6bf8
call fcn.00493ca0
add esp, 0xc
lea ecx, [esi + 0x4331c]
mov edi, 0xf0
mov eax, dword [ecx]
cmp eax, ebp
je 0x405c68
mov edx, dword [eax + 0x17c]
cmp edx, ebp
jbe 0x405c68
cmp edx, ebx
jbe 0x405c62
sub dword [eax + 0x17c], ebx
jmp 0x405c68
mov dword [eax + 0x17c], ebp
add ecx, 4
sub edi, 1
jne 0x405c46
lea ecx, [esi + 0x436dc]
mov edi, 0xf0
jmp 0x405c80
mov eax, dword [ecx]
cmp eax, ebp
je 0x405ca2
mov edx, dword [eax + 0x17c]
cmp edx, ebp
jbe 0x405ca2
cmp edx, ebx
jbe 0x405c9c
sub dword [eax + 0x17c], ebx
jmp 0x405ca2
mov dword [eax + 0x17c], ebp
add ecx, 4
sub edi, 1
jne 0x405c80
xor edx, edx
lea ecx, [esi + 0x42b38]
lea edi, [edx + 1]
cmp byte [esi + edx + 0x4274e], 0
je 0x405cd1
mov eax, dword [ecx]
cmp eax, ebp
je 0x405cd1
cmp eax, ebx
jbe 0x405ccf
sub eax, ebx
mov dword [ecx], eax
jmp 0x405cd1
mov dword [ecx], ebp
add edx, edi
add ecx, 4
cmp edx, 0xc8
jl 0x405cb5
movzx eax, byte [esi + 0x202]
dec eax
cmp eax, 6
ja case.0x405ceb.5
jmp dword [eax*4 + 0x406044]
mov ecx, esi
call fcn.00408020
jmp 0x405d18
mov ecx, esi
call fcn.00406660
jmp 0x405d18
mov dword [esp + 0x18], edi
jmp case.0x405ceb.5
call fcn.004087b0
jmp 0x405d18
mov eax, esi
call fcn.00408660
mov dword [esp + 0x18], eax
cmp byte [0x4f6c15], 0
je 0x405d3b
push ebp
push 0x19
call fcn.004838e0
add esp, 8
test eax, eax
je 0x405d3b
mov byte [0x4f6caf], 0
push ebp
push 0xb7
call fcn.004838e0
add esp, 8
test eax, eax
je 0x405da1
mov eax, dword [0x4fa698]
cmp eax, 0x14
jl 0x405d59
xor eax, eax
mov ecx, eax
add eax, edi
push ecx
mov dword [0x4fa698], eax
lea eax, [esp + 0x58]
push 0x4dba3c
push eax
call fcn.0048dc72
add esp, 0xc
lea ecx, [esp + 0x54]
push ecx
mov ecx, dword [0x4efb90]
call fcn.0047dad0
test al, al
je 0x405da1
lea edx, [esp + 0x54]
push edx
mov edi, 0x4dba48
call fcn.004021e0
push eax
call fcn.00441d90
add esp, 8
cmp byte [esi + 0x1f5f], 0
lea edi, [esi + 0x1f5f]
je 0x405e05
mov eax, dword [0x6391d8]
mov ecx, dword [0x4efb90]
push eax
push ecx
lea ecx, [esp + 0x40]
call fcn.00489780
push 0x193219
push 0xc8ffc8
lea ecx, [esp + 0x40]
mov dword [esp + 0x16c], ebp
call fcn.00483ce0
push edi
push 0x1b2
push 0x1e
lea ecx, [esp + 0x44]
call fcn.00487220
lea ecx, [esp + 0x38]
mov dword [esp + 0x164], 0xffffffff
call fcn.004897b0
mov eax, dword [esi + 0x42718]
cmp eax, ebp
je 0x405e2c
mov edx, dword [0x4f78ec]
mov ecx, dword [0x4f78e8]
push 0xa
push eax
push edx
add ecx, 0x14
xor eax, eax
call fcn.004706a0
add esp, 0xc
cmp byte [0x6391d3], 0
je 0x405f61
mov eax, dword [0x4fa670]
mov ebp, dword [eax + 4]
mov eax, dword [eax + 8]
mov edi, dword [0x4eea8c]
mov dword [esp + 0x14], eax
mov eax, edi
cmp edi, 4
jb 0x405e5a
mov eax, 4
mov ebx, dword [0x4eea90]
mov esi, dword [0x4eea7c]
mov edx, esi
cmp ebx, 0x10
jae 0x405e72
mov edx, 0x4eea7c
mov ecx, 0x4dba70
call fcn.00401de0
test eax, eax
jne 0x405ea1
cmp edi, 4
jb 0x405ea1
cmp edi, 4
setne al
test eax, eax
jne 0x405ea1
mov ecx, dword [0x516e24]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
xor ebx, ebx
jmp 0x405ef9
mov eax, edi
cmp edi, 7
jb 0x405ead
mov eax, 7
mov edx, esi
cmp ebx, 0x10
jae 0x405eb9
mov edx, 0x4eea7c
mov ecx, 0x4dba78
call fcn.00401de0
xor ebx, ebx
cmp eax, ebx
jne 0x405ef1
cmp edi, 7
jb 0x405ef1
xor eax, eax
cmp edi, 7
setne al
cmp eax, ebx
jne 0x405ef1
mov eax, dword [0x516e20]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ecx
jmp 0x405f01
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x2c], edx
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi + 0x42730]
mov eax, dword [esi + 0x43318]
add ecx, dword [0x4f78ec]
mov edx, dword [esi + 0x4272c]
add edx, dword [0x4f78e8]
push eax
push ecx
mov ecx, dword [0x4efb90]
push edx
mov dword [esp + 0x34], ebp
call fcn.0047bee0
mov ecx, dword [0x4efb90]
push 0x1e
call fcn.0047aaf0
movzx ecx, byte [0x4f9a14]
movzx edx, byte [0x4ed266]
lea eax, [esp + 0x20]
push eax
push ecx
push edx
call fcn.0047adf0
add esp, 0xc
jmp 0x405fbd
mov ecx, dword [esi + 0x42730]
mov eax, dword [esi + 0x43318]
add ecx, dword [0x4f78ec]
mov edx, dword [esi + 0x4272c]
add edx, dword [0x4f78e8]
push eax
push ecx
mov ecx, dword [0x4efb90]
push edx
call fcn.0047bee0
mov ecx, dword [0x4efb90]
push 0x1e
call fcn.0047aaf0
movzx eax, byte [0x4f9a14]
movzx ecx, byte [0x4ed266]
push 0x4ea66c
push eax
push ecx
call fcn.0047aee0
mov esi, dword [esp + 0x28]
add esp, 0xc
xor ebx, ebx
cmp byte [0x4f7900], 0
jne 0x405fcf
mov dword [esi + 0x14], 0x32
jmp 0x405feb
cmp byte [esi + 0x10], 0
setne al
mov byte [esi + 0x10], al
dec al
movzx edx, al
neg edx
sbb edx, edx
and edx, 0xffffffe4
add edx, 0x28
mov dword [esi + 0x14], edx
call dword [sym.imp.winmm.dll_timeGetTime]
sub eax, dword [esp + 0x30]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jae 0x406001
sub ecx, eax
push ecx
jmp 0x406003
push 1
call dword [sym.imp.kernel32.dll_Sleep]
call fcn.00483cd0
mov eax, dword [esp + 0x18]
mov dword [0x4f78f0], ebx
mov ecx, dword [esp + 0x15c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.0048d5a8
add esp, 0x154
ret 4