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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
jne 0x4da359
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4da361
cmp esi, 0x7fffffff
jbe 0x4da37d
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4da371
cmp dword [eax], 0
jne 0x4da75a
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004d9850
mov edi, eax
mov dword [ebp - 4], edi
call fcn.004d9850
sub eax, edi
cmp eax, esi
jae 0x4da784
mov ecx, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
test ecx, ecx
je 0x4da3ac
cmp dword [ecx], 0
jne 0x4da75a
mov ecx, esi
sub ecx, eax
cmp ecx, 0xa
jbe 0x4da763
push 0xa
call ebx
xor edi, edi
xorps xmm0, xmm0
movlpd qword [ebp - 0xc], xmm0
cmp dword [0x683558], edi
je 0x4da3dc
nop
push 0
call ebx
cmp dword [0x683558], edi
jne 0x4da3d0
mov dword [0x683570], 1
cmp dword [0x683554], edi
jne 0x4da592
mov dword [0x683558], 1
cmp dword [0x683578], edi
jne 0x4da42c
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 0x4da4a8
xorps xmm0, xmm0
movlpd qword [0x683568], xmm0
cmp dword [0x683574], edi
jne 0x4da508
cmp dword [0x68357c], edi
jne 0x4da508
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
mov edi, dword [ebp - 4]
jmp 0x4da38c
mov eax, dword [0x68356c]
test eax, eax
jl 0x4da4fd
mov ecx, dword [0x683568]
jg 0x4da4cb
cmp ecx, 0x3e8
jb 0x4da4fd
test eax, eax
jl 0x4da508
jg 0x4da4cb
test ecx, ecx
je 0x4da508
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x4da508
cmp dword [0x683580], edi
jne 0x4da4fd
mov dword [0x683580], 1
cmp dword [0x683574], edi
jne 0x4da4fd
push str.:8:QueryPerformanceCounter___FAILED_to_initialize_in_TimeGetTime___initialization_
jmp 0x4da46d
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 0x4da539
nop word [eax + eax]
cmp esi, 0xa
jae 0x4da539
cmp dword [0x683574], edi
je 0x4da61b
inc esi
push esi
call ebx
test eax, eax
jne 0x4da520
cmp dword [0x68356c], edi
jl 0x4da565
jg 0x4da54b
cmp dword [0x683568], edi
jbe 0x4da565
push 0x683560
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x4da565
xorps xmm0, xmm0
movlpd qword [0x683568], xmm0
push 1
call ebx
xorps xmm0, xmm0
movlpd qword [0x683568], xmm0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov esi, dword [ebp + 8]
mov dword [0x68355c], eax
mov dword [0x683554], 1
mov dword [0x683558], edi
mov eax, dword [0x68356c]
test eax, eax
jl 0x4da715
jg 0x4da5af
mov ebx, dword [0x683568]
test ebx, ebx
je 0x4da71b
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x4da664
cmp dword [0x683584], edi
jne 0x4da6cc
mov dword [0x683584], 1
cmp dword [0x683574], edi
jne 0x4da602
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
mov edi, dword [ebp - 4]
jmp 0x4da38c
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
mov dword [0x683570], 1
mov dword [0x683574], edi
call fcn.004d9850
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 4]
jmp 0x4da38c
mov ecx, dword [0x68356c]
mov ebx, dword [0x683568]
test ecx, ecx
jg 0x4da6e3
jl 0x4da67e
cmp ebx, 0x3e8
jae 0x4da6e3
mov eax, ebx
or eax, ecx
je 0x4da6e3
cmp dword [0x683588], edi
jne 0x4da6cc
mov dword [0x683588], 1
cmp dword [0x683574], edi
jne 0x4da6cc
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 - 0xc]
sub edi, dword [0x683560]
mov esi, dword [ebp - 8]
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 0x4da71b
mov ebx, dword [0x683568]
or ebx, eax
jne 0x4da73e
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x68355c]
mov edi, eax
cmp ecx, edi
jae 0x4da73a
or eax, 0xffffffff
sub eax, ecx
add edi, eax
jmp 0x4da73e
sub ecx, edi
mov edi, ecx
mov eax, dword [0x683578]
mov esi, dword [ebp + 8]
add eax, edi
mov edi, dword [ebp - 4]
mov dword [0x683570], 0
jmp 0x4da38c
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
test ecx, ecx
js 0x4da780
cmp ecx, 0x7fffffff
jge 0x4da780
push ecx
call ebx
call fcn.004d9850
sub eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xa
call ebx
call fcn.004d9850
sub eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret