Function at 0x403730
Capabilities:
Check for time delay via queryperformancecounter
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x4d100c]
xor eax, esp
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
mov edi, ecx
test eax, eax
je 0x403754
mov byte [edi + 0x68], 1
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00419910
mov ecx, dword [0x4d3360]
or ecx, dword [0x4d3364]
mov ebx, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov dword [esp + 0x10], eax
jne 0x403785
push 0x4d3360
call ebx
xorps xmm0, xmm0
lea eax, [esp + 0x20]
push eax
movq qword [esp + 0x24], xmm0
movq qword [esp + 0x2c], xmm0
call ebx
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov ecx, dword [esp + 0x20]
sub ecx, dword [0x4d3360]
mov edx, dword [esp + 0x24]
sbb edx, dword [0x4d3364]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
call fcn.0046ff70
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
movsd qword [esp + 0x18], xmm0
call fcn.0046ff70
movsd xmm1, qword [esp + 0x18]
xor al, al
divsd xmm1, xmm0
movzx eax, al
mov edx, 1
movaps xmm0, xmm1
movsd qword [esp + 0x18], xmm1
subsd xmm0, qword [edi + 0x70]
comisd xmm0, xmmword [0x4ca120]
cmovae eax, edx
mov dword [esp + 0x14], eax
mov eax, dword [0x4d3334]
mov ebx, dword [eax + 0x24]
mov eax, dword [edi + 0x18]
or eax, dword [edi + 0x1c]
jne 0x403823
mov eax, dword [edi + 0x20]
or eax, dword [edi + 0x24]
je 0x40386f
mov ecx, dword [0x4d31f4]
mov esi, dword [edi + 0x10]
mov eax, dword [ecx + 0x24]
sub eax, dword [ecx + 0x1c]
add esi, dword [edi + 8]
mov ecx, dword [edi + 0x14]
adc ecx, dword [edi + 0xc]
push ecx
cdq
push esi
push edx
push eax
call fcn.0046f8f0
mov esi, dword [edi + 0x18]
add esi, dword [edi + 0x20]
mov ecx, dword [edi + 0x24]
adc ecx, dword [edi + 0x1c]
push ecx
push esi
push edx
push eax
call fcn.0046f9e0
movsd xmm1, qword [esp + 0x18]
mov ebx, eax
mov eax, dword [0x4d3334]
mov edx, 1
add ebx, dword [eax + 0x1c]
cmp byte [edi + 0x68], 0
jne 0x4038a8
mov esi, dword [0x4d3334]
xor ecx, ecx
mov eax, dword [esp + 0x14]
movzx eax, al
cmp ebx, dword [esi + 0x24]
mov esi, dword [esp + 0x10]
cmovne ecx, eax
test cl, cl
jne 0x4038a8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00450db2
mov esp, ebp
pop ebp
ret 0x14
mov esi, dword [0x4d3310]
add esi, 0x58
mov byte [edi + 0x68], 0
movsd qword [edi + 0x70], xmm1
mov eax, dword [esi]
test eax, eax
jne 0x4038d4
lock xadd dword [esi], edx
test edx, edx
jne 0x4038d4
push edx
push edx
push edx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 4], eax
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add edi, 0x30
cmp dword [edi + 0x14], 8
jb 0x4038ea
mov edi, dword [edi]
push edi
push 0x494478
push 0x4d2fe8
call fcn.004013d0
mov eax, dword [0x4d3334]
add esp, 0xc
mov dword [eax + 0x24], ebx
mov byte [eax + 0x37], 1
mov eax, dword [0x4d3320]
mov dword [eax + 0x78], 0x4d2fe8
mov byte [eax + 0x37], 1
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [0x4d3310]
push 0
push 0
push dword [eax + 0x10]
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00450db2
mov esp, ebp
pop ebp
ret 0x14