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 ebx, ebx
push dword [esp + 0x88]
mov dword [esp + 0x20], eax
test edi, edi
mov eax, 0x4211c8
movlpd qword [esp + 0x34], xmm0
cmovne eax, edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], eax
call fcn.00403ded
push dword [esp + 0x88]
lea eax, [esp + 0x40]
push 8
push eax
call fcn.00403db0
add esp, 0x18
test eax, eax
je 0x4039e8
cmp dword [0x415128], ebx
je 0x40364e
push 8
lea eax, [esp + 0x34]
push eax
push ebx
call fcn.00407860
mov ebx, eax
mov dword [esp + 0x10], eax
mov ebp, dword [esp + 0x34]
xor ecx, ecx
mov edx, ebp
and edx, 0x80000000
or ecx, edx
je 0x4038a6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x415138
mov dword [esp + 0x80], eax
call fcn.004086f8
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
and ecx, 0x7fffffff
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x90], ecx
jl 0x4036a4
jg 0x4036b1
test esi, esi
jne 0x4036b1
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
jmp 0x4039cb
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
test ecx, ecx
jg 0x4036c7
jl 0x4036cc
cmp esi, 0x4000
jb 0x4036cc
mov esi, 0x4000
push dword [esp + 0x7c]
push esi
push 0x41d1c8
call fcn.00403db0
add esp, 0xc
test eax, eax
je 0x4039e8
cmp dword [0x415128], 0
je 0x403707
mov eax, dword [esp + 0x10]
push esi
push 0x41d1c8
push eax
call fcn.00407860
mov ebp, eax
mov dword [esp + 0x10], ebp
jmp 0x40370b
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, esi
cdq
sub dword [esp + 0x30], eax
mov dword [0x415154], esi
sbb dword [esp + 0x34], edx
mov esi, dword [esp + 0x18]
mov dword [0x415150], 0x41d1c8
mov dword [0x41515c], ecx
mov ecx, 0x415138
mov dword [0x415158], esi
call fcn.004078cc
mov dword [esp + 0x28], eax
test eax, eax
js 0x40389f
mov eax, dword [0x415158]
sub eax, esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x447114], 1
mov esi, dword [esp + 0x30]
mov dword [esp + 0x24], eax
je 0x403807
mov ecx, eax
sub ecx, dword [esp + 0x80]
cmp ecx, 0xc8
mov ecx, dword [esp + 0x34]
ja 0x403791
mov eax, esi
or eax, ecx
jne 0x40380b
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 0x4037c5
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.00406540
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 0x403884
cmp dword [esp + 0x8c], 0
jne 0x403841
mov esi, dword [esp + 0x18]
push eax
push esi
push dword [esp + 0x90]
call fcn.0040745c
test eax, eax
je 0x40397c
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
jmp 0x403855
mov ecx, dword [esp + 0x14]
mov esi, dword [0x415158]
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 0x40372e
cmp dword [0x415128], 0
je 0x40387b
cmp ebp, dword [esp + 0x94]
jne 0x4039e8
mov eax, ebx
mov edx, edi
jmp 0x4039ee
test ecx, ecx
jl 0x4039cb
jg 0x4036c7
test esi, esi
je 0x4039cb
jmp 0x4036b9
push 0xfffffffffffffffc
jmp 0x4039ea
test edi, edi
jne 0x403980
test ebp, ebp
jl 0x4036a4
mov esi, dword [esp + 0x30]
jg 0x4038c4
test esi, esi
je 0x4036a4
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 0x4038eb
jl 0x4038ed
cmp esi, eax
jb 0x4038ed
mov esi, ecx
push dword [esp + 0x7c]
push esi
push 0x41d1c8
call fcn.00403db0
add esp, 0xc
test eax, eax
je 0x4039e8
cmp dword [0x415128], 0
je 0x403924
mov eax, dword [esp + 0x10]
push esi
push 0x41d1c8
push eax
call fcn.00407860
mov dword [esp + 0x10], eax
push esi
push 0x41d1c8
push dword [esp + 0x90]
call fcn.0040745c
test eax, eax
je 0x40397c
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 0x4038e1
jl 0x4039cb
test esi, esi
jne 0x4038e1
jmp 0x4039cb
push 0xfffffffffffffffe
jmp 0x4039ea
mov eax, dword [esp + 0x90]
cdq
cmp ebp, edx
jg 0x403996
mov esi, dword [esp + 0x30]
jl 0x40399d
cmp esi, eax
jb 0x40399d
mov esi, dword [esp + 0x90]
push dword [esp + 0x7c]
push esi
push edi
call fcn.00403db0
add esp, 0xc
test eax, eax
je 0x4039e8
cmp dword [0x415128], 0
je 0x4039c4
push esi
push edi
push ebx
call fcn.00407860
mov dword [esp + 0x10], eax
mov eax, esi
cdq
mov ebx, eax
mov edi, edx
cmp dword [0x415128], 0
je 0x40387b
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x94]
jmp 0x403875
push 0xfffffffffffffffd
pop eax
or edx, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret 0x1c