Function at 0x1400d18c0
Capabilities:
Modify service

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x160
mov rdi, rcx
mov rax, qword [0x14026c040]
xor rax, rsp
mov qword [rsp + 0x158], rax
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x1400d1a36
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14013e120
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rdi + 0x17], 0
mov rdx, rdi
jns 0x1400d1920
mov rdx, qword [rdi]
mov rcx, rsi
mov r8d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
je 0x1400d1adc
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.14013e120
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r8, [rsp + 0x24]
mov dword [r8], 1
mov rcx, rbx
mov edx, 5
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
setne dil
jne 0x1400d19ef
lea rcx, str....._brave_browser_brave_vpnwin_brave_vpn_wireguard_serviceinstall_utils.cc
mov edx, 0x4f
call fcn.14013de20
test eax, eax
jle 0x1400d19ef
lea rdx, str....._brave_browser_brave_vpnwin_brave_vpn_wireguard_serviceinstall_utils.cc
lea r14, [rsp + 0x28]
mov rcx, r14
mov r8d, 0xa5
mov r9d, 0xffffffff
call fcn.1400e3120
lea rcx, [rsp + 0x38]
lea rdx, str.ChangeServiceConfig2_failed:
mov r8d, 0x1c
call fcn.14011f4a0
mov r15, rax
mov rax, qword [rax]
movsxd rax, dword [rax + 4]
mov ecx, dword [r15 + rax + 8]
and ecx, 0xffffffb5
or ecx, 8
mov dword [r15 + rax + 8], ecx
call fcn.1400d0600
mov rcx, r15
mov edx, eax
call fcn.1400c2d60
mov rcx, r14
call fcn.1400e3710
call fcn.14013e120
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.14013e120
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x158]
xor rcx, rsp
cmp rcx, qword [0x14026c040]
je 0x1400d1a25
call fcn.140169190
int3
mov eax, edi
add rsp, 0x160
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
lea rcx, str....._brave_browser_brave_vpnwin_brave_vpn_wireguard_serviceinstall_utils.cc
mov edx, 0x4f
call fcn.14013de20
test eax, eax
jle 0x1400d1ad5
lea rdx, str....._brave_browser_brave_vpnwin_brave_vpn_wireguard_serviceinstall_utils.cc
lea rsi, [rsp + 0x28]
mov rcx, rsi
mov r8d, reloc.OLEAUT32.dll_SysAllocStringByteLen
mov r9d, 0xffffffff
call fcn.1400e3120
lea rcx, [rsp + 0x38]
lea rdx, str.::OpenSCManager_failed._service_name:
mov r8d, 0x26
call fcn.14011f4a0
mov rcx, rax
mov rdx, rdi
call fcn.1400dfe70
lea rdx, str.__error:
mov r8d, 9
mov rcx, rax
call fcn.14011f4a0
mov rdi, rax
mov rax, qword [rax]
movsxd rax, dword [rax + 4]
mov ecx, dword [rdi + rax + 8]
and ecx, 0xffffffb5
or ecx, 8
mov dword [rdi + rax + 8], ecx
call fcn.1400d0600
mov rcx, rdi
mov edx, eax
call fcn.1400c2d60
mov rcx, rsi
call fcn.1400e3710
xor edi, edi
jmp 0x1400d1a0b
lea rcx, str....._brave_browser_brave_vpnwin_brave_vpn_wireguard_serviceinstall_utils.cc
mov edx, 0x4f
call fcn.14013de20
test eax, eax
jle 0x1400d1b7b
lea rdx, str....._brave_browser_brave_vpnwin_brave_vpn_wireguard_serviceinstall_utils.cc
lea rbx, [rsp + 0x28]
mov rcx, rbx
mov r8d, 0x9d
mov r9d, 0xffffffff
call fcn.1400e3120
lea rcx, [rsp + 0x38]
lea rdx, str.Failed_to_create_service_name:
mov r8d, 0x1f
call fcn.14011f4a0
mov rcx, rax
mov rdx, rdi
call fcn.1400dfe70
lea rdx, str.__error:
mov r8d, 9
mov rcx, rax
call fcn.14011f4a0
mov rdi, rax
mov rax, qword [rax]
movsxd rax, dword [rax + 4]
mov ecx, dword [rdi + rax + 8]
and ecx, 0xffffffb5
or ecx, 8
mov dword [rdi + rax + 8], ecx
call fcn.1400d0600
mov rcx, rdi
mov edx, eax
call fcn.1400c2d60
mov rcx, rbx
call fcn.1400e3710
xor edi, edi
jmp 0x1400d19fd