Function at 0x140008380
Capabilities:
Check mutex on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xd0
mov qword [rbp - 0x29], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1404716f0]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rsi, rcx
mov qword [rbp - 0x21], rcx
xor ebx, ebx
mov qword [rcx], rbx
mov qword [rcx + 8], 0xffffffffffffffff
mov qword [rcx + 0x10], 0xffffffffffffffff
lea ecx, [rbx + 0x20]
call fcn.14010a334
mov r14, rax
mov qword [rbp - 0x51], rax
mov qword [rbp - 0x59], rax
add rax, 8
mov qword [r14 + 0x10], rbx
mov qword [r14 + 0x18], rbx
mov qword [rax], rbx
mov qword [rax + 8], rax
mov qword [rax + 0x10], rax
and qword [rax], 0xfffffffffffffffe
mov qword [r14], rbx
mov eax, r14d
shr eax, 2
mov dword [rbp - 0x65], eax
mov rax, r14
shr rax, 0x20
bts eax, 0x1e
mov qword [rbp - 0x51], rax
mov byte [rbp - 0x69], bl
mov qword [rbp - 0x59], rbx
mov qword [rbp + 0x17], rbx
mov qword [rbp + 0x1f], rbx
mov qword [rbp + 0x17], rbx
mov qword [rbp + 0x1f], SafeArrayGetDim
mov byte [rbp + 7], bl
mov qword [rbp - 9], rbx
mov qword [rbp - 1], rbx
mov qword [rbp - 9], rbx
mov qword [rbp - 1], SafeArrayGetDim
mov byte [rbp - 0x19], bl
lea rcx, [rbp + 7]
call fcn.140007c20
lea r8d, [rbx + 0x13]
lea rdx, str.bipc_gmap_sem_lock_
lea rcx, [rbp - 0x19]
call fcn.140004960
lea r9, [rbp + 7]
mov r15, qword [rbp + 7]
mov r12, qword [rbp + 0x1f]
cmp r12, 0x10
cmovae r9, r15
mov rcx, qword [rbp - 9]
mov rdx, qword [rbp - 1]
mov rax, rdx
sub rax, rcx
mov rdi, qword [rbp + 0x17]
cmp rdi, rax
ja 0x1400084c7
lea rax, [rcx + rdi]
mov qword [rbp - 9], rax
lea rbx, [rbp - 0x19]
cmp rdx, 0x10
cmovae rbx, qword [rbp - 0x19]
add rbx, rcx
mov r8, rdi
mov rdx, r9
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], 0
jmp 0x1400084e7
mov qword [rsp + 0x20], rdi
xor r8d, r8d
mov rdx, rdi
lea rcx, [rbp - 0x19]
call fcn.140005410
mov r12, qword [rbp + 0x1f]
mov rdi, qword [rbp + 0x17]
mov r15, qword [rbp + 7]
lea r8, [rbp - 0x19]
cmp qword [rbp - 1], 0x10
cmovae r8, qword [rbp - 0x19]
cmp qword [rsi], 0
jne 0x140008511
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [rsi], rax
test rax, rax
setne r13b
jmp 0x140008514
xor r13b, r13b
mov r8d, reloc.WS2_32.dll_sendto
lea rdx, str.bipc_gmap_sem_count_
lea rcx, [rbp - 0x19]
call fcn.140004960
lea r9, [rbp + 7]
cmp r12, 0x10
cmovae r9, r15
mov rcx, qword [rbp - 9]
mov rdx, qword [rbp - 1]
mov rax, rdx
sub rax, rcx
cmp rdi, rax
ja 0x140008575
lea rax, [rcx + rdi]
mov qword [rbp - 9], rax
lea rbx, [rbp - 0x19]
cmp rdx, 0x10
cmovae rbx, qword [rbp - 0x19]
add rbx, rcx
mov r8, rdi
mov rdx, r9
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], 0
jmp 0x140008595
mov qword [rsp + 0x20], rdi
xor r8d, r8d
mov rdx, rdi
lea rcx, [rbp - 0x19]
call fcn.140005410
mov r12, qword [rbp + 0x1f]
mov rdi, qword [rbp + 0x17]
mov r15, qword [rbp + 7]
mov qword [rbp - 0x39], rsi
mov byte [rbp - 0x31], 0
mov rbx, qword [rsi]
movabs rax, 0x7fffffffffffffff
mov qword [rbp - 0x49], rax
mov dword [rbp - 0x61], 0xffffffff
lea r8, [rbp - 0x49]
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x41]
call fcn.14000ce10
lea rdx, [rbp - 0x41]
mov rcx, rbx
call fcn.140007ff0
mov byte [rbp - 0x31], 1
test r13b, r13b
je 0x14000861e
lea r9, [rbp - 0x19]
cmp qword [rbp - 1], 0x10
cmovae r9, qword [rbp - 0x19]
cmp qword [rsi + 0x10], 0xffffffffffffffff
jne 0x14000861e
xor edx, edx
xor ecx, ecx
mov r8d, 0x7fffffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
mov qword [rsi + 0x10], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
setne byte [rbp - 0x69]
cmp qword [rsi + 0x10], 0xffffffffffffffff
je 0x14000861e
mov bl, 1
jmp 0x140008620
xor bl, bl
mov r8d, reloc.WS2_32.dll_select
lea rdx, str.bipc_gmap_sem_map_
lea rcx, [rbp - 0x19]
call fcn.140004960
lea rdx, [rbp + 7]
cmp r12, 0x10
cmovae rdx, r15
mov r8, rdi
lea rcx, [rbp - 0x19]
call fcn.1400050c0
test bl, bl
je 0x140008705
lea rdx, [rbp - 0x19]
cmp qword [rbp - 1], 0x10
cmovae rdx, qword [rbp - 0x19]
lea rcx, [rsi + 8]
cmp qword [rcx], 0xffffffffffffffff
jne 0x140008705
lea rax, [rbp - 0x69]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x59]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp - 0x51]
mov r8d, dword [rbp - 0x65]
call fcn.140008300
test al, al
je 0x140008705
cmp byte [rbp - 0x69], 0
jne 0x1400086a3
mov rcx, r14
call fcn.140008a20
lea r8, [rbp - 0x65]
mov edx, 1
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
nop
lea rcx, [rbp - 0x39]
call fcn.14000bba0
nop
lea rcx, [rbp - 0x19]
call fcn.140004900
nop
lea rcx, [rbp + 7]
call fcn.140004900
nop
mov rax, rsi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14010a310
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov rcx, r14
call fcn.140008a20
mov dword [rbp - 0x65], 0
lea rdx, [0x140456c10]
lea rcx, [rbp - 0x65]
call sub.VCRUNTIME140.dll__CxxThrowException
int3