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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44eca8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x470600]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
lea eax, [esp + 0x14]
push eax
lea ebx, [ebp + 8]
call fcn.004075ce
mov eax, dword [esp + 0x14]
mov esi, dword [0xff87e8]
xor edi, edi
cmp eax, edi
je 0x403fa8
cmp eax, dword [0xff87d0]
je 0x403fad
call fcn.0043674b
cmp dword [esp + 0x18], esi
jne 0x403fba
xor eax, eax
jmp 0x4041f1
lea esi, [esp + 0x14]
call fcn.00407831
mov ebx, dword [eax + 4]
call fcn.00407831
cmp dword [eax + 8], edi
je 0x403fe1
call fcn.00407831
push dword [eax + 8]
mov ecx, ebx
call fcn.0041e02f
mov ebx, eax
cmp ebx, edi
je 0x403fb3
mov eax, dword [ebp + 0xc]
cmp eax, edi
jne 0x4040ae
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea esi, [esp + 0x14]
mov dword [esp + 0x10], eax
call fcn.00407831
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x10], ecx
call fcn.00407831
mov dword [eax + 0x20], edi
call fcn.0041ebe3
push eax
lea ecx, [esp + 0x14]
call fcn.00409fdf
push 0x1e
lea eax, [esp + 0x14]
push 0x4610a0
push eax
mov dword [esp + 0x34], edi
call fcn.00409ca8
add esp, 0xc
push edi
mov ecx, ebx
call fcn.0041e27e
push dword [esp + 0x10]
mov ecx, ebx
call fcn.0041e19a
call fcn.00407831
cmp dword [eax + 0x14], edi
je 0x404082
call fcn.00407831
push dword [eax + 0x14]
call fcn.00407831
mov ecx, dword [eax + 4]
call fcn.0041e02f
mov ebx, eax
cmp ebx, edi
je 0x404082
call fcn.00407831
add eax, 0x18
push dword [eax]
mov ecx, ebx
call fcn.0041e19a
lea esi, [esp + 0x14]
call fcn.00407831
mov eax, dword [eax + 4]
push edi
push 0x3e8
push 0x44c
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SetTimer]
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffff0
jmp 0x4041d6
xor edi, edi
inc edi
cmp eax, edi
jne 0x4040ed
lea esi, [esp + 0x14]
call fcn.00407831
add eax, 0xc
push dword [eax]
mov ecx, ebx
call fcn.0041e19a
push edi
mov ecx, ebx
call fcn.0041e27e
call fcn.00407831
mov eax, dword [eax + 4]
push 0x44c
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_KillTimer]
jmp 0x4041ee
cmp eax, 2
jne 0x4041dd
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea esi, [esp + 0x14]
mov edi, eax
call fcn.00407831
sub edi, dword [eax + 0x10]
mov ecx, 0x3e8
mov eax, edi
cdq
xor eax, edx
sub eax, edx
cdq
idiv ecx
mov esi, eax
cmp esi, 0x1e
jle 0x404198
lea esi, [esp + 0x14]
call fcn.00407831
add eax, 0xc
push dword [eax]
mov ecx, ebx
call fcn.0041e19a
push 1
mov ecx, ebx
call fcn.0041e27e
call fcn.00407831
mov eax, dword [eax + 4]
push 0x44c
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_KillTimer]
call fcn.00407831
cmp dword [eax + 0x20], 0
jne 0x403fb3
call fcn.00407831
push dword [eax + 0x14]
call fcn.00407831
mov ecx, dword [eax + 4]
call fcn.0041e02f
mov edi, eax
test edi, edi
je 0x403fb3
call fcn.00407831
add eax, 0x1c
push dword [eax]
mov ecx, edi
call fcn.0041e19a
jmp 0x403fb3
call fcn.0041ebe3
push eax
lea ecx, [esp + 0x14]
call fcn.00409fdf
push 0x1e
pop eax
sub eax, esi
push eax
lea eax, [esp + 0x14]
push 0x4610a0
push eax
mov dword [esp + 0x34], 1
call fcn.00409ca8
mov esi, dword [esp + 0x1c]
add esp, 0xc
push esi
mov ecx, ebx
call fcn.0041e19a
lea ecx, [esi - 0x10]
call fcn.0040a004
jmp 0x4041ee
cmp eax, 3
jne 0x4041ee
lea esi, [esp + 0x14]
call fcn.00407831
mov dword [eax + 0x20], edi
xor eax, eax
inc eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret