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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x452074]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, edx
mov dword [ebp - 0x1c], ecx
push esi
lea edx, [ebp - 0x70]
mov dword [ebp - 0x14], eax
push edi
push edx
mov edx, eax
call fcn.00413400
add esp, 4
test eax, eax
jne 0x4163cb
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [ebp - 0x38]
xor esi, esi
xor edi, edi
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fild qword [ebp - 0x10]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fmul qword [0x450050]
fdivrp st(1)
fld qword [0x450060]
fcom st(1)
fnstsw ax
test ah, 0x41
jp 0x416147
fsub st(1), st(0)
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x416149
add esi, esi
adc edi, 0x80000000
jmp 0x416149
fstp st(0)
call fcn.00424860
add eax, esi
mov dword [ebp - 0x54], 1
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x5c], eax
adc edx, edi
xor ebx, ebx
mov dword [ebp - 0x60], edx
call fcn.004173d0
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [ebp - 0x28]
xor esi, esi
xor edi, edi
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fild qword [ebp - 0x30]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fmul qword [0x450050]
fdivrp st(1)
fld qword [0x450060]
fcom st(1)
fnstsw ax
test ah, 0x41
jp 0x4161bf
fsub st(1), st(0)
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x4161c1
add esi, ebx
adc edi, 0x80000000
jmp 0x4161c1
fstp st(0)
call fcn.00424860
add eax, esi
mov esi, edx
mov dword [ebp - 0x4c], eax
adc esi, edi
mov edi, eax
mov ecx, edi
mov dword [ebp - 0x3c], esi
sub ecx, dword [ebp - 0x68]
mov eax, esi
sbb eax, dword [ebp - 0x64]
test eax, eax
ja 0x416312
jb 0x4161f4
cmp ecx, 0x2af8
jae 0x416312
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x50], ecx
mov edx, ebx
mov dword [ebp - 0x4c], edx
test ebx, ebx
jle 0x416240
mov esi, ebx
jmp 0x416210
mov edx, 0x10000
mov ecx, 0x457400
lea ebx, [ebx]
mov eax, dword [ecx]
add ecx, 4
cmp ecx, 0x4574a8
jl 0x416220
sub edx, 1
jne 0x416215
sub esi, 1
jne 0x416210
mov esi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
cmp dword [ebp - 0x54], 0
je 0x41624f
mov dword [ebp - 0x54], 0
jmp 0x41627f
mov eax, edi
sub eax, ecx
mov ecx, esi
sbb ecx, dword [ebp - 0x58]
test ecx, ecx
ja 0x416269
jb 0x416265
cmp eax, 0x3e8
jae 0x416269
add ebx, ebx
jmp 0x41627f
mov ebx, edx
test ecx, ecx
jne 0x416276
cmp eax, 0x2710
jbe 0x41627f
mov eax, edx
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
lea eax, [ebp - 0x30]
mov dword [ebp - 0x50], edi
push eax
mov dword [ebp - 0x58], esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [ebp - 0x28]
xor esi, esi
xor edi, edi
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fild qword [ebp - 0x30]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fmul qword [0x450050]
fdivrp st(1)
fld qword [0x450060]
fcom st(1)
fnstsw ax
test ah, 0x41
jp 0x4162db
fsub st(1), st(0)
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x4162dd
add esi, esi
adc edi, 0x80000000
jmp 0x4162dd
fstp st(0)
call fcn.00424860
add eax, esi
mov dword [ebp - 0x3c], edx
mov esi, edx
mov dword [ebp - 0x4c], eax
adc esi, edi
mov edx, eax
sub edx, dword [ebp - 0x68]
mov eax, esi
mov dword [ebp - 0x3c], esi
sbb eax, dword [ebp - 0x64]
mov dword [ebp - 0x44], eax
jne 0x416312
mov edi, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x50]
cmp edx, 0x2af8
jb 0x416200
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x78]
mov ecx, dword [ebp - 0x1c]
push eax
call fcn.00413400
add esp, 4
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [ebp - 0x20]
xor esi, esi
xor edi, edi
fstp qword [ebp - 0x10]
fld qword [ebp - 0x10]
fild qword [ebp - 0x18]
fstp qword [ebp - 0x10]
fld qword [ebp - 0x10]
fmul qword [0x450050]
fdivrp st(1)
fld qword [0x450060]
fcom st(1)
fnstsw ax
test ah, 0x41
jp 0x41637a
fsub st(1), st(0)
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x41637c
add esi, esi
adc edi, 0x80000000
jmp 0x41637c
fstp st(0)
call fcn.00424860
add eax, esi
adc edx, edi
cmp dword [ebp - 0x60], edx
ja 0x4163cb
jb 0x416391
cmp dword [ebp - 0x5c], eax
jae 0x4163cb
mov edi, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x74]
cmp edi, ecx
ja 0x4163cb
mov ebx, dword [ebp - 0x70]
mov esi, dword [ebp - 0x78]
jb 0x4163a7
cmp ebx, esi
ja 0x4163cb
sub eax, dword [ebp - 0x5c]
sbb edx, dword [ebp - 0x60]
sub esi, ebx
push edx
push eax
sbb ecx, edi
push ecx
push esi
call fcn.004246c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041abcf
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x3fffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041abcf
mov esp, ebp
pop ebp
ret