Function at 0x140050640
Capabilities:
Check mutex on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov rdi, r9
mov rbx, r8
mov r14, rdx
mov rsi, rcx
mov r15, qword [rsp + 0xe0]
mov rax, qword [0x14037e038]
xor rax, rsp
mov qword [rsp + 0x70], rax
lea rdx, [r15 + 8]
movabs rax, 0xaaaaaaaaaaaaaaaa
lea r12, [rsp + 0x50]
mov qword [r12 + 0x10], rax
movaps xmm0, xmmword [0x1402fd120]
movaps xmmword [r12], xmm0
movzx eax, byte [r15 + 0x1f]
mov r8d, eax
and r8d, 0x7f
test al, al
cmovs rdx, qword [r15 + 8]
cmovs r8, qword [r15 + 0x10]
add r8, r8
lea rbp, [rsp + 0x38]
mov rcx, rbp
call fcn.14012a780
mov rcx, r12
mov rdx, rax
call fcn.140063b00
lea rdx, str.GlobalChromeSetupMutex_
mov rcx, rbp
mov r8, r12
call fcn.14002ef60
cmp byte [rbp + 0x17], 0
jns 0x1400506e7
mov rbp, qword [rsp + 0x38]
xor r13d, r13d
xor ecx, ecx
xor edx, edx
mov r8, rbp
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
test rax, rax
je 0x140050721
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
cmp r12, 0xffffffffffffffff
je 0x1400509dc
call fcn.14014c890
mov r13, r12
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rsp + 0x4f], 0
jns 0x140050732
mov rcx, qword [rsp + 0x38]
call fcn.1401a08c8
lea rax, [r13 + 1]
cmp rax, 1
ja 0x14005078c
mov qword [rsi], 0
lea rax, [r13 + 1]
cmp rax, 2
jb 0x14005075a
call fcn.14014c890
mov rcx, r13
call fcn.140139570
cmp byte [rsp + 0x67], 0
jns 0x14005076b
mov rcx, qword [rsp + 0x50]
call fcn.1401a08c8
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1401a2070
mov rax, rsi
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x20], rdi
lea rdx, str.GlobalChromeSetupExitEvent_
lea r12, [rsp + 0x38]
lea r8, [rsp + 0x50]
mov rcx, r12
call fcn.14002ef60
cmp byte [r12 + 0x17], 0
jns 0x1400507b7
mov r12, qword [rsp + 0x38]
xor edi, edi
xor ecx, ecx
mov edx, 1
xor r8d, r8d
mov r9, r12
call qword [sym.imp.KERNEL32.dll_CreateEventW]
test rax, rax
je 0x1400507f8
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
cmp rbp, 0xffffffffffffffff
je 0x1400509e4
call fcn.14014c890
mov rdi, rbp
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rsp + 0x4f], 0
jns 0x140050809
mov rcx, qword [rsp + 0x38]
call fcn.1401a08c8
lea rax, [rdi + 1]
cmp rax, 1
ja 0x14005083a
mov qword [rsi], 0
lea rax, [rdi + 1]
cmp rax, 2
jb 0x140050743
call fcn.14014c890
mov rcx, rdi
call fcn.140139570
jmp 0x140050743
mov ecx, 0x20
call fcn.1401a088c
mov r12, rax
call fcn.14014c890
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov qword [rsp + 0x30], rdi
call fcn.14014c890
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x28], 0
call fcn.14014c890
test r13, r13
je 0x140050893
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov qword [rsp + 0x28], r13
call fcn.14014c890
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, [rsp + 0x28]
lea r8, [rsp + 0x30]
mov rcx, r12
call fcn.140050a40
lea rdx, str.GlobalChromeSetupExitEventMutex_
lea rbp, [rsp + 0x38]
lea r8, [rsp + 0x50]
mov rcx, rbp
call fcn.14002ef60
cmp byte [rbp + 0x17], 0
jns 0x1400508c9
mov rbp, qword [rsp + 0x38]
xor r13d, r13d
xor ecx, ecx
xor edx, edx
mov r8, rbp
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
test rax, rax
je 0x140050903
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
cmp rdi, 0xffffffffffffffff
je 0x140050a34
call fcn.14014c890
mov r13, rdi
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rsp + 0x4f], 0
jns 0x140050914
mov rcx, qword [rsp + 0x38]
call fcn.1401a08c8
lea rax, [r13 + 1]
cmp rax, 1
ja 0x140050983
mov qword [rsi], 0
jbe 0x140050934
call fcn.14014c890
mov rcx, r13
call fcn.140139570
test r12, r12
je 0x140050979
mov rcx, r12
add rcx, 0x10
call fcn.140155e40
mov rcx, qword [r12 + 8]
cmp rcx, 0xffffffffffffffff
je 0x140050956
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rax, qword [r12]
inc rax
cmp rax, 2
jb 0x140050971
call fcn.14014c890
mov rcx, qword [r12]
call fcn.140139570
mov rcx, r12
call fcn.1401a08c8
xor r13d, r13d
xor edi, edi
jmp 0x14005081a
mov rcx, r13
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, 0xffffff7f
je 0x1400509a1
mov qword [rsi], 0
jmp 0x140050927
lea rbp, [r12 + 0x10]
mov rcx, rbp
call fcn.1401552f0
mov rdi, qword [r12]
mov rcx, rdi
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, 0xffffff7f
je 0x1400509eb
mov qword [rsi], 0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x140050927
xor r13d, r13d
jmp 0x140050719
xor edi, edi
jmp 0x1400507ef
mov qword [r12 + 8], rdi
mov rcx, rbp
call fcn.140155e70
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
call fcn.14014c890
mov rcx, r13
call fcn.140139570
mov rdi, qword [rsp + 0x20]
mov rcx, rdi
call fcn.140218c80
mov rcx, r15
mov rdx, r14
mov r8, rbx
mov r9, rdi
call fcn.140051690
mov qword [rsi], r12
jmp 0x140050979
xor r13d, r13d
jmp 0x1400508fb