Function at 0x140009064
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x78
mov r14, rcx
lea r8, [rcx + 0x20]
lea rcx, [rbp + 0x40]
lea rdx, str._BraveSoftware_Update_logging_mutex_
call fcn.140009c94
mov rsi, rax
xor r15d, r15d
mov rcx, qword [rax]
mov rdx, rcx
movzx r8d, word [rcx]
jmp 0x1400090b0
cmp r8w, 0x5c
je 0x140009184
add rdx, 2
movzx r8d, word [rdx]
test r8w, r8w
jne 0x14000909d
add rcx, 0xffffffffffffffe8
call fcn.140001ab0
lea rbx, [rax + 0x18]
mov qword [rbp + 0x38], rbx
lea rdx, [rbp + 0x38]
lea rcx, [r14 + 0x10]
call fcn.140001868
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400090ee
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rbp + 0x40]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14000910c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rsi, [0x140045cb8]
mov qword [rbp - 0x38], r15
lea rcx, [rbp - 0x40]
mov qword [rbp - 0x40], rsi
call fcn.1400044f4
mov rdx, qword [rbp - 0x38]
mov rax, r15
mov qword [rbp - 0x18], rsi
mov qword [rbp - 0x10], rax
test rdx, rdx
je 0x140009145
lea rcx, [rbp - 0x18]
call fcn.140003a3c
mov rax, qword [rbp - 0x10]
mov rbx, qword [r14 + 0x10]
mov dword [rbp - 0x30], 0x18
mov qword [rbp - 0x28], rax
mov dword [rbp - 0x20], r15d
call fcn.14000ac44
mov rax, qword [0x140052988]
lea rcx, [rbp - 0x30]
test rax, rax
je 0x140009230
mov r9d, 0x100001
xor r8d, r8d
mov rdx, rbx
call rax
jmp 0x14000923b
sub rdx, rcx
sar rdx, 1
cmp edx, 0xffffffff
je 0x1400090b6
call fcn.1400014ec
mov rcx, rax
test rax, rax
je 0x1400093ed
mov rax, qword [rax]
call qword [rax + 0x18]
mov rcx, qword [rsi]
mov edi, r15d
add rax, 0x18
mov qword [rbp + 0x38], rax
cmp dword [rcx - 0x10], r15d
jle 0x1400091fa
mov rbx, r15
cmp edi, dword [rcx - 0x10]
jg 0x1400093f8
movzx edx, word [rbx + rcx]
cmp dx, 0x5c
je 0x1400091dd
lea rcx, [rbp + 0x38]
call fcn.140005684
mov rcx, qword [rsi]
inc edi
add rbx, 2
cmp edi, dword [rcx - 0x10]
jge 0x1400091f6
test rbx, rbx
js 0x1400093f8
jmp 0x1400091c1
mov rax, qword [rbp + 0x38]
lea rdi, [rax - 0x18]
mov rcx, rdi
call fcn.140001ab0
lea rbx, [rax + 0x18]
or eax, 0xffffffff
mov qword [rbp + 0x38], rbx
lock xadd dword [rdi + 0x10], eax
sub eax, 1
jg 0x1400090c7
mov rcx, qword [rdi]
mov rdx, rdi
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x1400090c7
mov r8, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [r14 + 0x18], rax
test rax, rax
je 0x140009254
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
sete bl
jmp 0x140009257
mov bl, r15b
mov rcx, qword [rbp - 0x10]
mov edi, 0x8000
mov qword [rbp - 0x18], rsi
test rcx, rcx
je 0x14000931f
lea r8, [rbp + 0x40]
mov word [rbp + 0x38], r15w
lea rdx, [rbp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x140009312
test word [rbp + 0x38], di
jne 0x140009312
mov rcx, qword [rbp - 0x10]
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x50]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
mov rcx, qword [rbp + 0x50]
call fcn.1400258c8
mov rcx, qword [rbp - 0x10]
lea r8, [rbp + 0x40]
lea rdx, [rbp - 0x58]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorGroup]
mov rcx, qword [rbp - 0x58]
call fcn.1400258c8
mov rcx, qword [rbp - 0x10]
lea r9, [rbp + 0x40]
lea r8, [rbp - 0x50]
lea rdx, [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
cmp dword [rbp + 0x48], r15d
je 0x1400092ed
mov rcx, qword [rbp - 0x50]
call fcn.1400258c8
mov rcx, qword [rbp - 0x10]
lea r9, [rbp + 0x40]
lea r8, [rbp - 0x48]
lea rdx, [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
cmp dword [rbp + 0x48], r15d
je 0x140009312
mov rcx, qword [rbp - 0x48]
call fcn.1400258c8
mov rcx, qword [rbp - 0x10]
call fcn.1400258c8
mov qword [rbp - 0x10], r15
mov rcx, qword [rbp - 0x38]
mov qword [rbp - 0x40], rsi
test rcx, rcx
je 0x1400093de
lea r8, [rbp + 0x40]
mov word [rbp + 0x38], r15w
lea rdx, [rbp + 0x38]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorControl]
test eax, eax
je 0x1400093d5
test word [rbp + 0x38], di
jne 0x1400093d5
mov rcx, qword [rbp - 0x38]
lea r8, [rbp + 0x40]
lea rdx, [rbp + 0x50]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
mov rcx, qword [rbp + 0x50]
call fcn.1400258c8
mov rcx, qword [rbp - 0x38]
lea r8, [rbp + 0x40]
lea rdx, [rbp - 0x48]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorGroup]
mov rcx, qword [rbp - 0x48]
call fcn.1400258c8
mov rcx, qword [rbp - 0x38]
lea r9, [rbp + 0x40]
lea r8, [rbp - 0x50]
lea rdx, [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
cmp dword [rbp + 0x48], r15d
je 0x1400093b0
mov rcx, qword [rbp - 0x50]
call fcn.1400258c8
mov rcx, qword [rbp - 0x38]
lea r9, [rbp + 0x40]
lea r8, [rbp - 0x58]
lea rdx, [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
cmp dword [rbp + 0x48], r15d
je 0x1400093d5
mov rcx, qword [rbp - 0x58]
call fcn.1400258c8
mov rcx, qword [rbp - 0x38]
call fcn.1400258c8
mov al, bl
add rsp, 0x78
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ecx, 0x80004005
call fcn.1400013e0
int3
mov ecx, 0x80070057
call fcn.1400013e0
int3