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

Disassembly:
push 0xffffffffffffffff
push 0x417e98
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42202c]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov edi, dword [esp + 0x34]
lea esi, [edi + 0x2c]
push esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], 1
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add edi, 0x1c
mov dword [esp + 0x2c], 0
mov eax, dword [edi + 4]
test eax, eax
je 0x40851d
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x408523
push esi
jmp 0x40867a
mov esi, dword [edi + 8]
cmp eax, esi
mov ebp, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
jbe 0x408532
call ebp
mov ebx, dword [edi + 4]
cmp ebx, dword [edi + 8]
jbe 0x40853c
call ebp
cmp edi, edi
je 0x408542
call ebp
mov edx, esi
sub edx, ebx
sar edx, 2
push edx
push esi
push ebx
call fcn.004086a0
mov eax, dword [edi + 4]
add esp, 0xc
test eax, eax
je 0x408565
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x408567
call ebp
mov edx, dword [edi + 4]
mov eax, dword [edx]
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [eax + 8]
call ebp
cmp eax, esi
jb 0x40861d
mov eax, dword [edi + 4]
test eax, eax
je 0x408590
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x408596
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [edi + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 8]
mov eax, edx
test eax, eax
je 0x4085ae
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x4085b4
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [edi + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
call ebp
sub eax, ebx
cmp eax, esi
ja 0x40861d
mov eax, dword [edi + 4]
test eax, eax
je 0x4085d5
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x4085db
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [edi + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov eax, edx
test eax, eax
je 0x4085f3
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x4085f9
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [edi + 4]
mov eax, dword [edx]
mov esi, dword [eax + 8]
call ebp
push 0
lea ecx, [esi + ebx]
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + 0xc]
push 0x64
push edx
call dword [sym.imp.USER32.dll_SetTimer]
jmp 0x408675
mov eax, dword [edi + 4]
test eax, eax
je 0x40862e
mov ecx, dword [edi + 8]
sub ecx, eax
sar ecx, 2
jne 0x408634
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [edi + 4]
mov eax, dword [esp + 0x34]
mov esi, dword [edx]
push eax
call fcn.00408240
mov esi, dword [edi + 4]
cmp esi, dword [edi + 8]
jbe 0x408651
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [edi + 8]
lea ecx, [esi + 4]
sub eax, ecx
sar eax, 2
test eax, eax
jle 0x408671
add eax, eax
add eax, eax
push eax
push ecx
push eax
push esi
call dword [sym.imp.MSVCR80.dll_memmove_s]
add esp, 0x10
add dword [edi + 8], 0xfffffffc
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 4