Function at 0x1400017c4
Capabilities:
Check mutex on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x158
xor ebp, ebp
mov r15b, dl
mov rsi, rcx
mov r13d, ebp
mov dword [rsp + 0x1a8], ebp
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea r14, [rsi + 0x50]
mov byte [rsi + 8], r15b
mov dword [rsi + 0x20], eax
cmp r14, rbp
je 0x140001a72
lea ecx, [rbp + 0x40]
call fcn.14001c250
cmp rax, rbp
mov rdi, rax
je 0x14000186b
mov byte [rax], r15b
call fcn.140014ff8
mov rcx, rax
call fcn.1400153dc
lea rcx, section..data
mov byte [rdi + 1], al
mov rdx, qword [section..data]
call qword [rdx + 0x18]
lea rcx, section..data
add rax, 0x18
mov qword [rdi + 8], rax
mov rax, qword [section..data]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rbp
mov qword [rdi + 0x28], rbp
mov qword [rdi + 0x30], rbp
mov qword [rdi + 0x38], rbp
jmp 0x14000186e
mov rdi, rbp
mov rcx, rdi
mov qword [rsp + 0x1a0], rdi
call fcn.1400122bc
cmp eax, ebp
jl 0x140001a65
mov rax, qword [section..data]
lea rcx, section..data
call qword [rax + 0x18]
lea rcx, [rsp + 0x1b0]
add rax, 0x18
mov qword [rsp + 0x1b0], rax
call fcn.140013204
mov r11b, byte [rdi + 1]
mov rbx, qword [rdi + 0x28]
neg r11b
sbb r12d, r12d
and r12d, 2
cmp rbx, qword [rdi + 0x30]
jbe 0x1400018d1
call fcn.14001c0e0
cmp rbx, qword [rdi + 0x30]
jb 0x1400018d8
call fcn.14001c0e0
cmp qword [rdi + 0x28], rbp
mov qword [rsp + 0x80], rbx
jne 0x1400018f0
mov qword [rsp + 0x88], rbp
jmp 0x140001904
mov rax, qword [rdi + 0x30]
sub rax, qword [rdi + 0x28]
sar rax, 8
mov qword [rsp + 0x88], rax
mov ecx, 0x178
call fcn.14001c250
mov rbx, qword [rsp + 0x1b0]
test rax, rax
mov rbp, rax
je 0x1400019f8
mov rdx, qword [rdi + 0x10]
and qword [rsp + 0x108], r13
and word [rsp + 0xf8], r13w
lea rcx, [rsp + 0xf0]
mov qword [rsp + 0x110], 7
call fcn.140003f14
xor eax, eax
mov qword [rbp + 0x18], rax
mov qword [rbp + 0x38], rax
lea ecx, [rax + 7]
mov qword [rbp + 0x40], rcx
mov word [rbp + 0x28], ax
mov qword [rbp + 0x68], rcx
mov qword [rbp + 0x60], rax
mov word [rbp + 0x50], ax
mov qword [rbp + 0x90], rcx
mov qword [rbp + 0x88], rax
lea ecx, [rax + 0x20]
lea r13d, [rax + 1]
mov word [rbp + 0x78], ax
call fcn.14001c250
test rax, rax
je 0x140001997
mov qword [rax], rax
lea rcx, [rax + 8]
test rcx, rcx
je 0x1400019a3
mov qword [rcx], rax
and qword [rbp + 0x170], 0
mov qword [rbp + 0x168], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x48], rax
and qword [rsp + 0x40], 0
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], r12d
lea r9, [0x140012614]
lea rdx, [rsp + 0xf0]
xor r8d, r8d
mov rcx, rbp
mov dword [rsp + 0x28], 7
mov qword [rsp + 0x20], rdi
call fcn.140019b4c
jmp 0x1400019fa
xor ebp, ebp
mov r12, qword [rdi + 0x18]
cmp rbp, r12
je 0x140001a1c
test r12, r12
je 0x140001a18
mov rcx, r12
call fcn.140019f4c
mov rcx, r12
call fcn.14001bc80
mov qword [rdi + 0x18], rbp
test r13b, 1
je 0x140001a3a
cmp qword [rsp + 0x110], 8
jb 0x140001a3a
mov rcx, qword [rsp + 0xf8]
call fcn.14001bc80
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
xor r13d, r13d
cmp eax, r13d
jg 0x140001a5a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov qword [rsp + 0x1a0], r13
mov qword [r14], rdi
lea rcx, [rsp + 0x1a0]
call fcn.1400039bc
call fcn.140014ff8
mov dl, r15b
mov rcx, rax
call fcn.1400152a0
cmp al, r13b
je 0x140001f08
mov rax, qword [section..data]
lea rcx, section..data
call qword [rax + 0x18]
lea rdi, [0x1400371f8]
lea rdx, str.C4F406E5_F024_4e3f_89A7_D5AB7663C3CD
add rax, 0x18
lea rcx, [rsp + 0x1b8]
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], r13
mov dword [rsp + 0x58], r13d
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x68], r13d
call fcn.140002f7c
lea rcx, str._x64
call fcn.14001be70
lea rdx, str._x64
lea rcx, [rsp + 0x1b8]
mov r8d, eax
call fcn.140003ba4
mov rbx, qword [rsp + 0x1b8]
lea r8, [rsp + 0x50]
mov rcx, rbx
mov dl, r15b
call fcn.140006718
or r14d, 0xffffffff
lea rdx, [rbx - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
add eax, r14d
cmp eax, r13d
jg 0x140001b35
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rsp + 0x50]
lea rax, [0x140037258]
lea rcx, [rsp + 0xe0]
mov qword [rsp + 0xd8], rax
call fcn.140002f7c
mov rbp, qword [rsp + 0xe0]
mov rbx, r13
mov r8, rbp
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0xe8], rbx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp rax, r13
mov r12, rax
je 0x140001e48
mov rbx, rax
mov qword [rsp + 0xe8], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140001e48
mov cl, byte [rsi + 8]
lea rdx, [rsi + 0x10]
call fcn.140012ff0
cmp eax, r13d
mov ebx, eax
jge 0x140001c70
mov cl, byte [0x140041fd5]
lea rdx, [0x140042280]
neg cl
sbb rcx, rcx
and rcx, rdx
je 0x140001c12
mov r8d, r14d
mov edx, 8
mov qword [rsp + 0xc0], rcx
call fcn.14000a820
mov dword [rsp + 0xcc], r14d
mov dword [rsp + 0xd0], 8
lea rdx, str._CrashHandler__Failed_to_init_crash_dir__0x_08x_
lea rcx, [rsp + 0xc0]
mov dword [rsp + 0xc8], eax
mov r8d, ebx
call fcn.140001558
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbp - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
add eax, r14d
cmp eax, r13d
jg 0x140001c38
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov qword [rsp + 0x70], rdi
lea rcx, [rsp + 0x70]
call fcn.140001258
mov rdx, qword [rsp + 0x50]
mov eax, r14d
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
add eax, r14d
cmp eax, r13d
jg 0x140001c69
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, ebx
jmp 0x140001f0a
mov rcx, rsi
call fcn.140001f20
cmp eax, r13d
mov ebx, eax
jge 0x140001cdd
mov cl, byte [0x140041fd5]
lea rdx, [0x140042280]
neg cl
sbb rcx, rcx
and rcx, rdx
je 0x140001c12
mov r8d, r14d
mov edx, 8
mov qword [rsp + 0x90], rcx
call fcn.14000a820
mov dword [rsp + 0x9c], r14d
mov dword [rsp + 0xa0], 8
lea rdx, str._CrashHandler__Failed_to_start_Breakpad__0x_08x_
lea rcx, [rsp + 0x90]
mov dword [rsp + 0x98], eax
jmp 0x140001c0a
xor edx, edx
lea rcx, [rsp + 0x120]
mov qword [rsp + 0x118], r13
lea r8d, [rdx + 0x28]
call fcn.14001c940
mov r8d, 0x400
lea rcx, [rsp + 0x118]
mov r9d, r8d
xor edx, edx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.USER32.dll_PeekMessageW]
mov ecx, 0x48
call fcn.14001c250
cmp rax, r13
mov rbx, rax
je 0x140001d3f
mov rcx, rax
mov qword [rax + 0x30], r13
mov qword [rax + 0x38], r13
mov qword [rax + 0x40], r13
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x140001d42
mov rbx, r13
mov rdi, qword [rsi + 0x28]
cmp rbx, rdi
je 0x140001d7f
cmp rdi, r13
je 0x140001d7b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [rdi + 0x30]
cmp rcx, r13
je 0x140001d67
call fcn.14001bc80
mov rcx, rdi
mov qword [rdi + 0x30], r13
mov qword [rdi + 0x38], r13
mov qword [rdi + 0x40], r13
call fcn.14001bc80
mov qword [rsi + 0x28], rbx
mov ecx, 0x28
call fcn.14001c250
cmp rax, r13
mov rbx, rax
je 0x140001da5
lea rax, [0x140037f70]
mov qword [rbx], rax
mov qword [rbx + 0x10], r13
mov qword [rbx + 0x18], r13
jmp 0x140001da8
mov rbx, r13
mov rcx, qword [rsi + 0x30]
cmp rbx, rcx
je 0x140001dc4
cmp rcx, r13
je 0x140001dc0
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rsi + 0x30], rbx
mov rdx, qword [rsi + 0x28]
mov rcx, qword [rsi + 0x30]
mov r9b, r15b
mov r8, rsi
call fcn.14000c010
cmp eax, r13d
mov ebx, eax
jge 0x140001e15
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbp - 0x18]
mov ecx, r14d
lock xadd dword [rdx + 0x10], ecx
add ecx, r14d
cmp ecx, r13d
jg 0x140001e04
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rax, [0x1400371f8]
mov qword [rsp + 0x70], rax
jmp 0x140001c3d
mov rcx, rsi
call fcn.140002d8c
mov rcx, r12
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbp - 0x18]
mov ecx, r14d
lock xadd dword [rdx + 0x10], ecx
add ecx, r14d
cmp ecx, r13d
jg 0x140001e04
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
jmp 0x140001e04
mov al, byte [0x140041fd5]
lea rdx, [0x140042280]
neg al
sbb rcx, rcx
and rcx, rdx
je 0x140001eac
mov esi, 1
mov qword [rsp + 0xa8], rcx
lea edx, [rsi + 7]
mov r8d, esi
call fcn.14000a820
lea r8d, [rsi + 0x3f]
lea rdx, str._CrashHandler__Instance_is_already_running___d_bit___d_
lea rcx, [rsp + 0xa8]
movzx r9d, r15b
mov dword [rsp + 0xb4], esi
mov dword [rsp + 0xb0], eax
mov dword [rsp + 0xb8], 8
call fcn.140001558
cmp rbx, r13
je 0x140001eba
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbp - 0x18]
mov eax, r14d
lock xadd dword [rdx + 0x10], eax
add eax, r14d
cmp eax, r13d
jg 0x140001ed7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x70], rdi
call fcn.140001258
mov rdx, qword [rsp + 0x50]
mov eax, r14d
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
add eax, r14d
cmp eax, r13d
jg 0x140001f08
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
xor eax, eax
add rsp, 0x158
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret