Function at 0x140002080
Capabilities:
Check mutex on windows

Disassembly:
mov rax, rsp
push rbp
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140010008]
xor rax, rsp
mov qword [rbp - 8], rax
mov rbx, rcx
mov qword [rbp - 0x30], rcx
lea rdx, str.ProcessMaintenance_1
lea rcx, [0x140010748]
call fcn.1400018a0
lea r8, str.BGMaintenanceInstance
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400022b9
call fcn.140004ea0
test al, al
jne 0x14000218b
call fcn.1400052d0
test al, al
jne 0x14000218b
mov qword [rbp - 0x10], 7
xor edi, edi
mov qword [rbp - 0x18], rdi
mov word [rbp - 0x28], di
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x28]
call fcn.1400059b0
lea rcx, [rbp - 0x28]
call fcn.140004710
lea rcx, [0x140010748]
test al, al
jne 0x14000217f
lea rdx, str.maintenance:_Only_handle_when_there_is_no_update_folder_
call fcn.1400018a0
mov qword [rbp - 0x10], 7
mov qword [rbp - 0x18], rdi
mov word [rbp - 0x28], di
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x28]
call fcn.1400059b0
lea rcx, [rbp - 0x28]
call fcn.1400025a0
jmp 0x1400022cc
lea rdx, str.maintenance:_no_need_to_handle_Maintenance_task
jmp 0x1400022c7
lea rdx, str.maintenance:_need_to_uninstall_BG_because_conflict_with_PCM_or_LE_____UninstallBatteryGauge
lea rcx, [0x140010748]
call fcn.1400018a0
mov qword [rbp - 0x10], 7
xor edi, edi
mov qword [rbp - 0x18], rdi
mov word [rbp - 0x28], di
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x28]
call fcn.1400059b0
nop
mov qword [rbp - 0x40], 7
mov qword [rbp - 0x48], rdi
mov word [rbp - 0x58], di
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x58]
call fcn.1400059b0
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x58]
call fcn.140005380
movzx eax, word [str.Uninstall.ps1]
neg ax
sbb r8, r8
and r8d, 0xd
lea rdx, str.Uninstall.ps1
lea rcx, [rbp - 0x28]
call fcn.140005c30
mov qword [rbp - 0x40], 7
mov qword [rbp - 0x48], rdi
mov word [rbp - 0x58], di
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x58]
call fcn.1400059b0
lea rcx, [rbp - 0x58]
call fcn.1400039f0
nop
mov rax, qword [rbp - 0x10]
cmp rax, 8
jb 0x1400022cc
inc rax
mov rcx, qword [rbp - 0x28]
movabs rdx, 0x7fffffffffffffff
cmp rax, rdx
jbe 0x14000226a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
add rax, rax
cmp rax, 0x1000
jb 0x1400022b2
test byte [rbp - 0x28], 0x1f
je 0x140002282
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140002292
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
sub rcx, rax
cmp rcx, 8
jae 0x1400022a2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
cmp rcx, 0x27
jbe 0x1400022af
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rax
call fcn.1400073b0
jmp 0x1400022cc
lea rdx, str.maintenance_error:__a_BGMaintenanceInstance_is_running_for_Maintenance__
lea rcx, [0x140010748]
call fcn.1400018a0
mov ecx, 0x7530
call qword [sym.imp.KERNEL32.dll_Sleep]
test rsi, rsi
je 0x1400022e6
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rbx
call fcn.140005600
xor eax, eax
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140007350
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret