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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov ebx, ecx
push edi
push 0x1000
lea esi, [ebx + 0x2028]
push esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
mov al, byte [esi + 0x21]
setne cl
and al, 0xfe
or cl, al
mov byte [esi + 0x21], cl
test cl, 1
jne 0x1003ed93
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1003ed88
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x1003ed9a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [esi + 0x1c], 0
test byte [esi + 0x20], 2
je 0x1003edad
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x1003edb4
cmp byte [eax + 4], 0
je 0x1003edb4
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x10
push 0x10
call fcn.10434a32
mov edi, eax
add esp, 8
test edi, edi
je 0x1003ef1d
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x14]
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
push eax
mov dword [ebx + 8], edi
call esi
mov eax, dword [ebp - 0x14]
movups xmm0, xmmword [0x10f2455c]
mov ecx, dword [ebp - 0x10]
mov dword [edi], eax
lea eax, [ebp - 0x14]
mov dword [edi + 4], ecx
movups xmmword [ebx + 0x18], xmm0
mov edi, dword [ebx + 8]
push eax
call esi
mov esi, dword [ebp - 0x14]
mov ecx, esi
sub ecx, dword [edi]
mov edx, dword [ebp - 0x10]
mov eax, edx
sbb eax, dword [edi + 4]
add dword [edi + 8], ecx
mov dword [edi + 4], edx
adc dword [edi + 0xc], eax
mov dword [edi], esi
mov ecx, dword [ebx + 8]
mov eax, dword [ecx + 8]
add dword [ebx + 0x10], eax
mov eax, dword [ecx + 0xc]
adc dword [ebx + 0x14], eax
mov edx, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x10]
call fcn.104511a0
movaps xmm1, xmm0
xorps xmm0, xmm0
mulsd xmm1, qword [0x11d0d388]
movlpd qword [ebp - 0x14], xmm0
movsd xmm0, qword [0x1122d530]
comisd xmm1, xmm0
jb 0x1003ee76
subsd xmm1, xmm0
comisd xmm0, xmm1
jbe 0x1003ee76
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
add esi, 0
adc edi, 0x80000000
jmp 0x1003ee7c
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
movaps xmm0, xmm1
call fcn.104510f0
add eax, esi
mov dword [ebx + 0x28], 2
mov dword [ebx + 0x2c], eax
mov eax, dword [0x11d0d988]
adc edx, edi
dec eax
mov dword [ebp - 0x10], edx
mov dword [ebx + 0x30], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 0x34], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x38], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0x3c], eax
lea eax, [ebx + 0x18]
push 0x2000
push eax
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], 0x800
mov dword [ebx + 0x50], 0x17b4
mov dword [ebx + 0x54], 0
mov dword [ebx + 0x58], 0
mov dword [ebx + 0x5c], 0
mov dword [ebx + 0x60], 0
call dword [sym.imp.KERNEL32.dll_WerRegisterMemoryBlock]
mov esi, dword [ebp - 8]
mov edi, eax
test edi, edi
mov eax, 1
cmovs edi, eax
or eax, 0xffffffff
mov word [ebx + 0x64], ax
mov word [ebx + 0x864], ax
jmp 0x1003ef29
mov dword [ebx + 8], 0
mov edi, 0x8007000e
test byte [esi + 0x20], 2
je 0x1003ef3c
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x1003ef43
cmp byte [eax + 4], 0
je 0x1003ef43
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc