Function at 0x140051ed0
Capabilities:
Check mutex on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x98
mov r14, r9
mov rbx, r8
mov rdi, rdx
mov rsi, rcx
mov r15, qword [rsp + 0x100]
mov rax, qword [0x14036c038]
xor rax, rsp
mov qword [rsp + 0x90], rax
lea rdx, [r15 + 8]
movabs rax, 0xaaaaaaaaaaaaaaaa
lea r12, [rsp + 0x70]
mov qword [r12 + 0x10], rax
movaps xmm0, xmmword [0x1402fa4a0]
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 + 0x58]
mov rcx, rbp
call fcn.14011e0c0
mov rcx, r12
mov rdx, rax
call fcn.1401f77c0
lea rdx, str.GlobalChromeSetupMutex_
mov rcx, rbp
mov r8, r12
call fcn.14002ea40
cmp byte [rbp + 0x17], 0
jns 0x140051f7d
mov rbp, qword [rsp + 0x58]
xor r13d, r13d
xor ecx, ecx
xor edx, edx
mov r8, rbp
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
test rax, rax
je 0x140051fb7
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
cmp r12, 0xffffffffffffffff
je 0x140052309
call fcn.14013d7b0
mov r13, r12
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rsp + 0x6f], 0
jns 0x140051fc8
mov rcx, qword [rsp + 0x58]
call fcn.14018e000
lea rax, [r13 + 1]
cmp rax, 1
ja 0x14005202b
mov qword [rsi], 0
lea rax, [r13 + 1]
cmp rax, 2
jb 0x140051ff0
call fcn.14013d7b0
mov rcx, r13
call fcn.14012a160
cmp byte [rsp + 0x87], 0
jns 0x140052004
mov rcx, qword [rsp + 0x70]
call fcn.14018e000
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.14018f840
mov rax, rsi
add rsp, 0x98
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x40], rbx
lea rdx, str.GlobalChromeSetupExitEvent_
lea r12, [rsp + 0x58]
lea r8, [rsp + 0x70]
mov rcx, r12
call fcn.14002ea40
cmp byte [r12 + 0x17], 0
jns 0x140052056
mov r12, qword [rsp + 0x58]
xor ebx, ebx
xor ecx, ecx
mov edx, 1
xor r8d, r8d
mov r9, r12
call qword [sym.imp.KERNEL32.dll_CreateEventW]
test rax, rax
je 0x140052097
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
cmp rbp, 0xffffffffffffffff
je 0x140052311
call fcn.14013d7b0
mov rbx, rbp
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rsp + 0x6f], 0
jns 0x1400520a8
mov rcx, qword [rsp + 0x58]
call fcn.14018e000
lea rax, [rbx + 1]
cmp rax, 1
ja 0x1400520d9
mov qword [rsi], 0
lea rax, [rbx + 1]
cmp rax, 2
jb 0x140051fd9
call fcn.14013d7b0
mov rcx, rbx
call fcn.14012a160
jmp 0x140051fd9
mov ecx, 0x20
call fcn.14018dfc4
mov r12, rax
call fcn.14013d7b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov qword [rsp + 0x50], rbx
call fcn.14013d7b0
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov qword [rsp + 0x48], 0
call fcn.14013d7b0
test r13, r13
je 0x140052132
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov qword [rsp + 0x48], r13
call fcn.14013d7b0
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, [rsp + 0x48]
lea r8, [rsp + 0x50]
mov rcx, r12
call fcn.140052320
lea rdx, str.GlobalChromeSetupExitEventMutex_
lea rbp, [rsp + 0x58]
lea r8, [rsp + 0x70]
mov rcx, rbp
call fcn.14002ea40
cmp byte [rbp + 0x17], 0
jns 0x140052168
mov rbp, qword [rsp + 0x58]
xor r13d, r13d
xor ecx, ecx
xor edx, edx
mov r8, rbp
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
test rax, rax
je 0x1400521a2
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
cmp rbx, 0xffffffffffffffff
je 0x140052318
call fcn.14013d7b0
mov r13, rbx
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rsp + 0x6f], 0
jns 0x1400521b3
mov rcx, qword [rsp + 0x58]
call fcn.14018e000
lea rbx, [r13 + 1]
cmp rbx, 1
mov qword [rsp + 0x38], rdi
ja 0x14005225f
mov rdi, r12
mov qword [rsi], 0
mov r12d, 1
cmp rbx, 2
jb 0x1400521e9
call fcn.14013d7b0
mov rcx, r13
call fcn.14012a160
test r12d, r12d
mov rbx, qword [rsp + 0x40]
je 0x14005223f
test rdi, rdi
je 0x140052235
mov rcx, rdi
add rcx, 0x10
call fcn.140149c30
mov rcx, qword [rdi + 8]
cmp rcx, 0xffffffffffffffff
je 0x140052214
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rax, qword [rdi]
inc rax
cmp rax, 2
jb 0x14005222d
call fcn.14013d7b0
mov rcx, qword [rdi]
call fcn.14012a160
mov rcx, rdi
call fcn.14018e000
xor r13d, r13d
xor ebx, ebx
jmp 0x1400520b9
mov rcx, r14
call fcn.1402086d0
mov rcx, r15
mov rdx, qword [rsp + 0x38]
mov r8, rbx
mov r9, r14
call fcn.140052f40
mov qword [rsi], rdi
jmp 0x140052235
lea rcx, [rsp + 0x58]
mov qword [rcx], 0x4c4b40
call fcn.140131640
mov rcx, r13
mov edx, eax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
and eax, 0xffffff7f
xor ebp, ebp
mov ecx, eax
neg ecx
sbb rbp, rbp
test eax, eax
jne 0x1400521c6
or rbp, r13
lea rcx, [r12 + 0x10]
mov qword [rsp + 0x30], rcx
call fcn.1401494c0
mov rdi, qword [r12]
lea rcx, [rsp + 0x58]
mov qword [rcx], 0x4c4b40
call fcn.140131640
mov qword [rsp + 0x28], rdi
mov rcx, rdi
mov edx, eax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, 0xffffff7f
je 0x1400522ed
mov rdi, r12
mov qword [rsi], 0
mov r12d, 1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x1400521d6
mov rdi, r12
mov rax, qword [rsp + 0x28]
mov qword [r12 + 8], rax
mov rcx, qword [rsp + 0x30]
call fcn.140149c60
xor r12d, r12d
jmp 0x1400522df
xor r13d, r13d
jmp 0x140051faf
xor ebx, ebx
jmp 0x14005208e
xor r13d, r13d
jmp 0x14005219a