Function at 0x403684
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa74
mov eax, dword [0x427014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov esi, edx
push edi
cmp ebx, 3
jge 0x4036bc
push str.Not_enough_command_line_arguments_to_execute_a_service_command
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
xor eax, eax
jmp 0x403c6c
lea eax, [ebp - 0xa68]
mov dword [ebp - 0xa70], 0x423c48
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
test eax, eax
js 0x4036eb
lea eax, [ebp - 0xa70]
push eax
lea eax, [ebp - 0xa68]
push eax
call dword [sym.imp.RPCRT4.dll_UuidToStringW]
push dword [ebp - 0xa70]
push dword [esi + 8]
push str.Executing_service_command__ls__ID:__ls
call fcn.00401034
push eax
call fcn.00404982
add esp, 0x10
lea eax, [ebp - 0xa70]
push eax
call dword [sym.imp.RPCRT4.dll_RpcStringFreeW]
push str.software_update
push dword [esi + 8]
xor eax, eax
mov dword [ebp - 0xa6c], eax
mov edi, eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x403c2d
cmp ebx, 4
jl 0x403c23
mov ecx, dword [esi + 0x10]
call fcn.00404a00
test al, al
je 0x403c23
mov edx, dword [esi + 0x10]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0xa6c]
jne 0x403755
sub ecx, edi
sar ecx, 1
cmp ecx, 0xa
jae 0x403777
push str.The_patch_directory_path_length_is_not_valid_for_this_application.
jmp 0x4036a8
add edx, 0xffffffec
push 0xa
push str.updates0
lea eax, [edx + ecx*2]
push eax
call fcn.0040a4a8
add esp, 0xc
test eax, eax
je 0x40379b
push str.The_patch_directory_path_subdirectory_is_not_valid_for_this_application.
jmp 0x4036a8
cmp ebx, 5
jl 0x403bf4
mov ecx, dword [esi + 0x14]
call fcn.00404a00
test al, al
je 0x403bf4
lea edx, [esi + 0xc]
lea ecx, [ebx - 3]
call fcn.00402c96
test al, al
jne 0x4038f9
cmp ebx, 6
jl 0x4038e0
mov ecx, dword [esi + 0x18]
call fcn.00404a00
test al, al
je 0x4038e0
push 0x104
push dword [esi + 0x14]
push dword [esi + 0x18]
call fcn.0040a4a8
add esp, 0xc
test eax, eax
je 0x4038f9
mov eax, dword [esi + 0x1c]
mov ecx, 0x423bf4
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403829
test dx, dx
je 0x403825
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403829
add eax, 4
add ecx, 4
test dx, dx
jne 0x403803
xor eax, eax
jmp 0x40382e
sbb eax, eax
or eax, 1
test eax, eax
je 0x40385e
push str._replace
push dword [esi + 0x1c]
call fcn.0040609a
pop ecx
pop ecx
test eax, eax
jne 0x40385e
push str.Installation_directory_and_working_directory_must_be_the_same_for_non_staged_updates._Exiting.
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
push 0x36
jmp 0x403c08
push dword [esi + 0x18]
lea eax, [ebp - 0x428]
push 0x4247a8
push 0x104
push eax
call fcn.00402aa3
add esp, 0x10
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x4038ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Couldnt_remove_file_spec_when_attempting_to_verify_the_working_directory_path.____d_
call fcn.00401034
push eax
call fcn.004049ba
add esp, 0xc
push 0x47
jmp 0x403c08
push 0x104
push dword [esi + 0x14]
lea eax, [ebp - 0x428]
push eax
call fcn.0040a4a8
add esp, 0xc
test eax, eax
je 0x4038f9
push str.The_apply_to_directory_must_be_the_same_as_or_a_child_of_the_installation_directory__Exiting.
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
push 0x34
jmp 0x403c08
push str.The_working_directory_path_is_not_valid_for_this_application.
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
push 0x38
jmp 0x403c08
xor eax, eax
push 0x20a
push eax
lea eax, [ebp - 0xa58]
push eax
call fcn.00406850
add esp, 0xc
lea eax, [ebp - 0xa58]
lea edx, [esi + 0xc]
lea ecx, [ebx - 3]
push eax
call fcn.00402d19
pop ecx
test eax, eax
jne 0x403940
push str.Could_not_get_the_installation_directory
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
push 0x21
jmp 0x403c08
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xa6c]
push eax
push 0x20119
xor eax, eax
push eax
push str.SOFTWAREMozillaMaintenanceService3932ecacee736d366d6436db0f55bce4
push 0x80000002
call edi
test eax, eax
je 0x4039d8
lea edx, [ebp - 0x848]
lea ecx, [ebp - 0xa58]
call fcn.00404178
test eax, eax
je 0x403bf0
lea eax, [ebp - 0x848]
push eax
push str.Checking_for_Maintenance_Service_registry._key:__ls
call fcn.00401034
push eax
call fcn.00404982
add esp, 0xc
lea eax, [ebp - 0xa6c]
xor ecx, ecx
mov dword [ebp - 0xa6c], ecx
push eax
push 0x20119
push ecx
lea eax, [ebp - 0x848]
push eax
push 0x80000002
call edi
test eax, eax
je 0x4039d8
push str.The_maintenance_service_registry_key_does_not_exist.
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
push 0x39
jmp 0x403c08
push dword [ebp - 0xa6c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
push 0x20a
push eax
lea eax, [ebp - 0x638]
push eax
call fcn.00406850
add esp, 0xc
lea eax, [ebp - 0xa58]
push 0x104
push eax
lea eax, [ebp - 0x638]
push eax
call fcn.00407187
add esp, 0xc
lea ecx, [ebp - 0x638]
mov edx, str.updater.exe
call fcn.00404dd1
test eax, eax
jne 0x403a3c
push str.Install_directory_updater_could_not_be_determined.
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
push dword [esi + 0x10]
lea edx, [ebp - 0xa58]
lea ecx, [ebp - 0x638]
call fcn.00402ffb
movzx edi, al
xor eax, eax
mov dword [esp], 0x20a
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00406850
add esp, 0xc
test edi, edi
je 0x403ba0
lea ecx, [ebp - 0x218]
call fcn.00403528
mov edi, eax
test edi, edi
je 0x403ba0
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x638]
push eax
push str.Passed_in_path:__ls__Using_this_path_for_updating:__ls.
call fcn.00401034
push eax
call fcn.00404982
add esp, 0x10
lea ecx, [ebp - 0x218]
call fcn.004035b0
xor eax, eax
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x638]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edi, eax
test edi, edi
je 0x403ba0
lea eax, [ebp - 0x218]
mov dword [esi + 0xc], eax
xor eax, eax
push 0x20a
push eax
lea eax, [ebp - 0x848]
push eax
call fcn.00406850
add esp, 0xc
xor eax, eax
push 0x20a
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.00406850
add esp, 0xc
lea edx, [ebp - 0x218]
lea ecx, [ebp - 0x428]
push str.updater.ini
call fcn.00404b2d
pop ecx
test eax, eax
je 0x403b86
push str.updater.ini
lea edx, [ebp - 0x638]
lea ecx, [ebp - 0x848]
call fcn.00404b2d
pop ecx
test eax, eax
je 0x403b86
xor eax, eax
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x848]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x403b86
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x848]
push eax
push str.Could_not_copy_updater.ini_from:__ls_to__ls.____d_
call fcn.00401034
push eax
call fcn.004049ba
add esp, 0x14
lea ecx, [ebx - 3]
lea edx, [esi + 0xc]
call fcn.0040333d
lea ecx, [ebp - 0x218]
mov edi, eax
call fcn.004035b0
jmp 0x403bdb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_copy_path_to_secure_location.____d_
call fcn.00401034
push eax
call fcn.004049ba
mov ecx, dword [esi + 0x10]
add esp, 0xc
push 0x31
pop edx
call fcn.00404e25
test eax, eax
jne 0x403bdb
push str.Could_not_write_update.status_could_not_copy_updater_error
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
push dword [esi + 8]
push str.Service_command__ls_complete.
call fcn.00401034
push eax
call fcn.00404982
jmp 0x403c40
push 0x35
jmp 0x403c08
push str.The_install_directory_path_is_not_valid_for_this_application.
call fcn.00401034
push eax
call fcn.004049ba
pop ecx
pop ecx
push 0x37
mov ecx, dword [esi + 0x10]
pop edx
call fcn.00404e25
test eax, eax
jne 0x4036b5
push str.Could_not_write_update.status_for_previous_failure.
jmp 0x4036a8
push str.The_patch_directory_path_is_not_valid_for_this_application.
jmp 0x4036a8
push dword [esi + 8]
push str.Service_command_not_recognized:__ls.
call fcn.00401034
push eax
call fcn.004049ba
add esp, 0xc
mov edx, str.Failure
test edi, edi
mov ecx, str.Success
cmove ecx, edx
push ecx
push dword [esi + 4]
push str.service_command__ls_complete_with_result:__ls.
call fcn.00401034
push eax
call fcn.00404982
xor eax, eax
add esp, 0x10
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004053c9
mov esp, ebp
pop ebp
ret