Function at 0x1400cfef0
Capabilities:
Modify service

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x160
mov rdi, rcx
mov rax, qword [0x14025e040]
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 0x1400d005c
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14012d270
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [rdi + 0x17], 0
mov rdx, rdi
jns 0x1400cff50
mov rdx, qword [rdi]
mov rcx, rsi
mov r8d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
je 0x1400d0102
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.14012d270
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 0x1400d001f
lea rcx, str....._brave_browser_brave_vpnwin_brave_vpn_wireguard_serviceinstall_utils.cc
mov edx, 0x4f
call fcn.14012cfd0
test eax, eax
jle 0x1400d001f
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.1400e3be0
lea rcx, [rsp + 0x38]
lea rdx, str.ChangeServiceConfig2_failed:
mov r8d, 0x1c
call fcn.140111880
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.1400ce850
mov rcx, r15
mov edx, eax
call fcn.1400c2cc0
mov rcx, r14
call fcn.1400e41f0
call fcn.14012d270
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.14012d270
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x158]
xor rcx, rsp
call fcn.140156d40
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.14012cfd0
test eax, eax
jle 0x1400d00fb
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.1400e3be0
lea rcx, [rsp + 0x38]
lea rdx, str.::OpenSCManager_failed._service_name:
mov r8d, 0x26
call fcn.140111880
mov rcx, rax
mov rdx, rdi
call fcn.1400e0bb0
lea rdx, str.__error:
mov r8d, 9
mov rcx, rax
call fcn.140111880
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.1400ce850
mov rcx, rdi
mov edx, eax
call fcn.1400c2cc0
mov rcx, rsi
call fcn.1400e41f0
xor edi, edi
jmp 0x1400d003b
lea rcx, str....._brave_browser_brave_vpnwin_brave_vpn_wireguard_serviceinstall_utils.cc
mov edx, 0x4f
call fcn.14012cfd0
test eax, eax
jle 0x1400d01a1
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.1400e3be0
lea rcx, [rsp + 0x38]
lea rdx, str.Failed_to_create_service_name:
mov r8d, 0x1f
call fcn.140111880
mov rcx, rax
mov rdx, rdi
call fcn.1400e0bb0
lea rdx, str.__error:
mov r8d, 9
mov rcx, rax
call fcn.140111880
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.1400ce850
mov rcx, rdi
mov edx, eax
call fcn.1400c2cc0
mov rcx, rbx
call fcn.1400e41f0
xor edi, edi
jmp 0x1400d002d