Function at 0x4046b9
Capabilities:
Check if file exists
Copy file
Create directory
Create process on windows
Get common file path
Get file attributes
Move file
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xecc
mov eax, dword [0x42e440]
xor eax, esp
mov dword [esp + 0xec8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x14], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x24], edi
cmp eax, 4
jge 0x404706
push str.Usage:_updater_patch_dir_install_dir_apply_to_dir__wait_pid__callback_working_dir_callback_path_args...___n
call fcn.0040d686
add eax, 0x40
push eax
call fcn.0040e5c8
pop ecx
pop ecx
xor eax, eax
inc eax
jmp 0x4056d4
push 0x104
push dword [edi + 8]
lea eax, [edi + 4]
mov ebx, 0x431230
mov dword [esp + 0x34], eax
mov eax, dword [eax]
push ebx
mov dword [0x43074c], eax
call fcn.0040cf8a
add esp, 0xc
xor eax, eax
mov word [0x431436], ax
push 0x5c
pop eax
push eax
push ebx
mov dword [esp + 0x3c], eax
call fcn.0040d1de
pop ecx
pop ecx
xor ecx, ecx
mov dword [esp + 0x30], ecx
test eax, eax
je 0x404755
cmp word [eax + 2], cx
jne 0x404755
mov word [eax], cx
mov ecx, 0x42a35c
call fcn.00402110
push str.MOZ_NO_SERVICE_FALLBACK
mov byte [esp + 0x23], al
call fcn.0040eb15
pop ecx
call fcn.00403f22
mov bl, al
lea eax, [esp + 0x28]
push eax
push 0x20119
xor eax, eax
mov dword [esp + 0x1c], ebx
push eax
push str.SOFTWAREMozillaMaintenanceService3932ecacee736d366d6436db0f55bce4
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4047a0
xor ecx, ecx
mov eax, ecx
jmp 0x4047af
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
xor ecx, ecx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
push ecx
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ecx
push eax
push ecx
push 2
push ecx
push ecx
push ecx
push str.SoftwareClassesApplications
push 0x80000001
setne byte [esp + 0x33]
call esi
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ecx, ecx
lea eax, [esp + 0x10]
push ecx
push eax
push ecx
push 2
push 1
push ecx
push ecx
push str.SoftwareClassesApplicationsupdater.exe
push 0x80000001
call esi
test eax, eax
jne 0x404842
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push eax
push eax
push eax
push eax
push str.IsHostApp
push dword [esp + 0x24]
call esi
xor eax, eax
push eax
push eax
push eax
push eax
push str.NoOpenWith
push dword [esp + 0x24]
call esi
xor eax, eax
push eax
push eax
push eax
push eax
push str.NoStartPage
push dword [esp + 0x24]
call esi
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp dword [esp + 0x20], 4
mov esi, eax
mov dword [esp + 0x18], eax
jle 0x40488e
push dword [edi + 0x10]
call fcn.0040e891
mov esi, eax
mov eax, edx
pop ecx
mov ecx, esi
mov dword [esp + 0x18], eax
and ecx, eax
cmp ecx, 0xffffffff
jne 0x404874
mov byte [0x430531], 1
jmp 0x40488e
push str._replace
push dword [edi + 0x10]
call fcn.0040e216
pop ecx
pop ecx
test eax, eax
je 0x40488e
mov byte [0x430530], 1
push 0x104
push dword [edi + 0xc]
mov edi, 0x430e10
push edi
call fcn.0040cf8a
add esp, 0xc
xor eax, eax
mov word [0x431016], ax
push 0x5c
pop eax
push eax
push edi
call fcn.0040d1de
pop ecx
pop ecx
test eax, eax
je 0x4048c7
xor ecx, ecx
cmp word [eax + 2], cx
jne 0x4048c7
mov word [eax], cx
mov ecx, 0x42a47c
call fcn.00402110
test al, al
je 0x4048e7
push str.MOZ_OS_UPDATE
mov byte [0x430532], 1
call fcn.0040eb15
pop ecx
cmp byte [0x430530], 0
je 0x4048fe
push 1
push str.update.log
push str.last_update.log
jmp 0x404907
xor eax, eax
push eax
push eax
push str.update.log
push dword [0x43074c]
call fcn.0040200f
mov ecx, eax
call fcn.0040842f
mov ecx, str.applying
call fcn.00403dbf
test al, al
jne 0x40493c
push str.failed_setting_status_to_applying
call fcn.0040200f
push eax
call fcn.00408506
jmp 0x4046fc
cmp byte [0x430531], 0
je 0x40494c
push str.Performing_a_staged_update
jmp 0x40495a
cmp byte [0x430530], 0
je 0x404967
push str.Performing_a_replace_request
call fcn.0040200f
push eax
call fcn.00408506
pop ecx
pop ecx
push dword [0x43074c]
push str.PATCH_DIRECTORY__S
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
push 0x431230
push str.INSTALLATION_DIRECTORY__S
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
push edi
push str.WORKING_DIRECTORY__S
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
cmp byte [0x430530], 0
jne 0x4049c2
cmp byte [0x430531], 0
je 0x404a59
push edi
push 0x42a570
mov edi, 0x104
lea eax, [esp + 0x2a0]
push edi
push eax
call fcn.00401fe5
add esp, 0x10
lea eax, [esp + 0x298]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x404a23
push 0x47
pop ecx
call fcn.00403ece
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_calling_PathRemoveFileSpecW:__d
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
call fcn.0040200f
mov ecx, eax
call fcn.004084c7
jmp 0x4046fe
push edi
lea eax, [esp + 0x29c]
push 0x431230
push eax
call fcn.0040d3b8
add esp, 0xc
test eax, eax
je 0x404a59
push 0x48
pop ecx
call fcn.00403ece
push str.Stage_and_Replace_requests_require_that_the_working_directory_is_a_sub_directory_of_the_installation_directory__Exiting
call fcn.0040200f
push eax
call fcn.00408506
pop ecx
pop ecx
jmp 0x404a12
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
cmp dword [esp + 0x18], ecx
jl 0x404aa0
jg 0x404a6d
cmp esi, ecx
jbe 0x404aa0
push esi
push ecx
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x28], eax
test eax, eax
je 0x404a9e
push 0x2710
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x28]
mov esi, eax
call edi
test esi, esi
jne 0x4046fe
xor ecx, ecx
cmp byte [0x430530], 0
je 0x404aee
xor eax, eax
push 0x208
mov word [esp + 0x4a4], ax
lea eax, [esp + 0x4a6]
push ecx
push eax
call fcn.00414050
add esp, 0xc
lea eax, [esp + 0x4a0]
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x404aee
lea eax, [esp + 0x4a0]
push eax
call fcn.0040e4a9
pop ecx
mov ecx, 0x42a618
call fcn.00402110
push str.MOZ_USING_SERVICE
mov byte [0x430538], al
call fcn.0040eb15
xor eax, eax
mov dword [esp], 0x206
push eax
mov word [esp + 0x98], ax
or esi, 0xffffffff
lea eax, [esp + 0x9a]
mov dword [esp + 0x18], 0x64
push eax
call fcn.00414050
add esp, 0xc
cmp byte [0x430538], 0
jne 0x405015
cmp dword [esp + 0x20], 6
mov al, byte [0x430531]
mov cl, byte [0x430530]
jg 0x404b5f
test al, al
jne 0x404b63
test cl, cl
je 0x405037
test al, al
je 0x404b6f
push 0x431230
push str._s_updated.update_in_progress.lock
jmp 0x404bd4
test cl, cl
je 0x404bc8
xor eax, eax
mov ecx, eax
movzx eax, word [ecx + 0x431230]
lea ecx, [ecx + 2]
mov word [esp + ecx + 0x6ae], ax
test ax, ax
jne 0x404b77
push 0x5c
pop eax
push eax
lea eax, [esp + 0x6b4]
push eax
call fcn.0040d1de
xor ecx, ecx
mov word [eax], cx
lea eax, [esp + 0x6b8]
push eax
push str._smoz_update_in_progress.lock
lea eax, [esp + 0x2a8]
push 0x104
push eax
call fcn.00401fe5
add esp, 0x18
jmp 0x404be9
mov eax, dword [esp + 0x24]
push dword [eax + 0x18]
push str._s.update_in_progress.lock
lea eax, [esp + 0x2a0]
push 0x104
push eax
call fcn.00401fe5
add esp, 0x10
xor eax, eax
push eax
lea eax, [esp + 0x29c]
push eax
call fcn.0040d284
pop ecx
pop ecx
test eax, eax
jne 0x404c37
lea eax, [esp + 0x298]
push eax
call fcn.0040ddcc
pop ecx
test eax, eax
je 0x404c37
cmp byte [0x430531], 0
jne 0x404c23
cmp byte [0x430530], 0
je 0x404c2d
mov ecx, str.pending
call fcn.00403dbf
push str.Update_already_in_progress__Exiting
jmp 0x40492c
xor eax, eax
push eax
push 0x4000000
push 4
push eax
push eax
push 0xc0000000
lea eax, [esp + 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push dword [0x43074c]
mov esi, eax
lea eax, [esp + 0x94]
push str._s_update_elevated.lock
push 0x104
push eax
call fcn.00401fe5
add esp, 0x10
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404c92
push ecx
call fcn.00407bb1
pop ecx
cmp esi, 0xffffffff
je 0x404cb5
test bl, bl
je 0x405015
cmp byte [esp + 0xf], 0
je 0x405015
cmp byte [esp + 0x1f], 0
je 0x405015
xor eax, eax
push eax
lea eax, [esp + 0x94]
push eax
call fcn.0040d284
pop ecx
pop ecx
test eax, eax
jne 0x404ce7
lea eax, [esp + 0x90]
push eax
call fcn.0040ddcc
pop ecx
test eax, eax
je 0x404ce7
push str.Unable_to_create_elevated_lock_file__Exiting_n
jmp 0x4046ee
xor eax, eax
push eax
push 0x4000000
push 4
push eax
push eax
push 0xc0000000
lea eax, [esp + 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x404d19
push str.Unable_to_create_elevated_lock_file__Exiting
jmp 0x40492c
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
dec ecx
call fcn.00403838
mov dword [esp + 0x30], eax
test eax, eax
jne 0x404d3a
push dword [esp + 0x28]
call edi
jmp 0x4046fe
test bl, bl
je 0x404eb2
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x18]
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov ecx, dword [eax]
call fcn.0040828b
test eax, eax
je 0x404eae
cmp dword [esp + 0x18], ebx
je 0x404eae
inc ebx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x14], ebx
call fcn.0040832f
test eax, eax
je 0x404d8f
cmp dword [esp + 0x2c], 0
sete bl
mov dword [esp + 0x14], ebx
test bl, bl
je 0x404eb2
lea edx, [esp + 0x4a0]
call fcn.004074cc
test eax, eax
je 0x404deb
lea eax, [esp + 0x18]
xor ecx, ecx
push eax
push 0x20119
push ecx
lea eax, [esp + 0x4ac]
mov dword [esp + 0x24], ecx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404dd3
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404dfb
mov al, byte [esp + 0xf]
mov bl, al
mov dword [esp + 0x14], ebx
test al, al
jne 0x404e03
mov dword [esp + 0x10], 0x66
jmp 0x404dfb
xor eax, eax
mov dword [esp + 0x10], 0x65
mov bl, al
mov dword [esp + 0x14], ebx
test bl, bl
je 0x404eb2
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
call fcn.00408034
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
mov dword [esp + 0x14], ebx
je 0x404e9b
xor eax, eax
mov byte [esp + 0x18], al
cmp byte [0x430531], al
jne 0x404e3b
call fcn.00401d6d
neg eax
sbb al, al
inc al
mov dword [esp + 0x18], eax
push 5
pop edx
call fcn.004080e6
cmp eax, 1
je 0x404e7c
push ecx
push 0x404397
lea ecx, [esp + 0x44]
call fcn.00402038
test eax, eax
jne 0x404e6a
cmp byte [esp + 0x18], al
je 0x404e6a
xor dl, dl
mov cl, 1
call fcn.00401e0e
push 0xffffffffffffffff
push dword [esp + 0x40]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x3c]
call edi
xor edx, edx
inc edx
call fcn.004080e6
cmp eax, 1
je 0x404ea3
xor eax, eax
mov dword [esp + 0x10], 0x67
mov bl, al
mov dword [esp + 0x14], ebx
jmp 0x404ea3
mov dword [esp + 0x10], 0x68
test bl, bl
je 0x404eb2
mov al, byte [0x430531]
jmp 0x404ed8
mov dword [esp + 0x14], ebx
mov al, byte [0x430531]
test al, al
je 0x404ed4
cmp esi, 0xffffffff
je 0x404ec3
push esi
call edi
mov ecx, str.pending
call fcn.00403dbf
xor eax, eax
jmp 0x4056d4
test bl, bl
je 0x404f1c
test al, al
jne 0x404f14
xor eax, eax
lea ecx, [esp + 0xf]
mov byte [esp + 0xf], al
call fcn.00403ffd
test al, al
je 0x404f14
cmp byte [esp + 0xf], 0
je 0x404f14
call fcn.0040398c
test al, al
jne 0x404f14
push str.The_post_update_process_which_runs_as_the_user_for_service_update_could_not_be_launched.
call fcn.0040d686
add eax, 0x40
push eax
call fcn.0040e5c8
pop ecx
pop ecx
test bl, bl
jne 0x404fbb
cmp byte [esp + 0x1f], 0
jne 0x404fbb
cmp esi, 0xffffffff
jne 0x404fbb
push 0x3c
pop ebx
xor eax, eax
push ebx
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.00414050
xor eax, eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0x68], eax
add esp, 0xc
mov eax, dword [esp + 0x24]
mov dword [esp + 0x58], 0x540
mov dword [esp + 0x60], str.runas
mov dword [esp + 0x70], 1
mov eax, dword [eax]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x68], eax
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
push dword [esp + 0x30]
test eax, eax
setne bl
call fcn.0040be3f
pop ecx
test bl, bl
je 0x404faf
push esi
push dword [esp + 0x90]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x8c]
call edi
jmp 0x404fb7
push 9
pop ecx
call fcn.00403ece
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
cmp edx, 6
jle 0x404fda
push ecx
mov ecx, dword [esp + 0x28]
add edx, 0xfffffffa
lea eax, [ecx + 0x18]
mov ecx, dword [ecx + 0x14]
push eax
call fcn.00403d63
pop ecx
pop ecx
push dword [esp + 0x28]
call edi
test bl, bl
jne 0x405004
cmp byte [esp + 0x1f], bl
jne 0x404ff3
cmp esi, 0xffffffff
je 0x404ecd
push esi
call edi
mov ecx, dword [esp + 0x10]
call fcn.00403ece
jmp 0x404ecd
cmp esi, 0xffffffff
je 0x404ecd
push esi
call edi
jmp 0x404ecd
cmp byte [0x430531], 0
je 0x40502a
xor dl, dl
mov ecx, 0x430e10
call fcn.004023a7
cmp byte [0x430530], 0
jne 0x40512a
mov ebx, 0x430e10
push ebx
call fcn.0040e4a9
pop ecx
test eax, eax
je 0x405073
push ebx
call fcn.0040d762
pop ecx
test eax, eax
jne 0x4046fe
call fcn.0040dd78
cmp dword [eax], 0x11
je 0x4046fe
push ebx
call fcn.0040e4a9
pop ecx
test eax, eax
jne 0x4046fe
cmp byte [0x430530], 0
jne 0x40512f
mov ecx, ebx
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x405087
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 4]
push eax
call fcn.0040be77
mov ebx, eax
pop ecx
test ebx, ebx
je 0x4046fe
mov eax, 0x430e10
mov edx, ebx
mov ecx, eax
sub edx, eax
movzx eax, word [ecx]
mov word [ecx + edx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4050b9
mov ecx, 0x430e10
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x30]
jne 0x4050d0
sub ecx, edx
sar ecx, 1
push 0x2f
pop eax
lea edx, [ebx + ecx*2]
cmp word [ecx*2 + 0x430e0e], ax
je 0x40511f
push 0x5c
pop eax
cmp word [ecx*2 + 0x430e0e], ax
je 0x40511f
lea edi, [edx - 2]
xor ecx, ecx
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, cx
jne 0x405103
mov eax, dword [0x42a820]
add edx, 2
mov dword [edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [0x430e08], ebx
mov word [edx], ax
mov ebx, 0x430e10
push 0x104
lea eax, [esp + 0xccc]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x4051cd
push ebx
push str.NS_main:_unable_to_find_apply_to_dir:__S
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
call fcn.0040200f
mov ecx, eax
call fcn.004084c7
push 0x41
pop ecx
call fcn.00403ece
cmp esi, 0xffffffff
je 0x40517b
push esi
call edi
xor eax, eax
push eax
lea eax, [esp + 0x94]
push eax
call fcn.0040d284
pop ecx
pop ecx
test eax, eax
jne 0x4051a7
lea eax, [esp + 0x90]
push eax
call fcn.0040ddcc
pop ecx
test eax, eax
jne 0x404a12
mov edx, dword [esp + 0x20]
cmp edx, 6
jle 0x4046fe
push ecx
mov ecx, dword [esp + 0x28]
add edx, 0xfffffffa
lea eax, [ecx + 0x18]
mov ecx, dword [ecx + 0x14]
push eax
call fcn.00403d63
jmp 0x4046fc
mov edi, dword [esp + 0x20]
or ebx, 0xffffffff
mov dword [esp + 0x18], ebx
cmp edi, 6
jle 0x40551b
mov ebx, 0x208
xor eax, eax
push ebx
push eax
lea eax, [esp + 0x6b8]
push eax
call fcn.00414050
mov edi, dword [esp + 0x30]
add esp, 0xc
xor eax, eax
add edi, 0x18
mov word [esp + 0x8b8], ax
mov dword [esp + 0x38], edi
push 0x40e
mov ebx, dword [edi]
push eax
lea eax, [esp + 0x8c2]
mov dword [esp + 0x18], ebx
push eax
call fcn.00414050
add esp, 0xc
cmp byte [0x430530], 0
je 0x40531f
xor eax, eax
push eax
push 0x431230
push ebx
call dword [sym.imp.SHLWAPI.dll_PathCommonPrefixW]
mov ebx, eax
lea eax, [esp + 0x8b8]
push ebx
push dword [edi]
mov dword [esp + 0x30], ebx
push eax
call fcn.0040cf8a
add esp, 0xc
lea eax, [esp + 0x8b8]
lea eax, [eax + ebx*2]
mov ecx, 0x208
sub ecx, ebx
mov dword [esp + 0x2c], eax
lea ebx, [ebx*2 + 0x431230]
mov dword [esp + 0x10], ecx
push ecx
push ebx
push eax
call fcn.0040cf8a
add esp, 0xc
lea ecx, [ebx + 2]
xor edx, edx
mov ax, word [ebx]
add ebx, 2
cmp ax, dx
jne 0x405290
mov eax, dword [esp + 0x2c]
sub ebx, ecx
sar ebx, 1
push 0x5c
lea ecx, [eax + ebx*2]
pop eax
mov word [ecx], ax
or eax, 0xffffffff
add ecx, 2
sub eax, ebx
mov ebx, dword [esp + 0x10]
add ebx, eax
mov dword [esp + 0x14], ecx
xor eax, eax
mov word [ecx], ax
mov ecx, edx
movzx eax, word [ecx + 0x431230]
lea ecx, [ecx + 2]
mov word [esp + ecx + 0x49e], ax
test ax, ax
jne 0x4052c5
push edx
lea eax, [esp + 0x4a4]
push eax
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathCommonPrefixW]
lea ecx, [esp + 0x28]
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x28]
jb 0x4052ff
lea ecx, [esp + 0x2c]
mov ecx, dword [ecx]
mov eax, dword [edi]
push ebx
lea eax, [eax + ecx*2]
push eax
push dword [esp + 0x1c]
call fcn.0040cf8a
lea ebx, [esp + 0x8c4]
add esp, 0xc
mov dword [esp + 0x10], ebx
push 0x104
lea eax, [esp + 0x6b4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x405379
push ebx
push str.NS_main:_unable_to_find_callback_file:__S
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
call fcn.0040200f
mov ecx, eax
call fcn.004084c7
push 0x42
pop ecx
call fcn.00403ece
jmp 0x4054bf
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
push ecx
push edi
lea edx, [edx - 6]
mov ecx, dword [eax + 0x14]
jmp 0x4051c3
cmp byte [0x430530], 0
jne 0x405513
lea ecx, [esp + 0xcc8]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x30]
jne 0x405390
sub ecx, edx
mov eax, 0x431020
sar ecx, 1
lea edx, [esp + 0x6b0]
push 0x5c
lea ecx, [edx + ecx*2]
pop edx
cmp word [ecx], dx
jne 0x4053bb
add ecx, 2
push 0x2f
sub ecx, eax
xor ebx, ebx
pop edi
movzx edx, word [ecx + eax]
cmp dx, word [esp + 0x34]
jne 0x4053d2
mov word [eax], di
jmp 0x4053d5
mov word [eax], dx
add eax, 2
cmp word [ecx + eax], bx
jne 0x4053c2
mov edi, dword [esp + 0x38]
xor ecx, ecx
mov word [eax], cx
mov ebx, 0x430c00
push dword [edi]
push str._s.moz_callback
push 0x104
push ebx
call fcn.00401fe5
push ebx
call fcn.0040ddcc
add esp, 0x14
xor eax, eax
push eax
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov dword [esp + 0x14], 1
mov ebx, dword [esp + 0x10]
xor eax, eax
push eax
push eax
push 3
push eax
push 6
push 0x40010000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x18], ebx
cmp ebx, 0xffffffff
jne 0x405517
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push dword [esp + 0x14]
push dword [esp + 0x1c]
push str.NS_main:_callback_app_file_open_attempt__d_failed._File:__S._Last_error:__d
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0x14
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, 0xa
jle 0x40541b
push dword [edi]
cmp ebx, 0x20
je 0x405500
push str.NS_main:_callback_app_file_in_use__failed_to_exclusively_open_executable_file:__S
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
call fcn.0040200f
mov ecx, eax
call fcn.004084c7
cmp ebx, 5
jne 0x4054ac
push 0x23
jmp 0x4054ae
push 0x25
pop ecx
call fcn.00403ece
push 0x430c00
call fcn.0040ddcc
pop ecx
cmp esi, 0xffffffff
je 0x4054cb
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
push eax
lea eax, [esp + 0x94]
push eax
call fcn.0040d284
pop ecx
pop ecx
test eax, eax
jne 0x405364
lea eax, [esp + 0x90]
push eax
call fcn.0040ddcc
pop ecx
test eax, eax
je 0x405364
jmp 0x404a12
push str.NS_main:_callback_app_file_in_use__continuing_without_exclusive_access_for_executable_file:__S
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
cmp byte [0x430531], 0
jne 0x40554b
cmp byte [0x430530], 0
jne 0x40554b
xor eax, eax
push eax
push str.tobedeleted
call fcn.0040d284
pop ecx
pop ecx
test eax, eax
je 0x40554b
push str.tobedeleted
call fcn.0040d762
pop ecx
push ecx
push 0x4043ac
lea ecx, [esp + 0x50]
call fcn.00402038
test eax, eax
jne 0x405577
cmp byte [0x430531], al
jne 0x405577
cmp byte [0x430530], al
jne 0x405577
mov dl, 1
xor cl, cl
call fcn.00401e0e
push 0xffffffffffffffff
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 6
jle 0x4055b2
cmp byte [0x430530], 0
jne 0x4055b2
cmp ebx, 0xffffffff
je 0x4055a7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x430c00
call fcn.0040ddcc
pop ecx
cmp byte [0x430531], 0
jne 0x405624
cmp byte [0x430530], 0
jne 0x405624
mov ebx, str.tobedeleted
push ebx
call fcn.0040d793
pop ecx
test eax, eax
je 0x405624
call fcn.0040dd78
push dword [eax]
push ebx
push str.NS_main:_unable_to_remove_directory:__S__err:__d
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0x10
xor ebx, ebx
push 4
push ebx
push str.tobedeleted
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push str.tobedeleted
test eax, eax
je 0x40561d
push str.NS_main:_directory_will_be_removed_on_OS_reboot:__S
call fcn.0040200f
push eax
call fcn.00408506
add esp, 0xc
jmp 0x405626
push str.NS_main:_failed_to_schedule_OS_reboot_removal_of_directory:__S
jmp 0x40560d
xor ebx, ebx
call fcn.0040200f
mov ecx, eax
call fcn.004084c7
cmp edi, 6
jle 0x4056c9
cmp byte [0x430533], 0
je 0x405670
call fcn.0040398c
test al, al
jne 0x405662
push str.The_post_update_process_was_not_launched
call fcn.0040d686
add eax, 0x40
push eax
call fcn.0040e5c8
pop ecx
pop ecx
cmp byte [0x430538], 0
jne 0x405670
call fcn.00407d5e
cmp esi, 0xffffffff
je 0x40567c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x90]
push ebx
push eax
call fcn.0040d284
pop ecx
pop ecx
test eax, eax
jne 0x4056b3
lea eax, [esp + 0x90]
push eax
call fcn.0040ddcc
pop ecx
test eax, eax
je 0x4056b3
call fcn.0040200f
mov ecx, eax
call fcn.004084c7
jmp 0x404ecd
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [edi - 6]
lea eax, [ecx + 0x18]
mov ecx, dword [ecx + 0x14]
push eax
call fcn.00403d63
pop ecx
pop ecx
xor eax, eax
cmp byte [0x430533], al
sete al
mov ecx, dword [esp + 0xed4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040bd82
mov esp, ebp
pop ebp
ret