Function at 0x1400027ec
Capabilities:
Copy file
Create service
Delete file
Get installed programs
Move file
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
lea rbp, [rax - 0x2d8]
sub rsp, 0x3d0
mov rax, qword [0x14002c008]
xor rax, rsp
mov qword [rbp + 0x2c0], rax
mov edi, ecx
mov dword [rsp + 0x70], ecx
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
xor ebx, ebx
mov rsi, rax
test rax, rax
jne 0x140002872
mov ecx, dword [0x14002df0c]
lea eax, [rsi + 1]
test al, cl
jne 0x140002863
or ecx, eax
mov qword [0x14002df50], rbx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service_manager.____d_
jmp 0x1400028bf
mov r8d, 0x105
lea rdx, [rbp - 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1400028d5
mov ecx, dword [0x14002df0c]
mov eax, 1
test al, cl
jne 0x1400028b2
or ecx, eax
mov qword [0x14002df50], rbx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_obtain_module_filename_when_attempting_to_install_service.____d_
mov r8d, eax
lea rcx, [0x14002df50]
call fcn.140007060
mov edi, ebx
jmp 0x1400032df
mov r8d, 0xf01ff
lea rdx, str.MozillaMaintenance
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
test rbx, rbx
jne 0x140002a73
cmp eax, 0x424
je 0x140002940
mov ecx, dword [0x14002df0c]
lea eax, [rdx + 1]
test al, cl
jne 0x14000292e
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service.____d_
jmp 0x140002b3f
test edi, edi
jne 0x14000294e
mov edi, 1
jmp 0x1400032d1
lea rcx, [rbp - 0x50]
call qword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
xor eax, eax
lea r8, str.Mozilla_Maintenance_Service
mov qword [rsp + 0x60], rax
lea rdx, str.MozillaMaintenance
mov qword [rsp + 0x58], rax
mov edi, 1
mov qword [rsp + 0x50], rax
mov r9d, 0xf01ff
mov qword [rsp + 0x48], rax
mov rcx, rsi
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
xor ecx, ecx
mov rbx, rax
test rax, rax
jne 0x1400029f4
mov eax, dword [0x14002df0c]
test dil, al
jne 0x1400029e2
or eax, edi
mov qword [0x14002df50], rcx
lea rcx, [0x14001dc10]
mov dword [0x14002df0c], eax
call fcn.140007614
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.____d_
jmp 0x140002b3f
mov qword [rsp + 0x78], rcx
lea rdx, [rsp + 0x78]
mov rcx, rax
call fcn.1400036e4
mov rcx, qword [rsp + 0x78]
mov dword [rsp + 0x74], eax
test rcx, rcx
je 0x140002a1e
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x74]
xor ecx, ecx
test eax, eax
je 0x140002a66
mov eax, dword [0x14002df0c]
test dil, al
jne 0x140002a4a
or eax, edi
mov qword [0x14002df50], rcx
lea rcx, [0x14001dc10]
mov dword [0x14002df0c], eax
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
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_
lea rcx, [0x14002df50]
call fcn.140007060
mov rcx, rbx
call fcn.140002218
jmp 0x1400032d1
mov qword [rsp + 0x78], rdx
mov rcx, rbx
lea rdx, [rsp + 0x78]
call fcn.1400036e4
mov rcx, qword [rsp + 0x78]
mov dword [rsp + 0x74], eax
test rcx, rcx
je 0x140002a9d
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x74]
xor ecx, ecx
mov edi, 1
test eax, eax
je 0x140002aea
mov eax, dword [0x14002df0c]
test dil, al
jne 0x140002ace
or eax, edi
mov qword [0x14002df50], rcx
lea rcx, [0x14001dc10]
mov dword [0x14002df0c], eax
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
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_
lea rcx, [0x14002df50]
call fcn.140007060
lea r9, [rbp - 0x78]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140002b57
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140002b57
mov eax, dword [0x14002df0c]
test dil, al
jne 0x140002b32
and qword [0x14002df50], 0
lea rcx, [0x14001dc10]
or eax, edi
mov dword [0x14002df0c], eax
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_determine_buffer_size_for_query_service_config.____d_
mov r8d, eax
lea rcx, [0x14002df50]
call fcn.140007060
xor edx, edx
mov edi, edx
jmp 0x1400032d1
mov ecx, dword [rbp - 0x78]
call fcn.14000762c
mov r8d, dword [rbp - 0x78]
lea r9, [rbp - 0x78]
mov rdx, rax
mov rcx, rbx
mov rdi, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
xor edx, edx
test eax, eax
jne 0x140002bca
mov ecx, dword [0x14002df0c]
lea eax, [rdx + 1]
test al, cl
jne 0x140002ba4
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Could_open_service_but_could_not_query_service_config.____d_
lea rcx, [0x14002df50]
call fcn.140007060
and dword [rsp + 0x70], 0
jmp 0x1400032c0
cmp dword [0x14002e368], edx
jne 0x140002c9a
mov rdx, qword [rdi + 0x10]
lea r8, [rsp + 0x74]
mov rcx, rbx
call fcn.140002554
xor r8d, r8d
test eax, eax
jne 0x140002c3d
mov ecx, dword [0x14002df0c]
lea eax, [r8 + 1]
test al, cl
jne 0x140002c17
or ecx, eax
mov qword [0x14002df50], r8
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Could_not_fix_service_path._This_should_never_happen.____d_
lea rcx, [0x14002df50]
call fcn.140007060
mov eax, 1
jmp 0x1400032bc
cmp dword [rsp + 0x74], r8d
je 0x140002c9a
mov edx, dword [0x14002df0c]
mov eax, 1
mov dword [0x14002e368], eax
test al, dl
jne 0x140002c74
or edx, eax
mov qword [0x14002df50], r8
lea rcx, [0x14001dc10]
mov dword [0x14002df0c], edx
call fcn.140007614
mov r8d, dword [rsp + 0x70]
lea rdx, str.Restarting_install_action:__d
lea rcx, [0x14002df50]
call fcn.140007008
mov ecx, dword [rsp + 0x70]
call fcn.1400027ec
jmp 0x1400032bc
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
mov rcx, qword [rdi + 0x10]
lea rax, [rsp + 0x78]
lea r9, [rbp - 0x6c]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x70]
lea rdx, [rbp - 0x74]
call fcn.1400020d4
mov dword [rbp - 0x80], eax
lea r9, [rbp - 0x64]
lea rax, [rbp - 0x68]
lea r8, [rbp - 0x60]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x74]
lea rcx, [rbp - 0x50]
call fcn.1400020d4
xor edx, edx
test eax, eax
jne 0x140002d2b
mov ecx, dword [0x14002df0c]
lea eax, [rdx + 1]
test al, cl
jne 0x140002d13
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea rdx, str.Could_not_obtain_version_number_from_new_path
lea rcx, [0x14002df50]
call fcn.140007060
xor r9d, r9d
jmp 0x140002d93
cmp dword [rsp + 0x70], 2
je 0x140002d74
cmp dword [rbp - 0x80], edx
je 0x140002d74
mov eax, dword [rsp + 0x74]
cmp dword [rbp - 0x74], eax
jb 0x140002d74
jne 0x140002d5f
mov eax, dword [rbp - 0x60]
cmp dword [rbp - 0x70], eax
jb 0x140002d74
jne 0x140002d5f
mov eax, dword [rbp - 0x64]
cmp dword [rbp - 0x6c], eax
jb 0x140002d74
jne 0x140002d5f
mov eax, dword [rbp - 0x68]
cmp dword [rsp + 0x78], eax
jb 0x140002d74
mov r8d, 4
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x140002c33
mov rcx, rbx
call fcn.140002218
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
call fcn.140003318
xor r9d, r9d
test eax, eax
jne 0x140002d9d
mov dword [rsp + 0x70], r9d
jmp 0x1400032c0
mov r8, qword [rdi + 0x10]
lea rax, [rbp - 0x50]
sub r8, rax
movzx ecx, word [rax]
movzx edx, word [rax + r8]
sub ecx, edx
jne 0x140002dbc
add rax, 2
test edx, edx
jne 0x140002da8
test ecx, ecx
jne 0x140002e06
mov ecx, dword [0x14002df0c]
mov eax, 1
test al, cl
jne 0x140002dea
or ecx, eax
mov qword [0x14002df50], r9
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea r8, [rbp - 0x50]
lea rdx, str.File_is_already_in_the_correct_location__no_action_needed_for_upgrade.__The_path_is:___ls_
lea rcx, [0x14002df50]
call fcn.140007008
jmp 0x140002c33
mov rdx, qword [rdi + 0x10]
lea rcx, [rbp - 0x50]
xor r8d, r8d
mov dword [rsp + 0x70], 1
call qword [sym.imp.KERNEL32.dll_CopyFileW]
xor edx, edx
test eax, eax
jne 0x1400030db
mov ecx, dword [0x14002df0c]
lea eax, [rdx + 1]
test al, cl
jne 0x140002e51
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Could_not_overwrite_old_service_binary_file._This_should_never_happen__but_if_it_does_the_next_upgrade_will_fix_it__the_service_is_not_a_critical_component_that_needs_to_be_installed_for_upgrades_to_work.____d_
lea rcx, [0x14002df50]
call fcn.140007060
mov rcx, qword [rdi + 0x10]
or r9, 0xffffffffffffffff
mov rax, r9
xor edx, edx
inc rax
cmp word [rcx + rax*2], dx
jne 0x140002e7a
mov qword [rbp - 0x80], rax
cmp rax, 3
jbe 0x140003093
lea rcx, [rax + 1]
mov eax, 2
mul rcx
cmovo rax, r9
mov rcx, rax
call fcn.14000762c
mov r8, qword [rbp - 0x80]
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x78], rax
lea r8, [r8*2 + 2]
call fcn.140008760
mov r8, qword [rbp - 0x80]
mov rdx, qword [rdi + 0x10]
mov rcx, qword [rsp + 0x78]
call fcn.1400094a0
mov rax, qword [rbp - 0x80]
lea rdx, [0x140026ef8]
mov rcx, qword [rsp + 0x78]
mov r8d, 3
lea rcx, [rcx + rax*2]
add rcx, 0xfffffffffffffffa
call fcn.1400094a0
mov rdx, qword [rsp + 0x78]
mov r8d, 9
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
xor edx, edx
test eax, eax
je 0x14000302e
mov rdx, qword [rdi + 0x10]
lea rcx, [rbp - 0x50]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [0x14002df0c]
xor edx, edx
test eax, eax
lea eax, [rdx + 1]
jne 0x140002f72
test al, cl
jne 0x140002f57
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea rdx, str.The_new_service_binary_could_not_be_copied_in._The_service_will_not_be_upgraded.
lea rcx, [0x14002df50]
call fcn.140007060
xor eax, eax
mov dword [rsp + 0x70], eax
jmp 0x140002fa4
test al, cl
jne 0x140002f91
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea rdx, str.The_new_service_binary_was_copied_in_by_first_moving_the_old_one_out_of_the_way.
lea rcx, [0x14002df50]
call fcn.140007008
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [0x14002df0c]
xor edx, edx
test eax, eax
lea eax, [rdx + 1]
je 0x140002ffa
test al, cl
jne 0x140002fdd
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
mov r8, qword [rsp + 0x78]
lea rdx, str.The_old_temp_service_path_was_deleted:__ls.
lea rcx, [0x14002df50]
call fcn.140007008
jmp 0x140003084
test al, cl
jne 0x140003019
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea rdx, str.The_old_temp_service_path_was_not_deleted.
lea rcx, [0x14002df50]
call fcn.140007060
jmp 0x140003084
mov ecx, dword [0x14002df0c]
mov eax, 1
test al, cl
jne 0x140003058
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, qword [rsp + 0x78]
lea rdx, str.Could_not_move_old_service_file_out_of_the_way_from:___ls__to___ls_._Service_will_not_be_upgraded.____d_
mov r8, qword [rdi + 0x10]
lea rcx, [0x14002df50]
mov dword [rsp + 0x20], eax
call fcn.140007060
xor eax, eax
mov dword [rsp + 0x70], eax
mov rcx, qword [rsp + 0x78]
call fcn.140007668
jmp 0x14000322b
mov ecx, dword [0x14002df0c]
mov eax, 1
test al, cl
jne 0x1400030bd
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea rdx, str.Service_binary_path_was_less_than_3__service_will_not_be_updated.__This_should_never_happen.
lea rcx, [0x14002df50]
call fcn.140007060
xor eax, eax
mov dword [rsp + 0x70], eax
jmp 0x14000322b
mov r8d, pe_nt_image_headers64
lea rcx, [rbp + 0x1c0]
call fcn.140008760
mov eax, dword [rbp - 0x68]
lea r8, str._d._d._d._d
mov r9d, dword [rsp + 0x74]
lea rcx, [rbp + 0x1c0]
mov dword [rsp + 0x30], eax
mov edx, 0x80
mov eax, dword [rbp - 0x64]
mov dword [rsp + 0x28], eax
mov eax, dword [rbp - 0x60]
mov dword [rsp + 0x20], eax
call fcn.1400011e8
lea rax, [rbp - 0x80]
mov r9d, 0x20206
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionUninstallMozillaMaintenanceService
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor edx, edx
test eax, eax
jne 0x1400031af
lea rax, [rbp + 0x1c0]
or r9, 0xffffffffffffffff
inc r9
cmp word [rax + r9*2], dx
jne 0x140003156
mov rcx, qword [rbp - 0x80]
lea eax, [r9*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.DisplayVersion
lea rax, [rbp + 0x1c0]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp - 0x80]
mov dword [rsp + 0x78], eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edx, edx
cmp dword [rsp + 0x78], edx
mov eax, edx
sete al
test eax, eax
jne 0x1400031ee
mov ecx, dword [0x14002df0c]
mov eax, 1
test al, cl
jne 0x1400031d9
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea rdx, str.The_uninstaller_version_string_could_not_be_updated.
lea rcx, [0x14002df50]
call fcn.140007008
xor edx, edx
mov ecx, dword [0x14002df0c]
mov eax, 1
test al, cl
jne 0x140003218
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea rdx, str.The_new_service_binary_was_copied_in.
lea rcx, [0x14002df50]
call fcn.140007008
xor edx, edx
lea rcx, [rbp - 0x50]
lea r8d, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [0x14002df0c]
xor edx, edx
test eax, eax
lea eax, [rdx + 1]
je 0x140003282
test al, cl
jne 0x140003269
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea r8, [rbp - 0x50]
lea rdx, str.Deleting_the_old_file_path_on_the_next_reboot:__ls.
lea rcx, [0x14002df50]
call fcn.140007008
jmp 0x1400032b8
test al, cl
jne 0x1400032a1
or ecx, eax
mov qword [0x14002df50], rdx
mov dword [0x14002df0c], ecx
lea rcx, [0x14001dc10]
call fcn.140007614
lea r8, [rbp - 0x50]
lea rdx, str.Call_to_delete_the_old_file_path_failed:__ls.
lea rcx, [0x14002df50]
call fcn.140007060
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x70], eax
test rdi, rdi
je 0x1400032cd
mov rcx, rdi
call fcn.140007668
mov edi, dword [rsp + 0x70]
test rbx, rbx
je 0x1400032df
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rsi, rsi
je 0x1400032ed
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
mov rcx, qword [rbp + 0x2c0]
xor rcx, rsp
call fcn.140007360
lea r11, [rsp + 0x3d0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret