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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov edi, ecx
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
mov edx, dword [edi + 8]
mov ecx, eax
sub ecx, dword [edi + 0xc]
mov dword [ebp - 8], eax
mov esi, dword [edx*4 + 0x403fc0]
mov ebx, dword [edx*4 + 0x403fa4]
cmp esi, ebx
jae 0x4096a1
test esi, esi
je 0x4096a1
mov eax, ebx
xor edx, edx
sub eax, esi
mov esi, ebx
div dword [ebp + 0xc]
sub esi, eax
mov eax, dword [edi + 8]
cmp ecx, dword [eax*4 + 0x403fa4]
jae 0x4096c7
mov ecx, dword [edi + 8]
mov eax, dword [edi + 8]
mov eax, dword [eax*4 + 0x403fc0]
cmp eax, dword [ecx*4 + 0x403fa4]
jb 0x409868
mov eax, dword [ebp - 8]
xor ebx, ebx
mov dword [edi + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 4], ebx
cmp eax, 0xffffffff
je 0x4096e9
test eax, eax
je 0x4096e9
mov ebx, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
lea ecx, [edi + 0x1c]
call fcn.00413db8
test al, al
jne 0x40971f
push 0
push 0
push 0
push 0
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventW]
mov ecx, dword [edi + 0x1c]
mov dword [ebp - 8], eax
test ecx, ecx
je 0x40971a
cmp ecx, 0xffffffff
je 0x40971a
call fcn.00413c14
mov eax, dword [ebp - 8]
lea ecx, [edi + 0x1c]
mov dword [ecx], eax
call fcn.00413db8
test al, al
je 0x409732
mov eax, dword [ecx]
mov dword [ebp + ebx*4 - 0x10], eax
inc ebx
mov dword [ebp - 4], ebx
test esi, esi
je 0x409868
lea ebx, [ebx]
xor eax, eax
push 1
push eax
push eax
push eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.api_ms_win_rtcore_ntuser_window_l1_1_0.dll_PeekMessageW]
test eax, eax
je 0x40979a
lea ebx, [ebx]
cmp dword [ebp - 0x28], 0x12
je 0x409868
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.api_ms_win_rtcore_ntuser_window_l1_1_0.dll_DispatchMessageW]
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.api_ms_win_rtcore_ntuser_window_l1_1_0.dll_PeekMessageW]
test eax, eax
jne 0x409770
test byte [0x41ff01], 2
je 0x4097ae
push esi
mov edx, 0x404d60
call fcn.0041ae56
push 0x1cff
push esi
push 0
lea eax, [ebp - 0x10]
push eax
push ebx
call dword [sym.imp.api_ms_win_rtcore_ntuser_synch_l1_1_0.dll_MsgWaitForMultipleObjects]
mov ebx, eax
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetTickCount]
test byte [0x41ff01], 2
mov edx, eax
mov dword [ebp - 8], edx
je 0x4097e5
push ebx
mov edx, 0x404d50
call fcn.0041ae56
mov edx, dword [ebp - 8]
mov ecx, dword [edi + 8]
mov eax, dword [edi + 8]
mov eax, dword [eax*4 + 0x403fc0]
cmp eax, dword [ecx*4 + 0x403fa4]
jb 0x409818
lea ecx, [edi + 0x1c]
call fcn.00413db8
test al, al
je 0x40980c
or esi, 0xffffffff
jmp 0x409852
mov eax, dword [edi + 8]
mov esi, dword [eax*4 + 0x403fc0]
jmp 0x409852
mov ecx, dword [edi + 8]
sub edx, dword [edi + 0xc]
mov dword [ebp - 8], edx
mov esi, dword [ecx*4 + 0x403fc0]
test esi, esi
je 0x409843
mov ecx, dword [ecx*4 + 0x403fa4]
xor edx, edx
mov eax, ecx
sub eax, esi
div dword [ebp + 0xc]
mov edx, dword [ebp - 8]
sub ecx, eax
jmp 0x409845
xor ecx, ecx
mov dword [ebp - 8], ecx
cmp edx, dword [ebp - 8]
jae 0x409868
mov esi, dword [ebp - 8]
sub esi, edx
cmp ebx, 0x102
je 0x409877
cmp ebx, dword [ebp - 4]
jae 0x409875
mov eax, dword [ebp + 8]
cmp dword [ebp + ebx*4 - 0x10], eax
jne 0x409877
mov byte [edi + 0x14], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
jne 0x409868
test esi, esi
je 0x409868
mov ebx, dword [ebp - 4]
jmp 0x409740