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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1ec
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
push edi
mov esi, ecx
mov dword [ebp - 0x180], eax
cmp eax, ebx
je 0x4177fa
mov eax, dword [esi + 0x18]
fldz
add eax, 8
fstp qword [ebp - 0x178]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
fstp qword [ebp - 0x1b4]
lea ecx, [ebp - 0x16c]
mov dword [ebp - 0x17c], ebx
mov dword [ebp - 0x184], ebx
mov dword [ebp - 0x188], ebx
mov dword [ebp - 0x194], ebx
call fcn.00409d25
mov eax, dword [esi + 0x18]
push dword [eax + 0x26c]
lea ecx, [ebp - 0x16c]
call fcn.00405a05
fld qword [ebp - 0x1b4]
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x1d4]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x178]
push eax
push ecx
push ecx
mov ecx, esi
fstp qword [esp]
call fcn.0040b009
xor edi, edi
mov dword [ebp - 0x170], edi
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 0x190], eax
fld qword [ebp - 0x1b4]
fcomp qword [ebp - 0x178]
fnstsw ax
test ah, 1
jne 0x40636b
mov eax, dword [ebp - 0x170]
cmp eax, dword [esi + 4]
jge 0x40636b
mov ebx, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x1bc]
push eax
call ebx
push dword [ebp - 0x180]
mov eax, dword [esi + 0x18]
push edi
lea edx, [ebp - 0x178]
add eax, 8
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 4]
lea eax, [ebp - 0x1ac]
push eax
call ebx
lea eax, [ebp - 0x19c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fld1
cmp dword [ebp - 0x198], edi
jl 0x4062da
jg 0x4062a6
cmp dword [ebp - 0x19c], edi
jbe 0x4062da
mov eax, dword [ebp - 0x1ac]
fstp st(0)
sub eax, dword [ebp - 0x1bc]
mov ecx, dword [ebp - 0x1a8]
sbb ecx, dword [ebp - 0x1b8]
mov dword [ebp - 0x1a4], eax
mov dword [ebp - 0x1a0], ecx
fild qword [ebp - 0x1a4]
fild qword [ebp - 0x19c]
fdivp st(1)
push ecx
push ecx
fstp qword [esp]
push 0x40727c
push 0x407238
push 4
call fcn.004173ad
mov ecx, dword [ebp - 0x180]
add esp, 0x14
push edi
push edi
push edi
lea eax, [ebp - 0x1ec]
push eax
lea eax, [ebp - 0x194]
push eax
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x17c]
push eax
call fcn.00405df3
mov ebx, eax
cmp ebx, edi
jl 0x41780c
mov ecx, dword [esi + 0x14]
lea eax, [ebp - 0x18c]
push eax
push dword [ebp - 0x184]
mov dword [ebp - 0x18c], edi
push dword [ebp - 0x17c]
push dword [ebp - 0x194]
call fcn.00407812
mov ebx, eax
cmp ebx, edi
jl 0x417804
cmp dword [ebp - 0x18c], edi
je 0x417821
cmp ebx, edi
jl 0x4063c8
fld qword [ebp - 0x178]
mov eax, dword [esi + 0x14]
mov eax, dword [eax + 0x63c]
push edi
push edi
sub esp, 0x20
fstp qword [esp + 0x18]
push 6
pop ecx
mov edi, esp
push eax
push dword [ebp - 0x188]
lea esi, [ebp - 0x1ec]
push dword [ebp - 0x184]
mov dword [ebp - 0x1ec], 2
push dword [ebp - 0x17c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x180]
call fcn.00405e8e
mov ebx, eax
test ebx, ebx
jl 0x417843
xor edi, edi
call dword [sym.imp.WINMM.dll_timeGetTime]
fld qword [ebp - 0x178]
sub eax, dword [ebp - 0x190]
fstp qword [ebp - 0x1cc]
mov dword [ebp - 0x190], eax
fild dword [ebp - 0x190]
test eax, eax
jl 0x41785d
fdiv qword [0x407230]
mov esi, dword [ebp - 0x170]
lea eax, [ebp - 0x1d4]
push eax
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x1c4], esi
fstp qword [ebp - 0x1d4]
call fcn.00406c84
push edi
lea ecx, [ebp - 0x16c]
call fcn.00405a05
push ebx
push esi
push 0x40645c
push 0x407238
push 4
call fcn.004173ad
add esp, 0x14
lea ecx, [ebp - 0x16c]
call fcn.004072b3
mov eax, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004013d7
leave
ret 4
mov eax, 0x80004003
jmp 0x40644a
push ebx
push 0x417908
jmp 0x417812
push ebx
push 0x4178b8
push 0x407238
push 1
call fcn.004173ad
add esp, 0x10
fild dword [esi + 8]
inc dword [ebp - 0x170]
cmp ebx, edi
fadd qword [ebp - 0x178]
fstp qword [ebp - 0x178]
jl 0x40636b
jmp 0x40622d
push ebx
push 0x417868
push 0x407238
push 1
call fcn.004173ad
add esp, 0x10
jmp 0x4063c6
fadd qword [0x41b2d8]
jmp 0x4063f4