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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ecx
mov esi, edx
mov dword [ebp - 8], eax
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
call fcn.0040561c
xor eax, eax
push ebp
push 0x494f54
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
mov edx, dword [eax]
call dword [edx]
cmp edx, 0
jne 0x494c57
cmp eax, 0
je 0x494f36
test bl, bl
jne 0x494c65
cmp byte [ebp + 0x10], 0
je 0x494f12
mov eax, dword [0x515884]
mov dword [ebp - 0x28], eax
mov edi, dword [ebp - 0x28]
test edi, edi
je 0x494c79
sub edi, 4
mov edi, dword [edi]
mov eax, dword [0x515884]
call fcn.0040562c
mov edx, eax
mov ecx, edi
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0x10]
test bl, bl
je 0x494c9c
mov dword [ebp - 0x20], 1
jmp 0x494ca1
xor eax, eax
mov dword [ebp - 0x20], eax
cmp byte [ebp + 0x10], 0
je 0x494cab
or dword [ebp - 0x20], 2
lea edx, [ebp - 0x20]
mov ecx, 4
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0x10]
cmp byte [ebp + 0x10], 0
je 0x494cd8
movzx eax, byte [ebp + 0x10]
mov dword [ebp - 0x20], eax
lea edx, [ebp - 0x20]
mov ecx, 4
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0x10]
mov byte [ebp - 0x19], 0
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [0x51bd50], eax
mov dword [0x51bd54], eax
xor eax, eax
mov dword [0x51bd58], eax
mov dword [0x51bd5c], eax
xor eax, eax
push ebp
push 0x494f0b
push dword fs:[eax]
mov dword fs:[eax], esp
test bl, bl
je 0x494df4
cmp byte [ebp + 0x10], 0
je 0x494d33
mov dl, 1
mov eax, dword [0x41cef8]
call fcn.004041e0
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x19], 1
jmp 0x494d39
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x10]
mov ecx, 4
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, dword [ebp - 0x14]
push eax
mov cl, 3
mov dl, 1
mov eax, dword [0x48cc68]
call fcn.0048d300
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x494ddf
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
add eax, 0x28
push eax
call sub.kernel32.dll_QueryPerformanceCounter
mov eax, esi
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov edx, esi
mov eax, dword [ebp - 0x24]
call fcn.00422364
mov eax, dword [ebp - 8]
add eax, 0x30
push eax
call sub.kernel32.dll_QueryPerformanceCounter
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x34]
mov eax, dword [eax + 0x30]
mov ecx, dword [ebp - 8]
sub eax, dword [ecx + 0x28]
sbb edx, dword [ecx + 0x2c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
fild qword [ebp - 0x30]
fild qword [0x51bd60]
fdivp st(1)
fstp qword [0x51bd50]
wait
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x494de6
mov eax, dword [ebp - 0x24]
call fcn.00404210
ret
cmp byte [ebp + 0x10], 0
je 0x494dfd
mov dword [ebp - 0x14], esi
cmp byte [ebp + 0x10], 0
je 0x494eef
movzx eax, byte [ebp + 0x10]
cmp al, 7
ja 0x494e19
and eax, 0x7f
bt dword [0x51bd4c], eax
jae 0x494e59
cmp dword [ebp + 8], 0
jne 0x494e30
lea eax, [ebp - 4]
mov edx, 0x494f6c
call fcn.00405234
jmp 0x494e3b
lea eax, [ebp - 4]
mov edx, dword [ebp + 8]
call fcn.00405234
mov eax, dword [ebp - 4]
push eax
movzx eax, byte [ebp + 0x10]
mov ecx, dword [eax*4 + 0x515870]
mov dl, 1
mov eax, dword [0x48ca00]
call fcn.0048ca64
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x494e75
mov ecx, 0x494fb8
mov dl, 1
mov eax, dword [0x408858]
call fcn.0040de74
call fcn.00404a6c
xor eax, eax
push ebp
push 0x494ee8
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
add eax, 0x28
push eax
call sub.kernel32.dll_QueryPerformanceCounter
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov ebx, dword [eax]
call dword [ebx]
mov eax, dword [ebp - 8]
add eax, 0x30
push eax
call sub.kernel32.dll_QueryPerformanceCounter
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x34]
mov eax, dword [eax + 0x30]
mov ecx, dword [ebp - 8]
sub eax, dword [ecx + 0x28]
sbb edx, dword [ecx + 0x2c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
fild qword [ebp - 0x30]
fild qword [0x51bd60]
fdivp st(1)
fstp qword [0x51bd58]
wait
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x494eef
mov eax, dword [ebp - 0x18]
call fcn.00404210
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x494f36
cmp byte [ebp - 0x19], 0
je 0x494f0a
mov eax, dword [ebp - 0x14]
call fcn.00404210
ret
mov eax, esi
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov eax, esi
call fcn.004220c8
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
push edx
push eax
mov edx, esi
mov eax, dword [ebp - 0xc]
call fcn.00422364
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x494f5b
lea eax, [ebp - 4]
call fcn.0040519c
lea eax, [ebp + 8]
call fcn.0040519c
ret