Function at 0x140008df0
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x2f]
sub rsp, 0xc8
mov r14, rcx
lea r8, [rcx + 0x20]
lea rcx, [rbp - 0x29]
lea rdx, str._BraveSoftware_Update_logging_mutex_
call fcn.140009a74
mov rsi, rax
xor r15d, r15d
mov rcx, qword [rax]
mov rdx, rcx
movzx r8d, word [rcx]
jmp 0x140008e41
cmp r8w, 0x5c
je 0x140008f19
add rdx, 2
movzx r8d, word [rdx]
test r8w, r8w
jne 0x140008e2e
add rcx, 0xffffffffffffffe8
call fcn.140001a9c
add rax, 0x18
mov qword [rbp - 0x61], rax
lea rdx, [rbp - 0x61]
lea rcx, [r14 + 0x10]
call fcn.140001858
mov rdx, qword [rbp - 0x61]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140008e83
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rbp - 0x29]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140008ea1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rdi, [0x14004bf78]
mov qword [rbp - 0x69], r15
lea rcx, [rbp - 0x71]
mov qword [rbp - 0x71], rdi
call fcn.1400043bc
mov rdx, qword [rbp - 0x69]
mov rax, r15
mov qword [rbp - 0x41], rdi
mov qword [rbp - 0x39], rax
test rdx, rdx
je 0x140008eda
lea rcx, [rbp - 0x41]
call fcn.14000398c
mov rax, qword [rbp - 0x39]
mov rbx, qword [r14 + 0x10]
mov dword [rbp - 0x59], 0x18
mov qword [rbp - 0x51], rax
mov dword [rbp - 0x49], r15d
call fcn.14000a9ac
mov rax, qword [0x140057948]
lea rcx, [rbp - 0x59]
test rax, rax
je 0x140008fc3
mov r9d, 0x100001
xor r8d, r8d
mov rdx, rbx
call rax
jmp 0x140008fce
sub rdx, rcx
sar rdx, 1
cmp edx, 0xffffffff
je 0x140008e47
call fcn.1400014b8
mov rcx, rax
test rax, rax
je 0x14000918e
mov rax, qword [rax]
call qword [rax + 0x18]
mov rcx, qword [rsi]
mov edi, r15d
add rax, 0x18
mov qword [rbp + 0x67], rax
cmp dword [rcx - 0x10], r15d
jle 0x140008f8d
mov rbx, r15
test rbx, rbx
js 0x140009183
cmp edi, dword [rcx - 0x10]
jg 0x140009183
movzx edx, word [rbx + rcx]
cmp dx, 0x5c
je 0x140008f7e
lea rcx, [rbp + 0x67]
call fcn.140005a30
mov rcx, qword [rsi]
inc edi
add rbx, 2
cmp edi, dword [rcx - 0x10]
jl 0x140008f56
mov rax, qword [rbp + 0x67]
lea rbx, [rax - 0x18]
mov rcx, rbx
call fcn.140001a9c
add rax, 0x18
mov qword [rbp - 0x61], rax
or eax, 0xffffffff
lock xadd dword [rbx + 0x10], eax
sub eax, 1
jg 0x140008e58
mov rcx, qword [rbx]
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x140008e58
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [r14 + 0x18], rax
test rax, rax
je 0x140008fe7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
sete bl
jmp 0x140008fea
mov bl, r15b
mov rcx, qword [rbp - 0x39]
mov esi, 0x8000
mov qword [rbp - 0x41], rdi
test rcx, rcx
je 0x1400090b2
lea r8, [rbp - 0x31]
mov word [rbp + 0x67], r15w
lea rdx, [rbp + 0x67]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x1400090a5
test word [rbp + 0x67], si
jne 0x1400090a5
mov rcx, qword [rbp - 0x39]
lea r8, [rbp + 0x6f]
lea rdx, [rbp - 0x21]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
mov rcx, qword [rbp - 0x21]
call fcn.140026a60
mov rcx, qword [rbp - 0x39]
lea r8, [rbp + 0x6f]
lea rdx, [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorGroup]
mov rcx, qword [rbp - 0x19]
call fcn.140026a60
mov rcx, qword [rbp - 0x39]
lea r9, [rbp + 0x6f]
lea r8, [rbp - 0x11]
lea rdx, [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
cmp dword [rbp + 0x77], r15d
je 0x140009080
mov rcx, qword [rbp - 0x11]
call fcn.140026a60
mov rcx, qword [rbp - 0x39]
lea r9, [rbp + 0x6f]
lea r8, [rbp - 9]
lea rdx, [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
cmp dword [rbp + 0x77], r15d
je 0x1400090a5
mov rcx, qword [rbp - 9]
call fcn.140026a60
mov rcx, qword [rbp - 0x39]
call fcn.140026a60
mov qword [rbp - 0x39], r15
mov rcx, qword [rbp - 0x69]
mov qword [rbp - 0x71], rdi
test rcx, rcx
je 0x140009171
lea r8, [rbp - 0x2d]
mov word [rbp + 0x67], r15w
lea rdx, [rbp + 0x67]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x140009168
test word [rbp + 0x67], si
jne 0x140009168
mov rcx, qword [rbp - 0x69]
lea r8, [rbp + 0x7f]
lea rdx, [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
mov rcx, qword [rbp - 1]
call fcn.140026a60
mov rcx, qword [rbp - 0x69]
lea r8, [rbp + 0x7f]
lea rdx, [rbp + 7]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorGroup]
mov rcx, qword [rbp + 7]
call fcn.140026a60
mov rcx, qword [rbp - 0x69]
lea r9, [rbp + 0x7f]
lea r8, [rbp + 0xf]
lea rdx, [rbp - 0x79]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
cmp dword [rbp - 0x79], r15d
je 0x140009143
mov rcx, qword [rbp + 0xf]
call fcn.140026a60
mov rcx, qword [rbp - 0x69]
lea r9, [rbp + 0x7f]
lea r8, [rbp + 0x17]
lea rdx, [rbp - 0x79]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
cmp dword [rbp - 0x79], r15d
je 0x140009168
mov rcx, qword [rbp + 0x17]
call fcn.140026a60
mov rcx, qword [rbp - 0x69]
call fcn.140026a60
mov al, bl
add rsp, 0xc8
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x80070057
call fcn.140001834
int3
mov ecx, 0x80004005
call fcn.140001834
int3