Function at 0x402940
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 8
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.00450a42
mov ecx, dword [eax + 4]
call fcn.0043a051
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov ecx, esi
call fcn.00408940
mov ecx, esi
call fcn.004080b0
mov ecx, esi
call fcn.00403c80
mov edx, dword [esi + 0x170]
xor ebx, ebx
shl edx, 1
test edx, edx
mov dword [esi + 0x180], ebx
mov dword [esi + 0x174], ebx
jle 0x402d32
mov edi, 1
mov eax, dword [esi + 0x174]
inc eax
and eax, 0x80000001
jns 0x4029b9
dec eax
or eax, 0xfffffffe
inc eax
cmp eax, edi
jne 0x4029e8
mov ecx, esi
call fcn.00403110
mov ecx, dword [esi + 0x140]
cmp dword [ecx + 0x14], edi
jne 0x4029d6
mov ecx, esi
call fcn.004033e0
mov edx, dword [esi + 0x140]
cmp dword [edx + 0x10], edi
jne 0x4029e8
mov ecx, esi
call fcn.00403b40
mov eax, dword [esi + 0x174]
inc eax
and eax, 0x80000001
jns 0x4029fb
dec eax
or eax, 0xfffffffe
inc eax
jne 0x402a26
mov ecx, dword [esi + 0x140]
cmp dword [ecx + 0xc], edi
jne 0x402d15
mov ecx, esi
call fcn.004036b0
cmp dword [esi + 0x88df8], ebx
je 0x402d15
mov ecx, esi
call fcn.00403960
mov eax, dword [esi + 0x178]
mov dword [esi + 0x17c], ebx
cmp eax, ebx
jle 0x402cfa
mov eax, dword [esi + 0x184]
mov dword [esi + 0x188], ebx
cmp eax, ebx
jle 0x402c15
mov ecx, esi
call fcn.00403d00
mov edx, dword [esi + 0x174]
inc edx
and edx, 0x80000001
jns 0x402a69
dec edx
or edx, 0xfffffffe
inc edx
cmp edx, edi
jne 0x402abc
mov eax, dword [esi + 0x140]
cmp dword [eax + 4], edi
jne 0x402a7f
mov ecx, esi
call fcn.00403e20
mov ecx, dword [esi + 0x140]
cmp dword [ecx + 8], edi
jne 0x402a91
mov ecx, esi
call fcn.00403ea0
mov edx, dword [esi + 0x140]
cmp dword [edx + 0x14], edi
jne 0x402aa3
mov ecx, esi
call fcn.00403f10
mov eax, dword [esi + 0x140]
cmp dword [eax + 0x10], edi
jne 0x402abc
mov ecx, esi
call fcn.00404050
mov ecx, esi
call fcn.00407900
mov ecx, dword [esi + 0x174]
inc ecx
and ecx, 0x80000001
jns 0x402ad0
dec ecx
or ecx, 0xfffffffe
inc ecx
jne 0x402ae0
mov ecx, esi
call fcn.00403fa0
mov ecx, esi
call fcn.00407900
mov eax, dword [esi + 0xf8]
mov dword [esi + 0xe8], ebx
cmp eax, ebx
jle 0x402b3c
mov ecx, esi
call fcn.0040b360
mov ecx, esi
call fcn.0040b700
fst qword [esi + 0xe0]
fcomp qword [esi + 0xf0]
fnstsw ax
test ah, 1
jne 0x402b3c
mov ecx, dword [esi + 0x138]
call fcn.00401cc0
mov ecx, esi
call fcn.0040b780
mov edx, dword [esi + 0xe8]
mov ecx, dword [esi + 0xf8]
inc edx
mov eax, edx
mov dword [esi + 0xe8], edx
cmp eax, ecx
jl 0x402af0
cmp dword [esi + 0x174], ebx
jne 0x402b5b
cmp dword [esi + 0x17c], ebx
jne 0x402b5b
cmp dword [esi + 0x188], ebx
jne 0x402b5b
mov ecx, esi
call fcn.00407dc0
mov ecx, esi
call fcn.004040e0
mov edx, dword [esi + 0x188]
mov eax, dword [esi + 0x214]
fst qword [esi + 0x198]
fstp qword [eax + edx*8]
mov ecx, dword [esi + 0x180]
mov edx, dword [esi + 0x198]
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [eax + eax*4]
mov eax, dword [esi + 0x188]
add ecx, eax
mov dword [esi + ecx*8 + 0x218], edx
mov eax, dword [esi + 0x19c]
mov dword [esi + ecx*8 + 0x21c], eax
fld qword [esi + 0x198]
fcomp qword [0x467a20]
fnstsw ax
test ah, 1
jne 0x402be5
cmp dword [esi + 0x1a8], ebx
je 0x402be5
mov edx, dword [esi + 0x188]
mov ecx, dword [esi + 0x184]
inc edx
mov eax, edx
mov dword [esi + 0x188], edx
cmp eax, ecx
jl 0x402a4e
jmp 0x402c15
mov ecx, dword [esi + 0x188]
mov eax, dword [esi + 0x198]
mov edx, dword [esi + 0x17c]
mov dword [esi + 0x18c], ecx
mov ecx, dword [esi + 0x19c]
mov dword [esi + 0x1a0], eax
mov dword [esi + 0x190], edx
mov dword [esi + 0x1a4], ecx
fld qword [esi + 0x198]
fcomp qword [0x467a20]
fnstsw ax
test ah, 1
jne 0x402cfa
cmp dword [esi + 0x1a8], ebx
je 0x402cfa
mov edx, dword [esi + 0x174]
inc edx
and edx, 0x80000001
jns 0x402c4c
dec edx
or edx, 0xfffffffe
inc edx
cmp edx, edi
jne 0x402c57
mov ecx, esi
call fcn.00404490
mov eax, dword [esi + 0x174]
inc eax
and eax, 0x80000001
jns 0x402c6a
dec eax
or eax, 0xfffffffe
inc eax
jne 0x402c73
mov ecx, esi
call fcn.00404c40
mov edx, dword [esi + 0x180]
mov ecx, dword [esi + 0x184]
mov ebp, dword [esi + 0x210]
lea eax, [edx*8]
sub eax, edx
lea edx, [ecx + eax*4]
add eax, edx
mov edx, dword [ebp + ecx*8]
mov dword [esi + eax*8 + 0x218], edx
mov ecx, dword [ebp + ecx*8 + 4]
mov dword [esi + eax*8 + 0x21c], ecx
mov ecx, dword [esi + 0x180]
fild dword [esi + 0x1a8]
lea eax, [ecx*8]
sub eax, ecx
lea edx, [eax + eax*4]
mov eax, dword [esi + 0x184]
add edx, eax
fstp qword [esi + edx*8 + 0x220]
mov ebp, dword [esi + 0x180]
mov edx, dword [esi + 0x17c]
mov ecx, dword [esi + 0x178]
inc ebp
inc edx
mov dword [esi + 0x180], ebp
mov eax, edx
mov dword [esi + 0x17c], edx
cmp eax, ecx
jl 0x402a3a
fld qword [esi + 0x198]
fcomp qword [0x467a20]
fnstsw ax
test ah, 1
jne 0x402d32
cmp dword [esi + 0x1a8], ebx
je 0x402d32
mov eax, dword [esi + 0x174]
mov ecx, dword [esi + 0x170]
inc eax
shl ecx, 1
cmp eax, ecx
mov dword [esi + 0x174], eax
jl 0x4029a6
call fcn.00450a42
mov ecx, dword [eax + 4]
call fcn.0043a066
push esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov dword [esi + 0x10], edx
mov edx, dword [esi + 8]
mov dword [esi + 0x14], eax
mov ecx, dword [esi + 0x10]
sub ecx, edx
mov edx, eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x10], ecx
sbb edx, eax
mov ecx, esi
mov dword [esp + 0x14], edx
fild qword [esp + 0x10]
fst qword [esi + 0x18]
fdiv qword [esi + 0x20]
fstp qword [esi + 0x28]
call fcn.00408ff0
mov ecx, esi
call fcn.00404f10
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret