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

Disassembly:
sub esp, 0x68
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x8c]
mov eax, 0x8000
push dword [esp + 0x7c]
test edi, edi
xorps xmm0, xmm0
push dword [esp + 0x88]
cmovne eax, dword [esp + 0x98]
xor esi, esi
push dword [esp + 0x88]
mov dword [esp + 0x20], eax
test edi, edi
mov eax, 0x42bd18
movlpd qword [esp + 0x34], xmm0
cmovne eax, edi
mov ebx, esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], eax
call fcn.00403e14
push dword [esp + 0x88]
lea eax, [esp + 0x40]
push 8
push eax
call fcn.00403dd7
add esp, 0x18
test eax, eax
je 0x403a0f
cmp dword [0x416148], ebx
je 0x403650
push 8
lea eax, [esp + 0x34]
push eax
push esi
call fcn.00407833
mov ebx, eax
mov dword [esp + 0x10], eax
mov ebp, dword [esp + 0x34]
mov ecx, esi
mov edx, ebp
and edx, 0x80000000
or ecx, edx
je 0x4038cd
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x80], eax
and ecx, 0x7fffffff
mov eax, 0x417d08
mov dword [0x416684], esi
mov dword [0x416680], esi
mov esi, dword [esp + 0x30]
mov dword [0x416168], 8
mov dword [0x41fd10], eax
mov dword [0x41fd0c], eax
mov dword [0x41fd08], 0x41fd08
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x90], ecx
jl 0x4036cb
jg 0x4036d8
test esi, esi
jne 0x4036d8
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
jmp 0x4039f2
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
test ecx, ecx
jg 0x4036ee
jl 0x4036f3
cmp esi, 0x4000
jb 0x4036f3
mov esi, 0x4000
push dword [esp + 0x7c]
push esi
push 0x427d18
call fcn.00403dd7
add esp, 0xc
test eax, eax
je 0x403a0f
cmp dword [0x416148], 0
je 0x40372e
mov eax, dword [esp + 0x10]
push esi
push 0x427d18
push eax
call fcn.00407833
mov ebp, eax
mov dword [esp + 0x10], ebp
jmp 0x403732
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, esi
cdq
sub dword [esp + 0x30], eax
mov dword [0x41615c], esi
sbb dword [esp + 0x34], edx
mov esi, dword [esp + 0x18]
mov dword [0x416158], 0x427d18
push 0x416158
mov dword [0x416160], esi
mov dword [0x416164], ecx
call fcn.00407c7f
mov dword [esp + 0x28], eax
test eax, eax
js 0x4038c6
mov eax, dword [0x416160]
sub eax, esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x454df4], 1
mov esi, dword [esp + 0x30]
mov dword [esp + 0x24], eax
je 0x40382e
mov ecx, eax
sub ecx, dword [esp + 0x80]
cmp ecx, 0xc8
mov ecx, dword [esp + 0x34]
ja 0x4037b8
mov eax, esi
or eax, ecx
jne 0x403832
mov eax, dword [esp + 0x20]
mov edx, eax
sub edx, esi
mov esi, dword [esp + 0x90]
sbb esi, ecx
cmp dword [esp + 0x90], 0
mov ecx, eax
je 0x4037ec
mov eax, dword [esp + 0x90]
shr ecx, 0x18
shl eax, 8
shr edx, 0x18
or ecx, eax
shl esi, 8
or edx, esi
shr ecx, 1
shr edx, 1
push ecx
cmp edx, ecx
push 0x64
cmovb ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [esp + 0x3c]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x38]
push eax
push 0
call fcn.004064f2
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x30]
mov dword [esp + 0x80], eax
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4038ab
cmp dword [esp + 0x8c], 0
jne 0x403868
mov esi, dword [esp + 0x18]
push eax
push esi
push dword [esp + 0x90]
call fcn.0040742f
test eax, eax
je 0x4039a3
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
jmp 0x40387c
mov ecx, dword [esp + 0x14]
mov esi, dword [0x416160]
sub ecx, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], esi
cdq
add ebx, eax
adc edi, edx
cmp dword [esp + 0x28], 1
jne 0x403755
cmp dword [0x416148], 0
je 0x4038a2
cmp ebp, dword [esp + 0x94]
jne 0x403a0f
mov eax, ebx
mov edx, edi
jmp 0x403a15
test ecx, ecx
jl 0x4039f2
jg 0x4036ee
test esi, esi
je 0x4039f2
jmp 0x4036e0
push 0xfffffffffffffffc
jmp 0x403a11
test edi, edi
jne 0x4039a7
cmp ebp, esi
jl 0x4036cb
mov esi, dword [esp + 0x30]
jg 0x4038eb
test esi, esi
je 0x4036cb
mov ecx, dword [esp + 0x14]
mov eax, ecx
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
cdq
mov dword [esp + 0x90], eax
mov dword [esp + 0x8c], edx
cmp ebp, edx
jg 0x403912
jl 0x403914
cmp esi, eax
jb 0x403914
mov esi, ecx
push dword [esp + 0x7c]
push esi
push 0x427d18
call fcn.00403dd7
add esp, 0xc
test eax, eax
je 0x403a0f
cmp dword [0x416148], 0
je 0x40394b
mov eax, dword [esp + 0x10]
push esi
push 0x427d18
push eax
call fcn.00407833
mov dword [esp + 0x10], eax
push esi
push 0x427d18
push dword [esp + 0x90]
call fcn.0040742f
test eax, eax
je 0x4039a3
mov ebp, dword [esp + 0x34]
add ebx, esi
mov ecx, dword [esp + 0x14]
mov eax, esi
mov esi, dword [esp + 0x30]
adc edi, 0
mov edx, dword [esp + 0x8c]
sub esi, eax
mov eax, dword [esp + 0x90]
sbb ebp, 0
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], ebp
test ebp, ebp
jg 0x403908
jl 0x4039f2
test esi, esi
jne 0x403908
jmp 0x4039f2
push 0xfffffffffffffffe
jmp 0x403a11
mov eax, dword [esp + 0x90]
cdq
cmp ebp, edx
jg 0x4039bd
mov esi, dword [esp + 0x30]
jl 0x4039c4
cmp esi, eax
jb 0x4039c4
mov esi, dword [esp + 0x90]
push dword [esp + 0x7c]
push esi
push edi
call fcn.00403dd7
add esp, 0xc
test eax, eax
je 0x403a0f
cmp dword [0x416148], 0
je 0x4039eb
push esi
push edi
push ebx
call fcn.00407833
mov dword [esp + 0x10], eax
mov eax, esi
cdq
mov ebx, eax
mov edi, edx
cmp dword [0x416148], 0
je 0x4038a2
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x94]
jmp 0x40389c
push 0xfffffffffffffffd
pop eax
or edx, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret 0x1c