Function at 0x140003300
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 [0x140033138]
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 0x1400033d3
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 0x14000341b
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 0x140003463
cmp eax, 0x424
je 0x140003463
mov eax, dword [0x140033e78]
mov ecx, dword [0x140033ed8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003c50
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140033c68]
lea rdx, str.Could_not_open_service.____lu_
jmp 0x140003454
mov eax, dword [0x140033e78]
mov ecx, dword [0x140033ed8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003bcc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140033c68]
lea rdx, str.Could_not_open_service_manager.____lu_
mov r8d, eax
call fcn.140008690
xor ebp, ebp
jmp 0x1400039b8
mov eax, dword [0x140033e78]
mov ecx, dword [0x140033ed8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003c0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140033c68]
lea rdx, str.Could_not_obtain_module_filename_when_attempting_to_install_service.____lu_
mov r8d, eax
call fcn.140008690
xor ebp, ebp
jmp 0x1400039af
test rbx, rbx
je 0x14000371a
mov qword [rsp + 0x90], 0
lea rdx, [rsp + 0x90]
mov rcx, rbx
xor r8d, r8d
call fcn.1400045c0
mov edi, eax
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x1400034a0
call qword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x1400034e5
mov eax, dword [0x140033e78]
mov ecx, dword [0x140033ed8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003c92
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140033c68]
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.140008690
lea r9, [rsp + 0x8c]
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x14000350e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400038a2
mov edi, dword [rsp + 0x8c]
mov rcx, rdi
call fcn.14000a920
mov r12, rax
lea r9, [rsp + 0x8c]
mov rcx, rbx
mov rdx, rax
mov r8d, edi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x1400037f1
cmp byte [0x140033e88], 0
je 0x140003841
mov rcx, qword [r12 + 0x10]
call qword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
mov rcx, qword [r12 + 0x10]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x84]
lea r8, [rsp + 0x80]
lea r9, [rsp + 0x7c]
call fcn.140003d60
mov edi, 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.140003d60
test eax, eax
je 0x140003907
cmp ebp, 2
je 0x1400035ca
test edi, edi
je 0x1400035ca
mov eax, dword [rsp + 0x74]
cmp dword [rsp + 0x84], eax
jae 0x140003948
mov rcx, rbx
call fcn.140002a70
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.140003f20
test eax, eax
je 0x140003941
mov rdx, qword [r12 + 0x10]
lea rcx, [rsp + 0x190]
call fcn.1400142e8
test eax, eax
je 0x1400039dc
mov rdx, qword [r12 + 0x10]
lea rcx, [rsp + 0x190]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140003a02
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 rdi, [rsp + 0x90]
mov edx, 0x80
mov rcx, rdi
call fcn.140001d30
mov rcx, rdi
call fcn.1400042f0
test eax, eax
jne 0x1400036fc
call fcn.140001950
lea rdx, str.The_uninstaller_version_string_could_not_be_updated.
mov rcx, rax
call fcn.140008610
call fcn.140001950
lea rdx, str.The_new_service_binary_was_copied_in.
mov rcx, rax
call fcn.140008610
mov ebp, 1
jmp 0x140003b6e
test ebp, ebp
je 0x140003898
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 0x1400038c9
mov rbx, rax
mov qword [rsp + 0x90], 0
lea rdx, [rsp + 0x90]
mov rcx, rax
xor r8d, r8d
call fcn.1400045c0
mov edi, eax
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x1400037bb
call qword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x1400037df
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.140008690
mov rcx, rbx
call fcn.140002a70
mov ebp, 1
jmp 0x1400039a6
mov eax, dword [0x140033e78]
mov ecx, dword [0x140033ed8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003cd4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140033c68]
lea rdx, str.Could_open_service_but_could_not_query_service_config.____lu_
mov r8d, eax
call fcn.140008690
mov rcx, r12
call fcn.14000a928
xor ebp, ebp
jmp 0x1400039a6
mov rdx, qword [r12 + 0x10]
lea r8, [rsp + 0x88]
mov rcx, rbx
call fcn.140002ef0
test eax, eax
je 0x14000391f
cmp dword [rsp + 0x88], 0
je 0x14000354c
mov byte [0x140033e88], 1
call fcn.140001950
lea rdx, str.Restarting_install_action:__d
mov rcx, rax
mov r8d, ebp
call fcn.140008610
mov ecx, ebp
call fcn.140003300
mov ebp, eax
jmp 0x14000399e
mov ebp, 1
jmp 0x1400039af
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.140008690
xor ebp, ebp
jmp 0x1400039a6
mov eax, dword [0x140033e78]
mov ecx, dword [0x140033ed8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140003d16
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [0x140033c68]
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 0x140003454
call fcn.140001950
lea rdx, str.Could_not_obtain_version_number_from_new_path
mov rcx, rax
call fcn.140008690
xor ebp, ebp
jmp 0x14000399e
call fcn.140001950
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Could_not_fix_service_path._This_should_never_happen.____lu_
mov rcx, rdi
mov r8d, eax
call fcn.140008690
jmp 0x140003999
xor ebp, ebp
jmp 0x140003bbf
jne 0x140003983
mov eax, dword [rsp + 0x70]
cmp dword [rsp + 0x80], eax
jb 0x1400035ca
jne 0x140003983
mov eax, dword [rsp + 0x7c]
cmp eax, dword [rsp + 0x6c]
jb 0x1400035ca
mov eax, dword [rsp + 0x7c]
cmp eax, dword [rsp + 0x6c]
jne 0x140003983
mov eax, dword [rsp + 0x78]
cmp eax, dword [rsp + 0x68]
jb 0x1400035ca
lea rcx, [rsp + 0x190]
xor edx, edx
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebp, 1
mov rcx, r12
call fcn.14000a928
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.14000acd0
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.140008610
mov ebp, 1
jmp 0x140003bbf
call fcn.140001950
mov rdi, 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, rdi
mov r8d, eax
call fcn.140008690
mov r15, qword [r12 + 0x10]
mov rcx, r15
call fcn.14001433c
cmp rax, 4
jb 0x140003ae3
mov rbx, rax
add rax, 1
add rax, rax
mov rcx, 0xffffffffffffffff
cmovae rcx, rax
call fcn.14000a920
mov r14, rax
lea r8, [rbx + rbx]
add r8, 2
xor ebp, ebp
mov rcx, rax
xor edx, edx
call fcn.14000cba0
mov rcx, r14
mov rdx, r15
mov r8, rbx
call fcn.140014804
lea rcx, [r14 + rbx*2]
add rcx, 0xfffffffffffffffa
lea rdx, [0x14002d252]
mov r8d, 3
call fcn.140014804
mov rcx, qword [r12 + 0x10]
mov rdx, r14
mov r8d, 9
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x140003afb
mov rdx, qword [r12 + 0x10]
lea rcx, [rsp + 0x190]
xor ebp, ebp
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileW]
mov edi, eax
call fcn.140001950
mov rcx, rax
test edi, edi
je 0x140003b26
lea rdx, str.The_new_service_binary_was_copied_in_by_first_moving_the_old_one_out_of_the_way.
call fcn.140008610
mov ebp, 1
jmp 0x140003b32
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.140008690
xor ebp, ebp
jmp 0x140003b6e
call fcn.140001950
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [r12 + 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, rdi
mov r9, r14
call fcn.140008690
jmp 0x140003b66
lea rdx, str.The_new_service_binary_could_not_be_copied_in._The_service_will_not_be_upgraded.
call fcn.140008690
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, eax
call fcn.140001950
mov rcx, rax
test edi, edi
je 0x140003b5a
lea rdx, str.The_old_temp_service_path_was_deleted:__ls.
mov r8, r14
call fcn.140008610
jmp 0x140003b66
lea rdx, str.The_old_temp_service_path_was_not_deleted.
call fcn.140008690
mov rcx, r14
call fcn.14000a928
lea rcx, [rsp + 0x190]
xor edx, edx
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, eax
call fcn.140001950
test edi, edi
je 0x140003ba8
lea rdx, str.Deleting_the_old_file_path_on_the_next_reboot:__ls.
lea r8, [rsp + 0x190]
mov rcx, rax
call fcn.140008610
jmp 0x140003bbf
lea rdx, str.Call_to_delete_the_old_file_path_failed:__ls.
lea r8, [rsp + 0x190]
mov rcx, rax
call fcn.140008690
mov rcx, r12
call fcn.14000a928
jmp 0x1400039af
lea rcx, [0x140033e78]
call fcn.14000aa90
cmp dword [0x140033e78], 0xffffffff
jne 0x1400033f8
lea rcx, [0x140033c68]
call fcn.140008560
lea rcx, [0x140002160]
call fcn.14000acf4
lea rcx, [0x140033e78]
call fcn.14000aaf8
jmp 0x1400033f8
lea rcx, [0x140033e78]
call fcn.14000aa90
cmp dword [0x140033e78], 0xffffffff
jne 0x140003440
lea rcx, [0x140033c68]
call fcn.140008560
lea rcx, [0x140002160]
call fcn.14000acf4
lea rcx, [0x140033e78]
call fcn.14000aaf8
jmp 0x140003440
lea rcx, [0x140033e78]
call fcn.14000aa90
cmp dword [0x140033e78], 0xffffffff
jne 0x1400033ba
lea rcx, [0x140033c68]
call fcn.140008560
lea rcx, [0x140002160]
call fcn.14000acf4
lea rcx, [0x140033e78]
call fcn.14000aaf8
jmp 0x1400033ba
lea rcx, [0x140033e78]
call fcn.14000aa90
cmp dword [0x140033e78], 0xffffffff
jne 0x1400034c9
lea rcx, [0x140033c68]
call fcn.140008560
lea rcx, [0x140002160]
call fcn.14000acf4
lea rcx, [0x140033e78]
call fcn.14000aaf8
jmp 0x1400034c9
lea rcx, [0x140033e78]
call fcn.14000aa90
cmp dword [0x140033e78], 0xffffffff
jne 0x140003816
lea rcx, [0x140033c68]
call fcn.140008560
lea rcx, [0x140002160]
call fcn.14000acf4
lea rcx, [0x140033e78]
call fcn.14000aaf8
jmp 0x140003816
lea rcx, [0x140033e78]
call fcn.14000aa90
cmp dword [0x140033e78], 0xffffffff
jne 0x1400038ee
lea rcx, [0x140033c68]
call fcn.140008560
lea rcx, [0x140002160]
call fcn.14000acf4
lea rcx, [0x140033e78]
call fcn.14000aaf8
jmp 0x1400038ee