Function at 0x140014630
Capabilities:
Check mutex on windows

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x50
mov esi, r8d
mov r14, rdx
mov rbx, rcx
xor ebp, ebp
mov qword [rcx], rbp
mov dword [rcx + 8], 1
lea r9d, [rbp + 0x2f]
lea r8d, [rbp + 0x5c]
lea rdx, [rsp + 0x80]
mov rcx, r14
call fcn.140169d10
mov rcx, qword [r14]
mov rdx, qword [rax]
mov qword [r14], rdx
mov qword [rax], rcx
mov rcx, qword [rsp + 0x80]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
lea edi, [rbp - 1]
test eax, 0x30000000
jne 0x1400146a2
mov eax, edi
lock xadd dword [rcx], eax
dec eax
cmp eax, edi
jne 0x1400146a2
call fcn.1400daaa8
lea rdx, str.Global_
lea rcx, [rsp + 0x98]
call fcn.1400199a0
nop
mov rdx, r14
lea rcx, [rsp + 0x98]
call fcn.140181250
mov rcx, qword [rax]
mov qword [rsp + 0x20], rcx
mov eax, dword [rcx - 0x10]
nop
test eax, 0x30000000
jne 0x1400146de
lock inc dword [rcx - 0x10]
mov rcx, qword [rsp + 0x98]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140014707
mov eax, edi
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x140014707
call fcn.1400daaa8
nop
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x38]
call fcn.140014d10
mov r8, qword [rax]
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rbx], rax
mov rcx, qword [rsp + 0x20]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x14001474e
mov eax, edi
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x14001474e
call fcn.1400daaa8
cmp qword [rbx], 0
jne 0x140014801
lea rdx, str.Local_
lea rcx, [rsp + 0x28]
call fcn.1400199a0
nop
mov rdx, r14
lea rcx, [rsp + 0x28]
call fcn.140181250
mov rcx, qword [rax]
mov qword [rsp + 0x30], rcx
mov eax, dword [rcx - 0x10]
nop
test eax, 0x30000000
jne 0x14001478e
lock inc dword [rcx - 0x10]
mov rcx, qword [rsp + 0x28]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x1400147b4
mov eax, edi
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x1400147b4
call fcn.1400daaa8
nop
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x40]
call fcn.140014d10
mov r8, qword [rax]
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rbx], rax
mov rcx, qword [rsp + 0x30]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x1400147fb
mov eax, edi
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x1400147fb
call fcn.1400daaa8
cmp qword [rbx], 0
je 0x140014846
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140014846
mov rcx, qword [rbx]
test esi, esi
je 0x14001482f
mov eax, 0xffffffff
cmovs esi, eax
mov edx, esi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, 0xffffff7f
je 0x140014846
mov rcx, qword [rbx]
test rcx, rcx
je 0x140014846
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], rbp
mov rcx, qword [r14]
sub rcx, 0x10
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140014867
lock xadd dword [rcx], edi
dec edi
cmp edi, 0xffffffff
jne 0x140014867
call fcn.1400daaa8
mov rax, rbx
add rsp, 0x50
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret