Function at 0x140002c00
Capabilities:
Create service

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x518
mov ebp, ecx
mov rax, qword [0x140036030]
xor rax, rsp
mov qword [rsp + 0x510], rax
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x140002ccb
mov rsi, rax
lea rdi, [rsp + 0xc0]
xor ecx, ecx
mov rdx, rdi
mov r8d, 0x105
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140002d0c
lea rdx, str.MozillaMaintenance
mov rcx, rsi
mov r8d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rbx, rbx
jne 0x140002d4d
cmp eax, 0x424
je 0x140002d4d
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003d35
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service.____lu_
jmp 0x140002d3e
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003cb3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service_manager.____lu_
mov r8d, eax
int3
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003cf4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_obtain_module_filename_when_attempting_to_install_service.____lu_
mov r8d, eax
int3
test rbx, rbx
je 0x1400030d1
lea r14, [rsp + 0x2d0]
mov qword [r14], 0
mov rcx, rbx
mov rdx, r14
call fcn.140004550
mov edi, eax
mov rcx, qword [r14]
test rcx, rcx
je 0x140002d80
call qword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x140002dbe
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003d76
call qword [sym.imp.KERNEL32.dll_GetLastError]
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.____lu_
mov r8d, eax
int3
lea r9, [rsp + 0x9c]
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140002de7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140003370
lea r14, [rsp + 0x9c]
mov r15d, dword [r14]
mov rcx, r15
call fcn.14000a428
mov rdi, rax
mov rcx, rbx
mov rdx, rax
mov r8d, r15d
mov r9, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x1400031b8
cmp byte [0x140038114], 0
je 0x1400031ff
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
mov rcx, qword [rdi + 0x10]
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x98]
lea r8, [rsp + 0x94]
lea r9, [rsp + 0x90]
int3
test ebp, ebp
je 0x140003366
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x38], rdi
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, rsi
mov r9d, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
test rax, rax
je 0x1400033ae
mov rbx, rax
lea r14, [rsp + 0x2d0]
mov qword [r14], 0
mov rcx, rax
mov rdx, r14
call fcn.140004550
mov edi, eax
mov rcx, qword [r14]
test rcx, rcx
je 0x140003168
call qword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x1400031a6
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003f03
call qword [sym.imp.KERNEL32.dll_GetLastError]
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.____lu_
mov r8d, eax
int3
mov rcx, rbx
call fcn.1400026f0
mov ebp, 1
jmp 0x140003420
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003db7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_open_service_but_could_not_query_service_config.____lu_
mov r8d, eax
int3
mov r14, qword [rdi + 0x10]
mov rcx, r14
call fcn.140013abc
cmp rax, 3
jb 0x14000326e
mov r15, rax
lea rdx, str.maintenanceservice_tmp.exe
mov rcx, r14
call fcn.14000bb2c
test rax, rax
jne 0x14000326e
cmp word [r14], 0x22
jne 0x14000326e
cmp word [r14 + r15*2 - 2], 0x22
jne 0x14000326e
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14000414c
lea rdx, str.The_MozillaMaintenance_service_path_is_correct.
int3
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003df8
lea rdx, str.The_MozillaMaintenance_path_is_NOT_correct._It_was:__ls
mov r8, r14
int3
mov ebp, 1
jmp 0x140003429
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003ec2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_determine_buffer_size_for_query_service_config.____lu_
mov r8d, eax
int3
mov eax, dword [0x140038330]
mov ecx, dword [0x140036d60]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003f44
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_create_Windows_service._This_error_should_never_happen_since_a_service_install_should_only_be_called_when_elevated.____lu_
jmp 0x140002d3e
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x510]
xor rcx, rsp
call fcn.140018400
mov eax, ebp
add rsp, 0x518
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3
lea rcx, [0x140038330]
int3