Function at 0x140002608
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 0x14000268e
mov ecx, dword [0x14002def4]
lea eax, [rsi + 1]
test al, cl
jne 0x14000267f
or ecx, eax
mov qword [0x14002df30], rbx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service_manager.____d_
jmp 0x1400026db
mov r8d, 0x105
lea rdx, [rbp - 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1400026f1
mov ecx, dword [0x14002def4]
mov eax, 1
test al, cl
jne 0x1400026ce
or ecx, eax
mov qword [0x14002df30], rbx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
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, [0x14002df30]
call fcn.140007010
mov edi, ebx
jmp 0x1400030fb
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 0x14000288f
cmp eax, 0x424
je 0x14000275c
mov ecx, dword [0x14002def4]
lea eax, [rdx + 1]
test al, cl
jne 0x14000274a
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_open_service.____d_
jmp 0x14000295b
test edi, edi
jne 0x14000276a
mov edi, 1
jmp 0x1400030ed
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 0x140002810
mov eax, dword [0x14002def4]
test dil, al
jne 0x1400027fe
or eax, edi
mov qword [0x14002df30], rcx
lea rcx, [0x14001da60]
mov dword [0x14002def4], eax
call fcn.1400075b4
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 0x14000295b
mov qword [rsp + 0x78], rcx
lea rdx, [rsp + 0x78]
mov rcx, rbx
call fcn.140003500
mov rcx, qword [rsp + 0x78]
mov dword [rsp + 0x74], eax
test rcx, rcx
je 0x14000283a
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x74]
xor ecx, ecx
test eax, eax
je 0x140002882
mov eax, dword [0x14002def4]
test dil, al
jne 0x140002866
or eax, edi
mov qword [0x14002df30], rcx
lea rcx, [0x14001da60]
mov dword [0x14002def4], eax
call fcn.1400075b4
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, [0x14002df30]
call fcn.140007010
mov rcx, rbx
call fcn.140002034
jmp 0x1400030ed
mov qword [rsp + 0x78], rdx
mov rcx, rbx
lea rdx, [rsp + 0x78]
call fcn.140003500
mov rcx, qword [rsp + 0x78]
mov dword [rsp + 0x74], eax
test rcx, rcx
je 0x1400028b9
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [rsp + 0x74]
xor ecx, ecx
mov edi, 1
test eax, eax
je 0x140002906
mov eax, dword [0x14002def4]
test dil, al
jne 0x1400028ea
or eax, edi
mov qword [0x14002df30], rcx
lea rcx, [0x14001da60]
mov dword [0x14002def4], eax
call fcn.1400075b4
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, [0x14002df30]
call fcn.140007010
lea r9, [rbp - 0x78]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x140002973
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140002973
mov eax, dword [0x14002def4]
test dil, al
jne 0x14000294e
and qword [0x14002df30], 0
lea rcx, [0x14001da60]
or eax, edi
mov dword [0x14002def4], eax
call fcn.1400075b4
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, [0x14002df30]
call fcn.140007010
xor edx, edx
mov edi, edx
jmp 0x1400030ed
mov ecx, dword [rbp - 0x78]
call fcn.1400075cc
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 0x1400029e6
mov ecx, dword [0x14002def4]
lea eax, [rdx + 1]
test al, cl
jne 0x1400029c0
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
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, [0x14002df30]
call fcn.140007010
and dword [rsp + 0x70], 0
jmp 0x1400030dc
cmp dword [0x14002e354], edx
jne 0x140002ab6
mov rdx, qword [rdi + 0x10]
lea r8, [rsp + 0x74]
mov rcx, rbx
call fcn.140002370
xor r8d, r8d
test eax, eax
jne 0x140002a59
mov ecx, dword [0x14002def4]
lea eax, [r8 + 1]
test al, cl
jne 0x140002a33
or ecx, eax
mov qword [0x14002df30], r8
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
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, [0x14002df30]
call fcn.140007010
mov eax, 1
jmp 0x1400030d8
cmp dword [rsp + 0x74], r8d
je 0x140002ab6
mov edx, dword [0x14002def4]
mov eax, 1
mov dword [0x14002e354], eax
test al, dl
jne 0x140002a90
or edx, eax
mov qword [0x14002df30], r8
lea rcx, [0x14001da60]
mov dword [0x14002def4], edx
call fcn.1400075b4
mov r8d, dword [rsp + 0x70]
lea rdx, str.Restarting_install_action:__d
lea rcx, [0x14002df30]
call fcn.140006fb8
mov ecx, dword [rsp + 0x70]
call fcn.140002608
jmp 0x1400030d8
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.140001ef0
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.140001ef0
xor edx, edx
test eax, eax
jne 0x140002b47
mov ecx, dword [0x14002def4]
lea eax, [rdx + 1]
test al, cl
jne 0x140002b2f
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea rdx, str.Could_not_obtain_version_number_from_new_path
lea rcx, [0x14002df30]
call fcn.140007010
xor r9d, r9d
jmp 0x140002baf
cmp dword [rsp + 0x70], 2
je 0x140002b90
cmp dword [rbp - 0x80], edx
je 0x140002b90
mov eax, dword [rsp + 0x74]
cmp dword [rbp - 0x74], eax
jb 0x140002b90
jne 0x140002b7b
mov eax, dword [rbp - 0x60]
cmp dword [rbp - 0x70], eax
jb 0x140002b90
jne 0x140002b7b
mov eax, dword [rbp - 0x64]
cmp dword [rbp - 0x6c], eax
jb 0x140002b90
jne 0x140002b7b
mov eax, dword [rbp - 0x68]
cmp dword [rsp + 0x78], eax
jb 0x140002b90
mov r8d, 4
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x140002a4f
mov rcx, rbx
call fcn.140002034
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
call fcn.140003134
xor r9d, r9d
test eax, eax
jne 0x140002bb9
mov dword [rsp + 0x70], r9d
jmp 0x1400030dc
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 0x140002bd8
add rax, 2
test edx, edx
jne 0x140002bc4
test ecx, ecx
jne 0x140002c22
mov ecx, dword [0x14002def4]
mov eax, 1
test al, cl
jne 0x140002c06
or ecx, eax
mov qword [0x14002df30], r9
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
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, [0x14002df30]
call fcn.140006fb8
jmp 0x140002a4f
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 0x140002ef7
mov ecx, dword [0x14002def4]
lea eax, [rdx + 1]
test al, cl
jne 0x140002c6d
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
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, [0x14002df30]
call fcn.140007010
mov rcx, qword [rdi + 0x10]
or r9, 0xffffffffffffffff
mov rax, r9
xor edx, edx
inc rax
cmp word [rcx + rax*2], dx
jne 0x140002c96
mov qword [rbp - 0x80], rax
cmp rax, 3
jbe 0x140002eaf
lea rcx, [rax + 1]
mov eax, 2
mul rcx
cmovo rax, r9
mov rcx, rax
call fcn.1400075cc
mov r8, qword [rbp - 0x80]
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x78], rax
lea r8, [r8*2 + 2]
call fcn.140008490
mov r8, qword [rbp - 0x80]
mov rdx, qword [rdi + 0x10]
mov rcx, qword [rsp + 0x78]
call fcn.14000903c
mov rax, qword [rbp - 0x80]
lea rdx, [0x140026e28]
mov rcx, qword [rsp + 0x78]
mov r8d, 3
lea rcx, [rcx + rax*2]
add rcx, 0xfffffffffffffffa
call fcn.14000903c
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 0x140002e4a
mov rdx, qword [rdi + 0x10]
lea rcx, [rbp - 0x50]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [0x14002def4]
xor edx, edx
test eax, eax
lea eax, [rdx + 1]
jne 0x140002d8e
test al, cl
jne 0x140002d73
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea rdx, str.The_new_service_binary_could_not_be_copied_in._The_service_will_not_be_upgraded.
lea rcx, [0x14002df30]
call fcn.140007010
xor eax, eax
mov dword [rsp + 0x70], eax
jmp 0x140002dc0
test al, cl
jne 0x140002dad
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea rdx, str.The_new_service_binary_was_copied_in_by_first_moving_the_old_one_out_of_the_way.
lea rcx, [0x14002df30]
call fcn.140006fb8
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [0x14002def4]
xor edx, edx
test eax, eax
lea eax, [rdx + 1]
je 0x140002e16
test al, cl
jne 0x140002df9
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
mov r8, qword [rsp + 0x78]
lea rdx, str.The_old_temp_service_path_was_deleted:__ls.
lea rcx, [0x14002df30]
call fcn.140006fb8
jmp 0x140002ea0
test al, cl
jne 0x140002e35
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea rdx, str.The_old_temp_service_path_was_not_deleted.
lea rcx, [0x14002df30]
call fcn.140007010
jmp 0x140002ea0
mov ecx, dword [0x14002def4]
mov eax, 1
test al, cl
jne 0x140002e74
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
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, [0x14002df30]
mov dword [rsp + 0x20], eax
call fcn.140007010
xor eax, eax
mov dword [rsp + 0x70], eax
mov rcx, qword [rsp + 0x78]
call fcn.140007608
jmp 0x140003047
mov ecx, dword [0x14002def4]
mov eax, 1
test al, cl
jne 0x140002ed9
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea rdx, str.Service_binary_path_was_less_than_3__service_will_not_be_updated.__This_should_never_happen.
lea rcx, [0x14002df30]
call fcn.140007010
xor eax, eax
mov dword [rsp + 0x70], eax
jmp 0x140003047
mov r8d, 0x100
lea rcx, [rbp + 0x1c0]
call fcn.140008490
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.140001008
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 0x140002fcb
lea rax, [rbp + 0x1c0]
or r9, 0xffffffffffffffff
inc r9
cmp word [rax + r9*2], dx
jne 0x140002f72
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 0x14000300a
mov ecx, dword [0x14002def4]
mov eax, 1
test al, cl
jne 0x140002ff5
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea rdx, str.The_uninstaller_version_string_could_not_be_updated.
lea rcx, [0x14002df30]
call fcn.140006fb8
xor edx, edx
mov ecx, dword [0x14002def4]
mov eax, 1
test al, cl
jne 0x140003034
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea rdx, str.The_new_service_binary_was_copied_in.
lea rcx, [0x14002df30]
call fcn.140006fb8
xor edx, edx
lea rcx, [rbp - 0x50]
lea r8d, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [0x14002def4]
xor edx, edx
test eax, eax
lea eax, [rdx + 1]
je 0x14000309e
test al, cl
jne 0x140003085
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea r8, [rbp - 0x50]
lea rdx, str.Deleting_the_old_file_path_on_the_next_reboot:__ls.
lea rcx, [0x14002df30]
call fcn.140006fb8
jmp 0x1400030d4
test al, cl
jne 0x1400030bd
or ecx, eax
mov qword [0x14002df30], rdx
mov dword [0x14002def4], ecx
lea rcx, [0x14001da60]
call fcn.1400075b4
lea r8, [rbp - 0x50]
lea rdx, str.Call_to_delete_the_old_file_path_failed:__ls.
lea rcx, [0x14002df30]
call fcn.140007010
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x70], eax
test rdi, rdi
je 0x1400030e9
mov rcx, rdi
call fcn.140007608
mov edi, dword [rsp + 0x70]
test rbx, rbx
je 0x1400030fb
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rsi, rsi
je 0x140003109
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
mov rcx, qword [rbp + 0x2c0]
xor rcx, rsp
call fcn.140007300
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