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

Disassembly:
push 0xffffffffffffffff
push 0x47fb58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ebx, dword [esi + 0x6c]
add ebx, 0x64
mov eax, ebx
mov dword [esi + 0x6c], ebx
push eax
call fcn.0045b892
add esp, 4
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
call fcn.0045b89f
mov edi, eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
imul edi, dword [esp + 0x26]
and edi, 0xffff
call ebp
and eax, 0xffff
shl eax, 0x10
or edi, eax
call fcn.0047af87
mov eax, dword [eax + 4]
push 0
push 0x499a9c
push 0x499458
mov ecx, eax
call fcn.0047b270
mov dword [esp + 0x10], eax
call fcn.0045b89f
mov ebx, eax
test ebx, ebx
jne 0x40d020
mov ebx, 2
mov eax, dword [esp + 0x10]
imul eax, edi
cdq
idiv ebx
mov edi, eax
call ebp
xor edx, edx
div ebx
mov ecx, edx
imul ecx, edx
add ecx, edi
push ecx
lea ecx, [esp + 0x30]
call fcn.00426a80
push 0x1388
push 0xffffec78
lea ecx, [esp + 0x34]
mov dword [esp + 0x5c], 0
call fcn.00426b90
mov eax, dword [esi + 0x58]
test eax, eax
jne case.default.0x40d298
mov ecx, dword [esi + 0x2c]
mov eax, 5
cmp ecx, eax
jne 0x40d088
cmp dword [esi + 0x30], eax
jne 0x40d088
cmp dword [esi + 0x34], eax
jne 0x40d088
cmp dword [esi + 0x38], eax
je case.default.0x40d298
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call edi
push 1
mov ebx, eax
call edi
lea edx, [esp + 0x10]
mov ebp, eax
push edx
call fcn.0042ab00
mov eax, dword [esi + 0x2c]
mov edi, dword [esp + 0x60]
add esp, 4
cmp eax, 4
ja case.default.0x40d0b7
jmp dword [eax*4 + 0x40d3dc]
mov eax, dword [edi]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x10]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
sub eax, ecx
mov dword [esi + 4], eax
jmp case.default.0x40d0b7
mov edx, dword [esp + 0x10]
mov eax, dword [edi]
sub edx, eax
mov dword [esi + 4], edx
jmp case.default.0x40d0b7
lea ecx, [esp + 0x2c]
call fcn.00426bd0
mov dword [esi + 4], eax
mov ecx, dword [edi]
cdq
add ecx, ebx
idiv ecx
mov dword [esi + 4], edx
mov eax, dword [edi]
sub edx, eax
mov dword [esi + 4], edx
jmp case.default.0x40d0b7
lea ecx, [esp + 0x2c]
call fcn.00426bd0
mov ecx, dword [esi + 4]
add ecx, eax
mov dword [esi + 4], ecx
mov eax, ecx
mov ecx, dword [edi]
cdq
add ecx, ebx
idiv ecx
mov ecx, dword [esp + 0x10]
mov eax, edx
mov dword [esi + 4], eax
mov edx, dword [edi]
sub eax, edx
test eax, eax
mov dword [esi + 4], eax
jle 0x40d139
mov edx, ecx
sub edx, dword [edi]
cmp eax, edx
jl case.default.0x40d0b7
cmp ecx, dword [edi]
jg case.0x40d0b7.4
mov dword [esi + 4], 0
mov eax, dword [esi + 0x30]
cmp eax, 4
ja case.default.0x40d150
jmp dword [eax*4 + 0x40d3f0]
mov eax, dword [edi + 4]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x14]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
sub eax, ecx
mov dword [esi + 8], eax
jmp case.default.0x40d150
mov edx, dword [esp + 0x14]
mov eax, dword [edi + 4]
sub edx, eax
mov dword [esi + 8], edx
jmp case.default.0x40d150
lea ecx, [esp + 0x2c]
call fcn.00426bd0
mov ecx, dword [esi + 8]
add ecx, eax
mov dword [esi + 8], ecx
mov eax, ecx
mov ecx, dword [edi + 4]
cdq
add ecx, ebp
idiv ecx
mov dword [esi + 8], edx
mov eax, dword [edi + 4]
sub edx, eax
mov dword [esi + 8], edx
jmp case.default.0x40d150
lea ecx, [esp + 0x2c]
call fcn.00426bd0
mov ecx, dword [esi + 8]
add ecx, eax
mov dword [esi + 8], ecx
mov eax, ecx
mov ecx, dword [edi + 4]
cdq
add ecx, ebp
idiv ecx
mov ecx, dword [esp + 0x14]
mov eax, edx
mov dword [esi + 8], eax
mov edx, dword [edi + 4]
sub eax, edx
test eax, eax
mov dword [esi + 8], eax
jle 0x40d1e0
mov edx, ecx
sub edx, dword [edi + 4]
cmp eax, edx
jl case.default.0x40d150
cmp ecx, dword [edi + 4]
jg case.0x40d150.4
mov dword [esi + 8], 0
mov eax, dword [esi + 0x34]
cmp eax, 4
ja case.default.0x40d1f8
jmp dword [eax*4 + 0x40d404]
mov eax, dword [edi]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x10]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
sub eax, ecx
mov dword [esi + 0xc], eax
jmp case.default.0x40d1f8
mov eax, dword [esp + 0x10]
mov ecx, dword [edi]
sub eax, ecx
mov dword [esi + 0xc], eax
jmp case.default.0x40d1f8
lea ecx, [esp + 0x2c]
call fcn.00426bd0
mov ecx, dword [esi + 0xc]
add ecx, eax
mov dword [esi + 0xc], ecx
mov eax, ecx
mov ecx, dword [edi]
cdq
add ecx, ebx
idiv ecx
mov dword [esi + 0xc], edx
mov eax, dword [edi]
sub edx, eax
mov dword [esi + 0xc], edx
jmp case.default.0x40d1f8
lea ecx, [esp + 0x2c]
call fcn.00426bd0
mov ecx, dword [esi + 0xc]
add ecx, eax
mov dword [esi + 0xc], ecx
mov eax, ecx
mov ecx, dword [edi]
cdq
add ecx, ebx
idiv ecx
mov ecx, dword [esp + 0x10]
mov eax, edx
mov dword [esi + 0xc], eax
mov edx, dword [edi]
sub eax, edx
test eax, eax
mov dword [esi + 0xc], eax
jle 0x40d281
mov edx, ecx
sub edx, dword [edi]
cmp eax, edx
jl case.default.0x40d1f8
cmp ecx, dword [edi]
jg case.0x40d1f8.4
mov dword [esi + 0xc], 0
mov eax, dword [esi + 0x38]
cmp eax, 4
ja case.default.0x40d298
jmp dword [eax*4 + 0x40d418]
mov eax, dword [edi + 4]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x14]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
sub eax, ecx
mov dword [esi + 0x10], eax
jmp case.default.0x40d298
mov eax, dword [esp + 0x14]
mov ecx, dword [edi + 4]
sub eax, ecx
mov dword [esi + 0x10], eax
jmp case.default.0x40d298
lea ecx, [esp + 0x2c]
call fcn.00426bd0
mov ebx, dword [esi + 0x10]
add ebx, eax
mov dword [esi + 0x10], ebx
mov ecx, dword [edi + 4]
mov eax, ebx
add ecx, ebp
cdq
idiv ecx
mov dword [esi + 0x10], edx
mov eax, dword [edi + 4]
sub edx, eax
mov dword [esi + 0x10], edx
jmp case.default.0x40d298
lea ecx, [esp + 0x2c]
call fcn.00426bd0
mov ecx, dword [esi + 0x10]
add ecx, eax
mov dword [esi + 0x10], ecx
mov eax, ecx
mov ecx, dword [edi + 4]
cdq
add ecx, ebp
idiv ecx
mov ecx, dword [esp + 0x14]
mov eax, edx
mov dword [esi + 0x10], eax
mov edx, dword [edi + 4]
sub eax, edx
test eax, eax
mov dword [esi + 0x10], eax
jle 0x40d32a
mov ebx, dword [edi + 4]
mov edx, ecx
sub edx, ebx
cmp eax, edx
jl case.default.0x40d298
cmp ecx, dword [edi + 4]
jg case.0x40d298.4
mov dword [esi + 0x10], 0
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0xc]
cmp eax, ecx
jne 0x40d349
mov dword [esi + 0x5c], 0
jmp 0x40d350
mov dword [esi + 0x5c], 1
mov ecx, dword [esi + 4]
mov eax, dword [esi + 0xc]
cmp ecx, eax
jle 0x40d366
mov eax, dword [esi + 0x1c]
test eax, eax
jle 0x40d366
neg eax
mov dword [esi + 0x1c], eax
mov edx, dword [esi + 4]
mov eax, dword [esi + 0xc]
cmp edx, eax
jge 0x40d37c
mov eax, dword [esi + 0x1c]
test eax, eax
jge 0x40d37c
neg eax
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x10]
cmp eax, ecx
jle 0x40d392
mov eax, dword [esi + 0x20]
test eax, eax
jle 0x40d392
neg eax
mov dword [esi + 0x20], eax
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0x10]
cmp ecx, eax
jge 0x40d3a8
mov eax, dword [esi + 0x20]
test eax, eax
jge 0x40d3a8
neg eax
mov dword [esi + 0x20], eax
mov edx, dword [esi + 4]
mov eax, dword [esi + 8]
mov dword [esi + 0x24], edx
lea ecx, [esp + 0x2c]
mov dword [esi + 0x28], eax
mov dword [esp + 0x54], 0xffffffff
call fcn.00426b10
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x48
ret 4