Function at 0x140003160
Capabilities:
Copy file
Create service
Delete file
Move file

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x3b0
mov ebp, ecx
mov rax, qword [0x140036138]
xor rax, rsp
mov qword [rsp + 0x3a8], rax
xor ecx, ecx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x140003233
mov rsi, rax
lea rdi, [rsp + 0x190]
xor ecx, ecx
mov rdx, rdi
mov r8d, 0x105
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14000327b
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 0x1400032c3
cmp eax, 0x424
je 0x1400032c3
mov eax, dword [0x140037038]
mov ecx, dword [0x140037098]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003aaa
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140036e28]
lea rdx, str.Could_not_open_service.____lu_
jmp 0x1400032b4
mov eax, dword [0x140037038]
mov ecx, dword [0x140037098]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003a26
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140036e28]
lea rdx, str.Could_not_open_service_manager.____lu_
mov r8d, eax
call fcn.1400086f0
xor ebp, ebp
jmp 0x140003816
mov eax, dword [0x140037038]
mov ecx, dword [0x140037098]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003a68
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140036e28]
lea rdx, str.Could_not_obtain_module_filename_when_attempting_to_install_service.____lu_
mov r8d, eax
call fcn.1400086f0
xor ebp, ebp
jmp 0x14000380d
test rbx, rbx
je 0x140003579
mov qword [rsp + 0x90], 0
lea rdx, [rsp + 0x90]
mov rcx, rbx
xor r8d, r8d
call fcn.140004420
mov edi, eax
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x140003300
call qword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x140003345
mov eax, dword [0x140037038]
mov ecx, dword [0x140037098]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003aec
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140036e28]
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
call fcn.1400086f0
lea r9, [rsp + 0x8c]
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x14000336e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140003700
mov r14d, dword [rsp + 0x8c]
mov rcx, r14
call fcn.14000a950
mov rdi, rax
lea r9, [rsp + 0x8c]
mov rcx, rbx
mov rdx, rax
mov r8d, r14d
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x140003650
cmp byte [0x140037048], 0
je 0x1400036a0
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
mov rcx, qword [rdi + 0x10]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x84]
lea r8, [rsp + 0x80]
lea r9, [rsp + 0x7c]
call fcn.140003bc0
mov r14d, eax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x190]
lea rdx, [rsp + 0x74]
lea r8, [rsp + 0x70]
lea r9, [rsp + 0x6c]
call fcn.140003bc0
test eax, eax
je 0x140003765
cmp ebp, 2
je 0x14000342b
test r14d, r14d
je 0x14000342b
mov eax, dword [rsp + 0x74]
cmp dword [rsp + 0x84], eax
jae 0x1400037a6
mov rcx, rbx
call fcn.1400028d0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.140003d80
test eax, eax
je 0x14000379f
mov rdx, qword [rdi + 0x10]
lea rcx, [rsp + 0x190]
call fcn.140014858
test eax, eax
je 0x14000383a
mov rdx, qword [rdi + 0x10]
lea rcx, [rsp + 0x190]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140003860
xorps xmm0, xmm0
movaps xmmword [rsp + 0x180], xmm0
movaps xmmword [rsp + 0x170], xmm0
movaps xmmword [rsp + 0x160], xmm0
movaps xmmword [rsp + 0x150], xmm0
movaps xmmword [rsp + 0x140], xmm0
movaps xmmword [rsp + 0x130], xmm0
movaps xmmword [rsp + 0x120], xmm0
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0xf0], xmm0
movaps xmmword [rsp + 0xe0], xmm0
movaps xmmword [rsp + 0xd0], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
mov eax, dword [rsp + 0x68]
mov ecx, dword [rsp + 0x6c]
mov edx, dword [rsp + 0x70]
mov r9d, dword [rsp + 0x74]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], edx
lea r8, str._d._d._d._d
lea rbx, [rsp + 0x90]
mov edx, 0x80
mov rcx, rbx
call fcn.140001d30
mov rcx, rbx
call fcn.140004150
test eax, eax
jne 0x14000355b
call fcn.140001950
lea rdx, str.The_uninstaller_version_string_could_not_be_updated.
mov rcx, rax
call fcn.1400084d0
call fcn.140001950
lea rdx, str.The_new_service_binary_was_copied_in.
mov rcx, rax
call fcn.1400084d0
mov ebp, 1
jmp 0x1400039c8
test ebp, ebp
je 0x1400036f6
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 0x140003727
mov rbx, rax
mov qword [rsp + 0x90], 0
lea rdx, [rsp + 0x90]
mov rcx, rax
xor r8d, r8d
call fcn.140004420
mov edi, eax
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x14000361a
call qword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x14000363e
call fcn.140001950
mov rdi, rax
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 rcx, rdi
mov r8d, eax
call fcn.1400086f0
mov rcx, rbx
call fcn.1400028d0
mov ebp, 1
jmp 0x140003804
mov eax, dword [0x140037038]
mov ecx, dword [0x140037098]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003b2e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140036e28]
lea rdx, str.Could_open_service_but_could_not_query_service_config.____lu_
mov r8d, eax
call fcn.1400086f0
mov rcx, rdi
call fcn.14000a958
xor ebp, ebp
jmp 0x140003804
mov rdx, qword [rdi + 0x10]
lea r8, [rsp + 0x88]
mov rcx, rbx
call fcn.140002d50
test eax, eax
je 0x14000377d
cmp dword [rsp + 0x88], 0
je 0x1400033ad
mov byte [0x140037048], 1
call fcn.140001950
lea rdx, str.Restarting_install_action:__d
mov rcx, rax
mov r8d, ebp
call fcn.1400084d0
mov ecx, ebp
call fcn.140003160
mov ebp, eax
jmp 0x1400037fc
mov ebp, 1
jmp 0x14000380d
call fcn.140001950
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_determine_buffer_size_for_query_service_config.____lu_
mov rcx, rdi
mov r8d, eax
call fcn.1400086f0
xor ebp, ebp
jmp 0x140003804
mov eax, dword [0x140037038]
mov ecx, dword [0x140037098]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003b70
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140036e28]
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 0x1400032b4
call fcn.140001950
lea rdx, str.Could_not_obtain_version_number_from_new_path
mov rcx, rax
call fcn.1400086f0
xor ebp, ebp
jmp 0x1400037fc
call fcn.140001950
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_fix_service_path._This_should_never_happen.____lu_
mov rcx, r14
mov r8d, eax
call fcn.1400086f0
jmp 0x1400037f7
xor ebp, ebp
jmp 0x140003a19
jne 0x1400037e1
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x80], eax
jb 0x14000342b
jne 0x1400037e1
mov eax, dword [rsp + 0x7c]
cmp eax, dword [rsp + 0x6c]
jb 0x14000342b
mov eax, dword [rsp + 0x7c]
cmp eax, dword [rsp + 0x6c]
jne 0x1400037e1
mov eax, dword [rsp + 0x78]
cmp eax, dword [rsp + 0x68]
jb 0x14000342b
lea rcx, [rsp + 0x190]
xor edx, edx
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebp, 1
mov rcx, rdi
call fcn.14000a958
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x3a8]
xor rcx, rsp
call fcn.14000ac40
mov eax, ebp
add rsp, 0x3b0
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
call fcn.140001950
lea rdx, str.File_is_already_in_the_correct_location__no_action_needed_for_upgrade.__The_path_is:___ls_
lea r8, [rsp + 0x190]
mov rcx, rax
call fcn.1400084d0
mov ebp, 1
jmp 0x140003a19
call fcn.140001950
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
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.____lu_
mov rcx, rbx
mov r8d, eax
call fcn.1400086f0
mov r14, qword [rdi + 0x10]
mov rcx, r14
call fcn.1400148ac
cmp rax, 4
jb 0x14000393c
mov r15, rax
inc rax
lea r12, [r15 + r15 + 2]
mov rcx, 0xffffffffffffffff
cmovns rcx, r12
call fcn.14000a950
mov rbx, rax
xor ebp, ebp
mov rcx, rax
xor edx, edx
mov r8, r12
call fcn.14000c660
mov rcx, rbx
mov rdx, r14
mov r8, r15
call fcn.140014d74
lea rcx, [rbx + r15*2]
add rcx, 0xfffffffffffffffa
lea rdx, [0x14002f99a]
mov r8d, 3
call fcn.140014d74
mov rcx, qword [rdi + 0x10]
mov rdx, rbx
mov r8d, 9
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x140003954
mov rdx, qword [rdi + 0x10]
lea rcx, [rsp + 0x190]
xor ebp, ebp
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov r14d, eax
call fcn.140001950
mov rcx, rax
test r14d, r14d
je 0x14000397e
lea rdx, str.The_new_service_binary_was_copied_in_by_first_moving_the_old_one_out_of_the_way.
call fcn.1400084d0
mov ebp, 1
jmp 0x14000398a
call fcn.140001950
lea rdx, str.Service_binary_path_was_less_than_3__service_will_not_be_updated.__This_should_never_happen.
mov rcx, rax
call fcn.1400086f0
xor ebp, ebp
jmp 0x1400039c8
call fcn.140001950
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [rdi + 0x10]
mov dword [rsp + 0x20], eax
lea rdx, str.Could_not_move_old_service_file_out_of_the_way_from:___ls__to___ls_._Service_will_not_be_upgraded.____lu_
mov rcx, r14
mov r9, rbx
call fcn.1400086f0
jmp 0x1400039c0
lea rdx, str.The_new_service_binary_could_not_be_copied_in._The_service_will_not_be_upgraded.
call fcn.1400086f0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r14d, eax
call fcn.140001950
mov rcx, rax
test r14d, r14d
je 0x1400039b4
lea rdx, str.The_old_temp_service_path_was_deleted:__ls.
mov r8, rbx
call fcn.1400084d0
jmp 0x1400039c0
lea rdx, str.The_old_temp_service_path_was_not_deleted.
call fcn.1400086f0
mov rcx, rbx
call fcn.14000a958
lea rcx, [rsp + 0x190]
xor edx, edx
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebx, eax
call fcn.140001950
test ebx, ebx
je 0x140003a02
lea rdx, str.Deleting_the_old_file_path_on_the_next_reboot:__ls.
lea r8, [rsp + 0x190]
mov rcx, rax
call fcn.1400084d0
jmp 0x140003a19
lea rdx, str.Call_to_delete_the_old_file_path_failed:__ls.
lea r8, [rsp + 0x190]
mov rcx, rax
call fcn.1400086f0
mov rcx, rdi
call fcn.14000a958
jmp 0x14000380d
lea rcx, [0x140037038]
call fcn.14000aa30
cmp dword [0x140037038], 0xffffffff
jne 0x140003258
lea rcx, [0x140036e28]
call fcn.140008420
lea rcx, [0x140002160]
call fcn.14000ac60
lea rcx, [0x140037038]
call fcn.14000aa98
jmp 0x140003258
lea rcx, [0x140037038]
call fcn.14000aa30
cmp dword [0x140037038], 0xffffffff
jne 0x1400032a0
lea rcx, [0x140036e28]
call fcn.140008420
lea rcx, [0x140002160]
call fcn.14000ac60
lea rcx, [0x140037038]
call fcn.14000aa98
jmp 0x1400032a0
lea rcx, [0x140037038]
call fcn.14000aa30
cmp dword [0x140037038], 0xffffffff
jne 0x14000321a
lea rcx, [0x140036e28]
call fcn.140008420
lea rcx, [0x140002160]
call fcn.14000ac60
lea rcx, [0x140037038]
call fcn.14000aa98
jmp 0x14000321a
lea rcx, [0x140037038]
call fcn.14000aa30
cmp dword [0x140037038], 0xffffffff
jne 0x140003329
lea rcx, [0x140036e28]
call fcn.140008420
lea rcx, [0x140002160]
call fcn.14000ac60
lea rcx, [0x140037038]
call fcn.14000aa98
jmp 0x140003329
lea rcx, [0x140037038]
call fcn.14000aa30
cmp dword [0x140037038], 0xffffffff
jne 0x140003675
lea rcx, [0x140036e28]
call fcn.140008420
lea rcx, [0x140002160]
call fcn.14000ac60
lea rcx, [0x140037038]
call fcn.14000aa98
jmp 0x140003675
lea rcx, [0x140037038]
call fcn.14000aa30
cmp dword [0x140037038], 0xffffffff
jne 0x14000374c
lea rcx, [0x140036e28]
call fcn.140008420
lea rcx, [0x140002160]
call fcn.14000ac60
lea rcx, [0x140037038]
call fcn.14000aa98
jmp 0x14000374c