Function at 0x1400a31f0
Capabilities:
Check mutex on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov qword [rbp - 0x39], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1401a3008]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov rbx, rcx
mov qword [rbp - 0x31], rcx
xor r12d, r12d
mov qword [rcx], r12
mov qword [rcx + 8], 0xffffffffffffffff
mov qword [rcx + 0x10], 0xffffffffffffffff
lea ecx, [r12 + 0x20]
call fcn.1400cac48
mov rdi, rax
mov qword [rbp - 9], rax
add rax, 8
xor ecx, ecx
mov qword [rax], rcx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rcx
and qword [rax], 1
mov qword [rax + 8], rax
mov qword [rax + 0x10], rax
and qword [rax], 0xfffffffffffffffe
mov qword [rdi], r12
mov r15d, edi
shr r15d, 2
mov r14, rdi
shr r14, 0x20
bts r14d, 0x1e
mov qword [rbp + 0x1f], r12
mov qword [rbp + 0x27], r12
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0xf]
call fcn.140018f70
nop
mov qword [rbp - 0x19], r12
mov qword [rbp - 0x11], r12
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x29]
call fcn.140018f70
nop
lea rcx, [rbp + 0xf]
call fcn.1400a30c0
lea r8d, [r12 + 0x13]
lea rdx, str.bipc_gmap_sem_lock_
lea rcx, [rbp - 0x29]
call fcn.140019090
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x29]
call fcn.140019430
lea r8, [rbp - 0x29]
cmp qword [rbp - 0x11], 0x10
cmovae r8, qword [rbp - 0x29]
cmp qword [rbx], r12
jne 0x1400a3312
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [rbx], rax
test rax, rax
setne sil
jmp 0x1400a3315
xor sil, sil
mov r8d, shutdown
lea rdx, str.bipc_gmap_sem_count_
lea rcx, [rbp - 0x29]
call fcn.140019090
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x29]
call fcn.140019430
xor eax, eax
mov qword [rbp + 7], rax
mov qword [rbp - 1], rbx
mov rcx, qword [rbx]
call fcn.1400a4880
mov byte [rbp + 7], 1
test sil, sil
je 0x1400a339a
lea r9, [rbp - 0x29]
cmp qword [rbp - 0x11], 0x10
cmovae r9, qword [rbp - 0x29]
cmp qword [rbx + 0x10], 0xffffffffffffffff
jne 0x1400a339a
xor edx, edx
xor ecx, ecx
mov r8d, 0x7fffffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbx + 0x10], 0xffffffffffffffff
setne al
test al, al
je 0x1400a339a
mov sil, 1
jmp 0x1400a339d
xor sil, sil
mov r8d, reloc.WS2_32.dll_select
lea rdx, str.bipc_gmap_sem_map_
lea rcx, [rbp - 0x29]
call fcn.140019090
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp + 0xf]
lea rcx, [rbp - 0x29]
call fcn.140019430
test sil, sil
je 0x1400a346f
lea r9, [rbp - 0x29]
cmp qword [rbp - 0x11], 0x10
cmovae r9, qword [rbp - 0x29]
cmp qword [rbx + 8], 0xffffffffffffffff
jne 0x1400a346f
mov r8d, r14d
mov edx, r15d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov qword [rbx + 8], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
setne cl
cmp qword [rbx + 8], 0xffffffffffffffff
setne al
test al, al
je 0x1400a346f
test cl, cl
jne 0x1400a342e
mov rcx, rdi
call fcn.1400a41c0
mov edx, 0x20
mov rcx, rdi
call fcn.1400cb664
lea r8, [rbp - 9]
mov edx, 1
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
nop
lea rcx, [rbp - 1]
call fcn.1400a4940
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x29]
call fcn.140018f70
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0xf]
call fcn.140018f70
nop
mov rax, rbx
jmp 0x1400a3499
mov rcx, rdi
call fcn.1400a41c0
mov edx, 0x20
mov rcx, rdi
call fcn.1400cb664
mov dword [rbp - 9], r12d
lea rdx, [0x14017fbb0]
lea rcx, [rbp - 9]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400ca980
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret