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

Disassembly:
push ebp
lea ebp, [esp - 0x1bc]
sub esp, 0x23c
mov eax, dword [0x41a0a0]
xor eax, ebp
mov dword [ebp + 0x1b8], eax
push esi
push edi
push 0xf003f
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x64], edi
cmp edi, esi
jne 0x402a84
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_service_manager.____d_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
xor eax, eax
jmp 0x402b76
push 0x105
lea eax, [ebp - 0x54]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x402abb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_obtain_module_filename_when_attempting_to_install_service.____d_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402a7d
push ebx
mov ebx, 0xf01ff
push ebx
mov esi, str.MozillaMaintenance
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x58], eax
call edi
cmp dword [ebp - 0x58], 0
jne 0x402b0c
cmp eax, 0x424
je 0x402efc
call edi
push eax
push str.Could_not_open_service.____d_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402b73
push dword [ebp - 0x58]
call fcn.0040270b
pop ecx
test eax, eax
jne 0x402b2f
call edi
push eax
push str.Could_not_reset_security_ACE_on_service_handle._It_might_not_be_possible_to_start_the_service._This_error_should_never_happen.____d_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
lea eax, [ebp - 0x68]
push eax
push 0
push 0
push dword [ebp - 0x58]
call ebx
test eax, eax
jne 0x402b8d
call edi
cmp eax, 0x7a
je 0x402b8d
call edi
push eax
push str.Could_not_determine_buffer_size_for_query_service_config.____d_
call fcn.00401000
push eax
call fcn.00404dc4
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0xc
push dword [ebp - 0x58]
call esi
push dword [ebp - 0x64]
call esi
xor eax, eax
pop ebx
mov ecx, dword [ebp + 0x1b8]
pop edi
xor ecx, ebp
pop esi
call fcn.004051ba
add ebp, 0x1bc
leave
ret
push dword [ebp - 0x68]
call fcn.00405805
pop ecx
mov esi, eax
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x68]
push esi
push dword [ebp - 0x58]
call ebx
test eax, eax
jne 0x402bde
call edi
push eax
push str.Could_open_service_but_could_not_query_service_config.____d_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
xor edi, edi
push esi
call fcn.00405771
pop ecx
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
jmp 0x402b75
cmp dword [0x41aff8], 0
jne 0x402c53
lea eax, [ebp - 0x60]
push eax
push dword [esi + 0xc]
push dword [ebp - 0x58]
call fcn.004022d6
add esp, 0xc
test eax, eax
jne 0x402c18
call edi
push eax
push str.Could_not_fix_service_path._This_should_never_happen.____d_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
xor edi, edi
inc edi
jmp 0x402bc1
cmp dword [ebp - 0x60], 0
je 0x402c53
push dword [ebp + 0x1c4]
mov dword [0x41aff8], 1
push str.Restarting_install_action:__d
call fcn.00401000
push eax
call fcn.00404d99
push dword [ebp + 0x1c4]
call fcn.00402a2e
add esp, 0x10
mov edi, eax
jmp 0x402bc1
push dword [esi + 0xc]
call dword [sym.imp.SHLWAPI.dll_PathUnquoteSpacesW]
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x80]
push eax
push dword [esi + 0xc]
call fcn.00402740
mov ebx, eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00402740
add esp, 0x28
test eax, eax
jne 0x402cad
push str.Could_not_obtain_version_number_from_new_path
call fcn.00401000
push eax
call fcn.00404dc4
pop ecx
pop ecx
jmp 0x402bbf
cmp dword [ebp + 0x1c4], 2
je 0x402cf3
test ebx, ebx
je 0x402cf3
mov eax, dword [ebp - 0x80]
cmp eax, dword [ebp - 0x5c]
jb 0x402cf3
jne 0x402ce0
mov eax, dword [ebp - 0x70]
cmp eax, dword [ebp - 0x6c]
jb 0x402cf3
jne 0x402ce0
mov eax, dword [ebp - 0x7c]
cmp eax, dword [ebp - 0x60]
jb 0x402cf3
jne 0x402ce0
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x78]
jb 0x402cf3
push 4
push 0
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x402c13
push dword [ebp - 0x58]
call fcn.0040211c
pop ecx
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.004027ff
test eax, eax
jne 0x402d1c
push esi
call fcn.00405771
pop ecx
xor edi, edi
jmp 0x402bd1
push dword [esi + 0xc]
lea eax, [ebp - 0x54]
push eax
call fcn.004050fd
pop ecx
test eax, eax
pop ecx
lea eax, [ebp - 0x54]
jne 0x402d53
push eax
push str.File_is_already_in_the_correct_location__no_action_needed_for_upgrade.__The_path_is:___ls_
call fcn.00401000
push eax
call fcn.00404d99
push esi
call fcn.00405771
add esp, 0x10
xor edi, edi
inc edi
jmp 0x402bd1
push 0
push dword [esi + 0xc]
mov dword [ebp - 0x58], 1
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x402ea0
call edi
push eax
push 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_
call fcn.00401000
push eax
call fcn.00404dc4
push dword [esi + 0xc]
call fcn.00404fa8
mov ebx, eax
add esp, 0x10
cmp ebx, 3
jbe 0x402e8a
xor ecx, ecx
push 2
pop edx
lea eax, [ebx + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405805
lea ecx, [ebx + ebx + 2]
push ecx
push 0
push eax
mov dword [ebp - 0x5c], eax
call fcn.00405140
push ebx
push dword [esi + 0xc]
push dword [ebp - 0x5c]
call fcn.004052e9
mov eax, dword [ebp - 0x5c]
push 3
lea eax, [eax + ebx*2 - 6]
push 0x414504
push eax
call fcn.004052e9
mov ebx, dword [ebp - 0x5c]
add esp, 0x28
push 9
push ebx
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x402e64
push 0
push dword [esi + 0xc]
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x402e1d
push str.The_new_service_binary_could_not_be_copied_in._The_service_will_not_be_upgraded.
call fcn.00401000
push eax
call fcn.00404dc4
and dword [ebp - 0x58], 0
jmp 0x402e2d
push str.The_new_service_binary_was_copied_in_by_first_moving_the_old_one_out_of_the_way.
call fcn.00401000
push eax
call fcn.00404d99
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x402e50
push ebx
push str.The_old_temp_service_path_was_deleted:__ls.
call fcn.00401000
push eax
call fcn.00404d99
add esp, 0xc
jmp 0x402e82
push str.The_old_temp_service_path_was_not_deleted.
call fcn.00401000
push eax
call fcn.00404dc4
pop ecx
pop ecx
jmp 0x402e82
call edi
push eax
push ebx
push dword [esi + 0xc]
push str.Could_not_move_old_service_file_out_of_the_way_from:___ls__to___ls_._Service_will_not_be_upgraded.____d_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0x14
and dword [ebp - 0x58], 0
push ebx
call fcn.00405771
jmp 0x402eb1
push str.Service_binary_path_was_less_than_3__service_will_not_be_updated.__This_should_never_happen.
call fcn.00401000
push eax
call fcn.00404dc4
and dword [ebp - 0x58], 0
jmp 0x402eb0
push str.The_new_service_binary_was_copied_in.
call fcn.00401000
push eax
call fcn.00404d99
pop ecx
pop ecx
push 4
push 0
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
lea eax, [ebp - 0x54]
push eax
je 0x402eda
push str.Deleting_the_old_file_path_on_the_next_reboot:__ls.
call fcn.00401000
push eax
call fcn.00404d99
jmp 0x402eea
push str.Call_to_delete_the_old_file_path_failed:__ls.
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
push esi
call fcn.00405771
mov edi, dword [ebp - 0x58]
pop ecx
jmp 0x402bd1
cmp dword [ebp + 0x1c4], 0
je 0x402d4b
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
xor eax, eax
push eax
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x54]
push eax
push 1
push 3
push 0x10
push ebx
push str.Mozilla_Maintenance_Service
push esi
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x402f55
call edi
push eax
push str.Could_not_create_Windows_service._This_error_should_never_happen_since_a_service_install_should_only_be_called_when_elevated.____d_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
jmp 0x402d15
push esi
call fcn.0040270b
pop ecx
test eax, eax
jne 0x402f76
call edi
push eax
push 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_
call fcn.00401000
push eax
call fcn.00404dc4
add esp, 0xc
push esi
call fcn.0040211c
pop ecx
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402d4b