Function at 0x140002ee0
Capabilities:
Create service

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x4c8
mov ebp, ecx
mov rax, qword [0x140038010]
xor rax, rsp
mov qword [rsp + 0x4c0], rax
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x140002fc4
mov r15, rax
lea rsi, [rsp + 0xa0]
xor ecx, ecx
mov rdx, rsi
mov r8d, 0x105
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14000300c
lea rdx, str.MozillaMaintenance
mov rcx, r15
mov r8d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x140003054
test rbx, rbx
jne 0x140003054
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003e25
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140039fa8]
lea rdx, str.Could_not_open_service.____d_
mov r8d, eax
int3
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003da3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140039fa8]
lea rdx, str.Could_not_open_service_manager.____d_
mov r8d, eax
int3
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003de4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140039fa8]
lea rdx, str.Could_not_obtain_module_filename_when_attempting_to_install_service.____d_
mov r8d, eax
int3
test rbx, rbx
je 0x140003184
mov qword [rsp + 0x2b0], 0
lea rdx, [rsp + 0x2b0]
mov rcx, rbx
call fcn.1400048e0
mov esi, eax
mov rcx, qword [rsp + 0x2b0]
test rcx, rcx
je 0x14000308e
call qword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x1400030d3
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003e66
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140039fa8]
lea rdx, str.Could_not_reset_security_ACE_on_service_handle._It_might_not_be_possible_to_start_the_service._This_error_should_never_happen.____d_
mov r8d, eax
int3
lea r9, [rsp + 0x94]
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x1400030fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140003721
mov esi, dword [rsp + 0x94]
mov rcx, rsi
call fcn.14000e5ac
mov r14, rax
lea r9, [rsp + 0x94]
mov rcx, rbx
mov rdx, rax
mov r8d, esi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x140003282
cmp byte [0x14003a1c8], 0
jne 0x14000330b
mov rdi, qword [r14 + 0x10]
mov rcx, rdi
call fcn.1400176d8
cmp rax, 3
jb 0x1400032c8
mov rsi, rax
lea rdx, str.maintenanceservice_tmp.exe
mov rcx, rdi
call fcn.140010478
test rax, rax
jne 0x1400032c8
cmp word [rdi], 0x22
jne 0x1400032c8
cmp word [rdi + rsi*2 - 2], 0x22
sete sil
jmp 0x1400032ca
mov edi, 1
test ebp, ebp
je 0x1400040e4
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
lea rdx, str.MozillaMaintenance
lea r8, str.Mozilla_Maintenance_Service
mov rcx, r15
mov r9d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
je 0x14000379c
mov qword [rsp + 0x2b0], 0
lea rdx, [rsp + 0x2b0]
mov rcx, rbx
call fcn.1400048e0
mov esi, eax
mov rcx, qword [rsp + 0x2b0]
test rcx, rcx
je 0x140003227
call qword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x14000326c
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003f6a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140039fa8]
lea rdx, str.Could_not_set_security_ACE_on_service_handle__the_service_will_not_be_able_to_be_started_from_unelevated_processes._This_error_should_never_happen.____d_
mov r8d, eax
int3
mov rcx, rbx
call fcn.1400029d0
test rbx, rbx
jne 0x1400040e9
jmp 0x1400040f2
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003ea7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140039fa8]
lea rdx, str.Could_open_service_but_could_not_query_service_config.____d_
mov r8d, eax
int3
xor esi, esi
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003ee8
lea rcx, [0x140039fa8]
test sil, sil
je 0x1400037da
lea rdx, str.The_MozillaMaintenance_service_path_is_correct.
int3
mov rcx, qword [r14 + 0x10]
call qword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
mov rcx, qword [r14 + 0x10]
lea rax, [rsp + 0x84]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x90]
lea r8, [rsp + 0x8c]
lea r9, [rsp + 0x88]
int3
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003f29
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140039fa8]
lea rdx, str.Could_not_determine_buffer_size_for_query_service_config.____d_
jmp 0x140002fac
mov eax, dword [0x14003a1b8]
mov ecx, dword [0x140038cbc]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003fec
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140039fa8]
lea rdx, str.Could_not_create_Windows_service._This_error_should_never_happen_since_a_service_install_should_only_be_called_when_elevated.____d_
jmp 0x140002fac
lea rdx, str.The_MozillaMaintenance_path_is_NOT_correct._It_was:__ls
mov r8, rdi
int3
lea rcx, [0x14003a1b8]
int3
lea rcx, [0x14003a1b8]
int3
lea rcx, [0x14003a1b8]
int3
lea rcx, [0x14003a1b8]
int3
lea rcx, [0x14003a1b8]
int3
lea rcx, [0x14003a1b8]
int3
lea rcx, [0x14003a1b8]
int3
lea rcx, [0x14003a1b8]
int3
lea rcx, [0x14003a1b8]
int3
test rbx, rbx
je 0x1400040f2
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x4c0]
xor rcx, rsp
call fcn.1400195d0
mov eax, edi
add rsp, 0x4c8
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret