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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
call fcn.004054a8
xor eax, eax
push ebp
push 0x513ff7
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
mov edx, dword [eax]
call dword [edx]
cmp edx, 0
jne 0x513cf3
cmp eax, 0
je 0x513fd9
test bl, bl
jne 0x513d01
cmp byte [ebp + 0x10], 0
je 0x513fb5
mov eax, dword [0x63f1b4]
call fcn.004052b8
push eax
mov eax, dword [0x63f1b4]
call fcn.004054b8
mov edx, eax
mov eax, dword [ebp - 8]
pop ecx
mov edi, dword [eax]
call dword [edi + 0x10]
test bl, bl
je 0x513d2e
mov dword [ebp - 0x20], 1
jmp 0x513d33
xor eax, eax
mov dword [ebp - 0x20], eax
cmp byte [ebp + 0x10], 0
je 0x513d3d
or dword [ebp - 0x20], 2
lea edx, [ebp - 0x20]
mov ecx, 4
mov eax, dword [ebp - 8]
mov edi, dword [eax]
call dword [edi + 0x10]
cmp byte [ebp + 0x10], 0
je 0x513d6b
xor eax, eax
mov al, byte [ebp + 0x10]
mov dword [ebp - 0x20], eax
lea edx, [ebp - 0x20]
mov ecx, 4
mov eax, dword [ebp - 8]
mov edi, dword [eax]
call dword [edi + 0x10]
mov byte [ebp - 0x19], 0
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [0x6444ec], eax
mov dword [0x6444f0], eax
xor eax, eax
mov dword [0x6444f4], eax
mov dword [0x6444f8], eax
xor eax, eax
push ebp
push 0x513fae
push dword fs:[eax]
mov dword fs:[eax], esp
test bl, bl
je 0x513e97
cmp byte [ebp + 0x10], 0
je 0x513dd6
mov dl, 1
mov eax, dword [0x420520]
call fcn.0040405c
mov dword [ebp - 0x10], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov eax, dword [ebp - 0x10]
call fcn.004269d8
mov byte [ebp - 0x19], 1
jmp 0x513ddc
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0xc]
mov ecx, 4
mov eax, dword [ebp - 0x10]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, dword [ebp - 0x10]
push eax
mov cl, 3
mov dl, 1
mov eax, dword [0x50dbe8]
call fcn.0050e2a8
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x513e82
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
add eax, 0x28
push eax
call sub.kernel32.dll_QueryPerformanceCounter_1
mov eax, esi
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov edx, esi
mov eax, dword [ebp - 0x24]
call fcn.00426c24
mov eax, dword [ebp - 4]
add eax, 0x30
push eax
call sub.kernel32.dll_QueryPerformanceCounter_1
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [eax + 0x30]
mov ecx, dword [ebp - 4]
sub eax, dword [ecx + 0x28]
sbb edx, dword [ecx + 0x2c]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
fild qword [ebp - 0x2c]
fild qword [0x6444fc]
fdivp st(1)
fstp qword [0x6444ec]
wait
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x513e89
mov eax, dword [ebp - 0x24]
call fcn.0040408c
ret
cmp byte [ebp + 0x10], 0
je 0x513ea0
mov dword [ebp - 0x10], esi
cmp byte [ebp + 0x10], 0
je 0x513f92
mov al, byte [ebp + 0x10]
cmp al, 7
ja 0x513ebb
and eax, 0x7f
bt dword [0x6444e8], eax
jae 0x513efc
cmp dword [ebp + 8], 0
jne 0x513ed2
lea eax, [ebp - 0x18]
mov edx, 0x514010
call fcn.00405074
jmp 0x513edd
lea eax, [ebp - 0x18]
mov edx, dword [ebp + 8]
call fcn.00405074
mov eax, dword [ebp - 0x18]
push eax
xor eax, eax
mov al, byte [ebp + 0x10]
mov ecx, dword [eax*4 + 0x63f1a0]
mov dl, 1
mov eax, dword [0x50d948]
call fcn.0050d9ac
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x513f18
mov ecx, 0x51405c
mov dl, 1
mov eax, dword [0x40930c]
call fcn.0040fec0
call fcn.00404930
xor eax, eax
push ebp
push 0x513f8b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
add eax, 0x28
push eax
call sub.kernel32.dll_QueryPerformanceCounter_1
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx]
mov eax, dword [ebp - 4]
add eax, 0x30
push eax
call sub.kernel32.dll_QueryPerformanceCounter_1
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [eax + 0x30]
mov ecx, dword [ebp - 4]
sub eax, dword [ecx + 0x28]
sbb edx, dword [ecx + 0x2c]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
fild qword [ebp - 0x2c]
fild qword [0x6444fc]
fdivp st(1)
fstp qword [0x6444f4]
wait
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x513f92
mov eax, dword [ebp - 0x14]
call fcn.0040408c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x513fd9
cmp byte [ebp - 0x19], 0
je 0x513fad
mov eax, dword [ebp - 0x10]
call fcn.0040408c
ret
mov eax, esi
mov edx, dword [eax]
call dword [edx]
push edx
push eax
mov eax, esi
call fcn.00426938
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
push edx
push eax
mov edx, esi
mov eax, dword [ebp - 8]
call fcn.00426c24
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x513ffe
lea eax, [ebp - 0x18]
call fcn.00404fdc
lea eax, [ebp + 8]
call fcn.00404fdc
ret