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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov edi, dword [ebp + 8]
mov eax, dword [0x511014]
xor eax, ebp
mov dword [esp + 0x30], eax
xor ecx, ecx
inc ecx
xor eax, eax
lock cmpxchg dword [edi], ecx
sete bl
jne 0x409a1d
mov ecx, dword [esp + 0x30]
xor ecx, ebp
call fcn.00496ce3
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [edi]
cmp eax, 1
jne 0x409a08
xor eax, eax
dec eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
mov ecx, dword [fcn.0048cd00]
cmp ecx, 0x493220
jne 0x409b6b
xor eax, eax
lea edi, [esp + 0x28]
mov dword [edi + 4], eax
mov dword [edi], eax
push edi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [edi]
mov edi, dword [edi + 4]
mov eax, 0x7bd05af7
cmp esi, eax
mov eax, edi
mov ecx, 0x863
sbb eax, ecx
jge 0x409c36
mov ecx, 0xf4240
mov eax, esi
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x52120c]
push dword [0x521208]
push ecx
push eax
call fcn.004b5fc0
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
mov edi, dword [ebp + 8]
mov ecx, dword [fcn.0048cd00]
cmp ecx, 0x493220
jne 0x409b51
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov eax, 0x7bd05af7
cmp esi, eax
mov eax, edi
mov ecx, 0x863
sbb eax, ecx
jge 0x409ba8
mov eax, esi
mov ecx, 0xf4240
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x52120c]
push dword [0x521208]
push ecx
push eax
call fcn.004b5fc0
mov edi, dword [ebp + 8]
sub eax, dword [esp + 0x20]
sbb edx, dword [esp + 0x24]
seto cl
mov esi, edx
sar esi, 0x1f
test cl, cl
cmovne eax, esi
add esi, 0x80000000
test cl, cl
cmove esi, edx
mov ecx, 0x3e7
cmp ecx, eax
mov eax, 0
sbb eax, esi
jl 0x409b80
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [edi]
cmp eax, 1
je 0x409a9d
jmp 0x409a08
call dword [section..00cfg]
lea eax, [esp + 0x28]
push eax
call ecx
add esp, 4
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
jmp 0x409b09
call dword [section..00cfg]
lea eax, [esp + 0x20]
push eax
call ecx
add esp, 4
jmp 0x409a9d
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x3e8
sub esp, 8
movsd xmm0, qword [esp + 0x20]
movsd qword [esp], xmm0
call fcn.004d7d70
add esp, 8
jmp 0x409b41
mov eax, dword [0x521208]
mov dword [esp], eax
mov ecx, dword [0x52120c]
mov dword [esp + 0xc], ecx
push ecx
push eax
push edi
push esi
call fcn.004b5fc0
mov dword [esp + 8], eax
mov dword [esp + 0x14], edx
mul dword [esp]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 8]
imul ecx, dword [esp + 0xc]
add edx, ecx
mov eax, dword [esp + 0x14]
imul ecx, eax, 0xf4240
mov dword [esp + 4], ecx
imul eax, dword [esp]
add eax, edx
sub esi, dword [esp + 0x10]
sbb edi, eax
mov ecx, 0xf4240
mov eax, dword [esp + 8]
mul ecx
mov dword [esp + 8], eax
add edx, dword [esp + 4]
mov dword [esp + 4], edx
mov eax, esi
mul ecx
imul ecx, edi, 0xf4240
add edx, ecx
push dword [esp + 0xc]
push dword [esp + 4]
push edx
push eax
call fcn.004b5fc0
add eax, dword [esp + 8]
adc edx, dword [esp + 4]
jmp 0x409b06
mov eax, dword [0x521208]
mov dword [esp + 8], eax
mov ecx, dword [0x52120c]
mov dword [esp + 0xc], ecx
push ecx
push eax
push edi
push esi
call fcn.004b5fc0
mov dword [esp], eax
mov ecx, edx
mov eax, dword [esp]
mul dword [esp + 8]
mov dword [esp + 0x10], eax
mov eax, edi
mov edi, dword [esp]
imul edi, dword [esp + 0xc]
add edx, edi
imul edi, ecx, 0xf4240
mov dword [esp + 4], edi
mov edi, dword [esp + 8]
imul ecx, edi
add ecx, edx
sub esi, dword [esp + 0x10]
sbb eax, ecx
mov ecx, eax
mov edx, 0xf4240
mov eax, dword [esp]
mul edx
mov dword [esp], eax
add edx, dword [esp + 4]
mov dword [esp + 4], edx
mov eax, esi
mov edx, 0xf4240
mul edx
imul ecx, ecx, 0xf4240
add edx, ecx
push dword [esp + 0xc]
push edi
push edx
push eax
call fcn.004b5fc0
add eax, dword [esp]
adc edx, dword [esp + 4]
jmp 0x409a92