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

Disassembly:
sub esp, 0xb0
push ebx
push edi
mov edi, dword [esp + 0xcc]
mov eax, 0x8000
push dword [esp + 0xbc]
test edi, edi
xorps xmm0, xmm0
push dword [esp + 0xc8]
cmovne eax, dword [esp + 0xd8]
xor ebx, ebx
push dword [esp + 0xc8]
mov dword [esp + 0x20], eax
test edi, edi
mov eax, 0x4199c8
movlpd qword [esp + 0x24], xmm0
cmovne eax, edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x38], eax
call fcn.00403b80
push dword [esp + 0xc8]
lea eax, [esp + 0x18]
push 8
push eax
call fcn.00403b4b
add esp, 0x18
test eax, eax
jne 0x4033df
push 0xfffffffffffffffd
pop eax
or edx, 0xffffffff
jmp 0x403788
cmp dword [0x40d928], ebx
je 0x4033fb
push 8
lea eax, [esp + 0xc]
push eax
push 0
call fcn.0040732a
mov ebx, eax
mov dword [esp + 0x10], eax
push ebp
mov ebp, dword [esp + 0x10]
xor ecx, ecx
mov edx, ebp
and edx, 0x80000000
or ecx, edx
push esi
je 0x40363d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x40d938
mov dword [esp + 0x28], eax
call fcn.0040818e
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
and ecx, 0x7fffffff
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x30], ecx
jl 0x40344d
jg 0x40345a
test esi, esi
jne 0x40345a
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
jmp 0x403764
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
test ecx, ecx
jg 0x403470
jl 0x403475
cmp esi, 0x4000
jb 0x403475
mov esi, 0x4000
push dword [esp + 0xc4]
push esi
push 0x4159c8
call fcn.00403b4b
add esp, 0xc
test eax, eax
je 0x403740
cmp dword [0x40d928], 0
je 0x4034b3
mov eax, dword [esp + 0x18]
push esi
push 0x4159c8
push eax
call fcn.0040732a
mov ebp, eax
mov dword [esp + 0x18], ebp
jmp 0x4034b7
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, esi
cdq
sub dword [esp + 0x10], eax
mov dword [0x40d954], esi
sbb dword [esp + 0x14], edx
mov esi, dword [esp + 0x34]
mov dword [0x40d950], 0x4159c8
mov dword [0x40d95c], ecx
mov ecx, 0x40d938
mov dword [0x40d958], esi
call fcn.00407396
mov dword [esp + 0x20], eax
test eax, eax
js 0x403636
mov eax, dword [0x40d958]
sub eax, esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x42adf4], 1
mov esi, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
je 0x4035a4
mov ecx, eax
sub ecx, dword [esp + 0x28]
cmp ecx, 0xc8
mov ecx, dword [esp + 0x14]
ja 0x40353a
mov eax, esi
or eax, ecx
jne 0x4035a8
mov eax, dword [esp + 0x38]
mov edx, eax
sub edx, esi
mov esi, dword [esp + 0x30]
sbb esi, ecx
cmp dword [esp + 0x30], 0
mov ecx, eax
je 0x403565
mov eax, dword [esp + 0x30]
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 + 0x44]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [esp + 0x40]
push eax
push 0
call fcn.00406222
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40361b
cmp dword [esp + 0xd4], 0
jne 0x4035de
mov esi, dword [esp + 0x34]
push eax
push esi
push dword [esp + 0xd8]
call fcn.00406f16
test eax, eax
je 0x40370a
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
jmp 0x4035f2
mov ecx, dword [esp + 0x1c]
mov esi, dword [0x40d958]
sub ecx, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x34], esi
cdq
add ebx, eax
adc edi, edx
cmp dword [esp + 0x20], 1
jne 0x4034da
cmp dword [0x40d928], 0
je 0x403782
cmp ebp, dword [esp + 0xdc]
jmp 0x403778
test ecx, ecx
jl 0x403764
jg 0x403470
test esi, esi
je 0x403764
jmp 0x403462
push 0xfffffffffffffffc
jmp 0x403742
test edi, edi
jne 0x40370e
test ebp, ebp
jl 0x40344d
mov esi, dword [esp + 0x10]
jg 0x40365b
test esi, esi
je 0x40344d
mov ecx, dword [esp + 0x1c]
mov eax, ecx
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
cdq
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
cmp ebp, edx
jg 0x40367c
jl 0x40367e
cmp esi, eax
jb 0x40367e
mov esi, ecx
push dword [esp + 0xc4]
push esi
push 0x4159c8
call fcn.00403b4b
add esp, 0xc
test eax, eax
je 0x403740
cmp dword [0x40d928], 0
je 0x4036b8
mov eax, dword [esp + 0x18]
push esi
push 0x4159c8
push eax
call fcn.0040732a
mov dword [esp + 0x18], eax
push esi
push 0x4159c8
push dword [esp + 0xd8]
call fcn.00406f16
test eax, eax
je 0x40370a
mov ebp, dword [esp + 0x14]
add ebx, esi
mov ecx, dword [esp + 0x1c]
mov eax, esi
mov esi, dword [esp + 0x10]
adc edi, 0
mov edx, dword [esp + 0x28]
sub esi, eax
mov eax, dword [esp + 0x2c]
sbb ebp, 0
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], ebp
test ebp, ebp
jg 0x403672
jl 0x403764
test esi, esi
jne 0x403672
jmp 0x403764
push 0xfffffffffffffffe
jmp 0x403742
mov eax, dword [esp + 0xd8]
cdq
cmp ebp, edx
jg 0x403724
mov esi, dword [esp + 0x10]
jl 0x40372b
cmp esi, eax
jb 0x40372b
mov esi, dword [esp + 0xd8]
push dword [esp + 0xc4]
push esi
push edi
call fcn.00403b4b
add esp, 0xc
test eax, eax
jne 0x403748
push 0xfffffffffffffffd
pop eax
or edx, 0xffffffff
jmp 0x403786
cmp dword [0x40d928], 0
je 0x40375d
push esi
push edi
push ebx
call fcn.0040732a
mov dword [esp + 0x18], eax
mov eax, esi
cdq
mov ebx, eax
mov edi, edx
cmp dword [0x40d928], 0
je 0x403782
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0xdc]
je 0x403782
push 0xfffffffffffffffd
or edx, 0xffffffff
pop eax
jmp 0x403786
mov edx, edi
mov eax, ebx
pop esi
pop ebp
pop edi
pop ebx
add esp, 0xb0
ret 0x1c