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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
xor edi, edi
xorps xmm0, xmm0
movlpd qword [ebp - 8], xmm0
cmp dword [0x683558], edi
je 0x4d987d
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call esi
cmp dword [0x683558], edi
jne 0x4d9871
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov dword [0x683570], 1
cmp dword [0x683554], edi
jne 0x4d9a63
mov dword [0x683558], 1
cmp dword [0x683578], edi
jne 0x4d98d3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.004eeadb
add esp, 4
call fcn.004eeaba
cdq
mov ecx, 0x36ee80
idiv ecx
mov eax, 0x2932e00
sub eax, edx
mov dword [0x683578], eax
push 0x683568
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
jne 0x4d994e
xorps xmm0, xmm0
movlpd qword [0x683568], xmm0
cmp dword [0x683574], edi
jne 0x4d99aa
cmp dword [0x68357c], edi
jne 0x4d99aa
mov dword [0x68357c], 1
push str.:9:TimeGetTime___initialization:_No_performance_counter_exists_
mov dword [0x683558], edi
mov dword [0x683570], edi
mov dword [0x683574], 1
call fcn.00424fd0
add esp, 4
mov dword [0x683570], 1
mov dword [0x683574], edi
call fcn.004d9850
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x68356c]
test eax, eax
jl 0x4d999f
mov ecx, dword [0x683568]
jg 0x4d9971
cmp ecx, 0x3e8
jb 0x4d999f
test eax, eax
jl 0x4d99aa
jg 0x4d9971
test ecx, ecx
je 0x4d99aa
lea eax, [ebp - 8]
push eax
call esi
test eax, eax
jne 0x4d99aa
cmp dword [0x683580], edi
jne 0x4d999f
mov dword [0x683580], 1
cmp dword [0x683574], edi
jne 0x4d999f
push str.:8:QueryPerformanceCounter___FAILED_to_initialize_in_TimeGetTime___initialization_
jmp 0x4d9914
xorps xmm0, xmm0
movlpd qword [0x683568], xmm0
mov ebx, dword [sym.imp.WINMM.dll_timeBeginPeriod]
mov esi, 1
push esi
call ebx
test eax, eax
je 0x4d99d5
nop dword [eax]
cmp esi, 0xa
jae 0x4d99d5
cmp dword [0x683574], edi
je 0x4d9a05
inc esi
push esi
call ebx
test eax, eax
jne 0x4d99c0
cmp dword [0x68356c], edi
jl 0x4d9a33
jg 0x4d99e7
cmp dword [0x683568], edi
jbe 0x4d9a33
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 0x683560
call esi
test eax, eax
jne 0x4d9a39
xorps xmm0, xmm0
movlpd qword [0x683568], xmm0
jmp 0x4d9a39
push str._GetLastError_
push esi
push str.:8:QueryPerformanceCounter___FAILED_to_set_timeGetTime___granularity:_timeBeginPeriod__d__failed:_trying_one_higher:__s
mov dword [0x683574], 1
mov dword [0x683570], edi
mov dword [0x683558], edi
call fcn.00424fd0
add esp, 0xc
jmp 0x4d9932
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 1
call ebx
xorps xmm0, xmm0
movlpd qword [0x683568], xmm0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [0x68355c], eax
mov dword [0x683554], 1
mov dword [0x683558], edi
mov eax, dword [0x68356c]
test eax, eax
jl 0x4d9b94
jg 0x4d9a80
mov ebx, dword [0x683568]
test ebx, ebx
je 0x4d9b9a
lea eax, [ebp - 8]
push eax
call esi
test eax, eax
jne 0x4d9ae3
cmp dword [0x683584], edi
jne 0x4d9b4b
mov dword [0x683584], 1
cmp dword [0x683574], edi
jne 0x4d9acb
push str.:9:QueryPerformanceCounter___FAILED_______________________
mov dword [0x683574], 1
mov dword [0x683570], edi
call fcn.00424a90
add esp, 4
mov dword [0x683574], edi
mov dword [0x683554], edi
mov dword [0x683570], edi
call fcn.004d9850
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x68356c]
mov ebx, dword [0x683568]
test ecx, ecx
jg 0x4d9b62
jl 0x4d9afd
cmp ebx, 0x3e8
jae 0x4d9b62
mov eax, ebx
or eax, ecx
je 0x4d9b62
cmp dword [0x683588], edi
jne 0x4d9b4b
mov dword [0x683588], 1
cmp dword [0x683574], edi
jne 0x4d9b4b
push ebx
push str.:9:TimeGetTime___has_encountered_a_serious_exception:_the_performance_frequency_counter_has_a_resolution_of_only__d_milliseconds______This_is_too_low_to_be_of_any_use_
mov dword [0x683574], 1
mov dword [0x683570], edi
call fcn.00424a90
add esp, 8
mov dword [0x683570], 1
mov dword [0x683574], edi
xorps xmm0, xmm0
movlpd qword [0x683568], xmm0
mov ebx, dword [0x683568]
mov ecx, dword [0x68356c]
mov edi, dword [ebp - 8]
sub edi, dword [0x683560]
mov esi, dword [ebp - 4]
sbb esi, dword [0x683564]
push 0
push 0x3e8
push ecx
push ebx
call fcn.004e57b0
push edx
push eax
push esi
push edi
call fcn.004e57b0
mov edi, eax
mov eax, dword [0x68356c]
jmp 0x4d9b9a
mov ebx, dword [0x683568]
or ebx, eax
jne 0x4d9bbd
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x68355c]
mov edi, eax
cmp ecx, edi
jae 0x4d9bb9
or eax, 0xffffffff
sub eax, ecx
add edi, eax
jmp 0x4d9bbd
sub ecx, edi
mov edi, ecx
mov eax, dword [0x683578]
add eax, edi
mov dword [0x683570], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret