Function at 0x140006be0
Capabilities:
Check if file exists
Create directory
Get file attributes
Set registry value

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rdi
lea rbp, [rsp - 0x1078]
mov eax, 0x1178
call fcn.14000c460
sub rsp, rax
lea rdx, [rbp + 0x1098]
lea rcx, [rbp + 0x1090]
call fcn.140001e50
cmp dword [rbp + 0x1090], 4
jge 0x140006c44
mov ecx, 2
call fcn.1400131c4
mov rcx, rax
lea rdx, str.Usage:_updater_patch_dir_install_dir_apply_to_dir__wait_pid__callback_working_dir_callback_path_args...___n
call fcn.140006b20
mov eax, 1
add rsp, 0x1178
pop rdi
pop rbp
ret
mov rcx, qword [rbp + 0x1098]
mov rcx, qword [rcx + 8]
call fcn.1400088c0
test al, al
jne 0x140006c8b
mov ecx, 2
call fcn.1400131c4
mov r8, qword [rbp + 0x1098]
lea rdx, str.The_patch_directory_path_is_not_valid_for_this_application___S__n
mov rcx, rax
mov r8, qword [r8 + 8]
call fcn.140006b20
mov eax, 1
add rsp, 0x1178
pop rdi
pop rbp
ret
mov rdx, qword [rbp + 0x1098]
lea rcx, [0x140040bc0]
mov r8d, 0x104
mov rdx, qword [rdx + 8]
call fcn.140012f9c
mov rcx, qword [rbp + 0x1098]
mov rcx, qword [rcx + 0x10]
call fcn.1400088c0
test al, al
jne 0x140006cf9
mov ecx, 0x4b
call fcn.1400057d0
mov ecx, 2
call fcn.1400131c4
mov r8, qword [rbp + 0x1098]
lea rdx, str.The_install_directory_path_is_not_valid_for_this_application___S__n
mov rcx, rax
mov r8, qword [r8 + 0x10]
call fcn.140006b20
mov eax, 1
add rsp, 0x1178
pop rdi
pop rbp
ret
mov rdx, qword [rbp + 0x1098]
mov r8d, 0x104
mov qword [rsp + 0x11a8], rbx
mov qword [rsp + 0x1170], rsi
mov qword [rsp + 0x1160], r13
lea r13, [0x140040dd0]
mov rdx, qword [rdx + 0x10]
mov rcx, r13
mov qword [rsp + 0x1158], r14
call fcn.140012f9c
mov r14d, 0x5c
xor esi, esi
mov edx, r14d
mov word [0x140040fd6], si
mov rcx, r13
call fcn.14000d648
test rax, rax
je 0x140006d61
cmp word [rax + 2], si
jne 0x140006d61
mov word [rax], si
mov qword [rsp + 0x40], rsi
lea rax, [rbp + 0x10a0]
mov qword [rsp + 0x38], rax
lea rdx, str.SoftwareClassesApplications
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], 2
xor r8d, r8d
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x20], esi
mov qword [rbp + 0x10a0], rsi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov rcx, qword [rbp + 0x10a0]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x40], rsi
lea rax, [rbp + 0x10a0]
mov qword [rsp + 0x38], rax
lea rdx, str.SoftwareClassesApplicationsupdater.exe
mov qword [rsp + 0x30], rsi
mov edi, 1
mov dword [rsp + 0x28], 2
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], edi
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140006e6c
mov rcx, qword [rbp + 0x10a0]
lea rdx, str.IsHostApp
mov dword [rsp + 0x28], esi
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0x10a0]
lea rdx, str.NoOpenWith
xor r9d, r9d
mov dword [rsp + 0x28], esi
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0x10a0]
lea rdx, str.NoStartPage
xor r9d, r9d
mov dword [rsp + 0x28], esi
xor r8d, r8d
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0x10a0]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rbp + 0x1090], 4
mov rbx, rsi
jle 0x140006ec4
mov rcx, qword [rbp + 0x1098]
mov rcx, qword [rcx + 0x20]
call fcn.140019478
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140006e9a
mov byte [0x140041819], dil
jmp 0x140006ec4
mov rax, qword [rbp + 0x1098]
lea rdx, str._replace
mov rcx, qword [rax + 0x20]
call fcn.14000d71c
movzx ecx, byte [0x14004181a]
test rax, rax
cmovne ecx, edi
mov byte [0x14004181a], cl
mov rcx, qword [rbp + 0x1098]
mov rcx, qword [rcx + 0x18]
call fcn.1400088c0
test al, al
jne 0x140006f0d
mov ecx, 0x4c
call fcn.1400057d0
mov ecx, 2
call fcn.1400131c4
mov r8, qword [rbp + 0x1098]
lea rdx, str.The_working_directory_path_is_not_valid_for_this_application___S__n
mov rcx, rax
mov r8, qword [r8 + 0x18]
call fcn.140006b20
mov eax, edi
jmp 0x140007ded
mov rdx, qword [rbp + 0x1098]
lea rcx, [0x140040fe0]
mov r8d, 0x104
mov qword [rsp + 0x1168], r12
mov rdx, qword [rdx + 0x18]
call fcn.140012f9c
mov edx, r14d
mov word [0x1400411e6], si
lea rcx, [0x140040fe0]
call fcn.14000d648
test rax, rax
je 0x140006f56
cmp word [rax + 2], si
jne 0x140006f56
mov word [rax], si
cmp dword [rbp + 0x1090], 6
mov r12d, 0x208
mov r14, 0xffffffffffffffff
jle 0x14000704d
mov rcx, qword [rbp + 0x1098]
mov rcx, qword [rcx + 0x30]
call fcn.1400088c0
test al, al
jne 0x140006fb7
lea ecx, [r14 + 0x4e]
call fcn.1400057d0
lea ecx, [r14 + 3]
call fcn.1400131c4
mov r8, qword [rbp + 0x1098]
lea rdx, str.The_callback_file_path_is_not_valid_for_this_application___S__n
mov rcx, rax
mov r8, qword [r8 + 0x30]
call fcn.140006b20
mov eax, edi
jmp 0x140007de5
mov r8, r12
lea rcx, [rbp + 0x820]
xor edx, edx
call fcn.14000d2c0
mov r8, r14
inc r8
cmp word [r13 + r8*2], si
jne 0x140006fcb
mov rdx, qword [rbp + 0x1098]
lea rcx, [rbp + 0x820]
mov rdx, qword [rdx + 0x30]
call fcn.140012f9c
lea r8, [rbp + 0x820]
mov rax, r13
sub r8, r13
nop word [rax + rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140007014
add rax, 2
test ecx, ecx
jne 0x140007000
test edx, edx
je 0x14000704d
mov ecx, 0x4e
call fcn.1400057d0
mov ecx, 2
call fcn.1400131c4
mov r8, qword [rbp + 0x1098]
lea rdx, str.The_callback_file_must_be_located_in_the_installation_directory___S__n
mov rcx, rax
mov r8, qword [r8 + 0x30]
call fcn.140006b20
mov eax, edi
jmp 0x140007de5
lea rcx, [0x14002fbe8]
call fcn.1400032e0
test al, al
je 0x140007070
lea rcx, str.MOZ_OS_UPDATE
mov byte [0x14004181b], dil
call fcn.140019adc
call fcn.140003e20
mov rcx, rax
lea r8, [0x14002f510]
lea rdx, [0x140040bc0]
call fcn.140008810
lea rcx, str.applying
call fcn.140005830
test al, al
jne 0x1400070b6
call fcn.140003e20
mov rcx, rax
lea rdx, str.failed_setting_status_to_applying
call fcn.1400089d0
mov eax, edi
jmp 0x140007de5
cmp byte [0x140041819], sil
je 0x1400070cd
call fcn.140003e20
lea rdx, str.Performing_a_staged_update
jmp 0x1400070e2
cmp byte [0x14004181a], sil
je 0x1400070ea
call fcn.140003e20
lea rdx, str.Performing_a_replace_request
mov rcx, rax
call fcn.1400089d0
call fcn.140003e20
mov rcx, rax
lea r8, [0x140040bc0]
lea rdx, str.PATCH_DIRECTORY__S
call fcn.1400089d0
call fcn.140003e20
mov rcx, rax
lea rdx, str.INSTALLATION_DIRECTORY__S
mov r8, r13
call fcn.1400089d0
call fcn.140003e20
mov rcx, rax
lea r8, [0x140040fe0]
lea rdx, str.WORKING_DIRECTORY__S
call fcn.1400089d0
mov r8d, 0x104
lea rcx, [0x140040fe0]
mov rdx, r13
call fcn.1400192dc
test eax, eax
je 0x14000724e
cmp byte [0x140041819], sil
jne 0x140007198
cmp byte [0x14004181a], sil
jne 0x140007198
mov ecx, 0x4a
call fcn.1400057d0
call fcn.140003e20
mov rcx, rax
lea rdx, str.Installation_directory_and_working_directory_must_be_the_same_for_non_staged_updates._Exiting.
call fcn.1400089d0
call fcn.140003e20
mov rcx, rax
call fcn.1400087a0
mov eax, edi
jmp 0x140007de5
lea r9, [0x140040fe0]
mov edx, 0x104
lea r8, [0x14002fd30]
lea rcx, [rbp + 0x1f0]
call fcn.140006730
lea rcx, [rbp + 0x1f0]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x140007203
lea ecx, [rax + 0x47]
call fcn.1400057d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140003e20
mov rcx, rax
lea rdx, str.Error_calling_PathRemoveFileSpecW:__d
mov r8d, ebx
call fcn.1400089d0
call fcn.140003e20
mov rcx, rax
call fcn.1400087a0
mov eax, edi
jmp 0x140007de5
mov r8d, 0x104
lea rcx, [rbp + 0x1f0]
mov rdx, r13
call fcn.1400192dc
test eax, eax
je 0x14000724e
mov ecx, 0x48
call fcn.1400057d0
call fcn.140003e20
mov rcx, rax
lea rdx, str.The_apply_to_directory_must_be_the_same_as_or_a_child_of_the_installation_directory__Exiting.
call fcn.1400089d0
call fcn.140003e20
mov rcx, rax
call fcn.1400087a0
mov eax, edi
jmp 0x140007de5
mov qword [rsp + 0x1150], r15
test rbx, rbx
jle 0x140007294
mov r8d, ebx
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r15, rax
test rax, rax
je 0x140007294
mov edx, 0x2710
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, r15
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x140007d83
mov r8, r12
lea rcx, [rbp - 0x20]
xor edx, edx
mov r15, r14
call fcn.14000d2c0
cmp dword [rbp + 0x1090], 6
jg 0x140007416
cmp byte [0x140041819], sil
jne 0x14000741f
cmp byte [0x14004181a], sil
jne 0x140007434
lea rbx, [0x140040fe0]
mov rcx, rbx
call fcn.140019d04
test eax, eax
je 0x1400072ed
call fcn.140019270
cmp dword [rax], 0x11
jne 0x140007d83
cmp byte [0x14004181a], sil
jne 0x140007384
mov rcx, r14
nop dword [rax]
cmp word [rbx + rcx*2 + 2], si
lea rcx, [rcx + 1]
jne 0x140007300
lea rcx, [rcx + rcx + 4]
call fcn.1400109e8
mov r9, rax
test rax, rax
je 0x140007d83
mov r8, rax
mov rdx, rbx
sub r8, rbx
movzx ecx, word [rdx]
mov word [r8 + rdx], cx
lea rdx, [rdx + 2]
test cx, cx
jne 0x14000732a
mov rax, r14
nop
cmp word [rbx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x140007340
movzx ecx, word [rbx + rax*2 - 2]
lea rdx, [r9 + rax*2]
cmp cx, 0x2f
je 0x14000737a
cmp cx, 0x5c
je 0x14000737a
lea rcx, [rdx - 2]
cmp word [rcx + 2], si
lea rcx, [rcx + 2]
jne 0x140007364
mov eax, dword [0x14002e7a4]
add rdx, 2
mov dword [rcx], eax
mov word [rdx], si
mov qword [0x140040bb8], r9
mov r8d, 0x104
lea rdx, [rbp + 0xa30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x14000772a
call fcn.140003e20
mov rcx, rax
lea rdx, str.NS_main:_unable_to_find_apply_to_dir:__S
mov r8, rbx
call fcn.1400089d0
call fcn.140003e20
mov rcx, rax
call fcn.1400087a0
mov ecx, 0x41
call fcn.1400057d0
cmp r15, r14
je 0x1400073de
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
lea rcx, [rbp - 0x20]
call fcn.140012fe4
test eax, eax
jne 0x1400078dd
lea rcx, [rbp - 0x20]
call fcn.14001324c
test eax, eax
je 0x1400078dd
call fcn.140003e20
mov rcx, rax
call fcn.1400087a0
mov eax, edi
jmp 0x140007ddd
cmp byte [0x140041819], sil
je 0x14000742b
mov r9, r13
lea r8, str._s_updated.update_in_progress.lock
jmp 0x14000748c
cmp byte [0x14004181a], sil
je 0x14000747a
mov rcx, rsi
nop word [rax + rax]
movzx eax, word [rcx + r13]
mov word [rbp + rcx + 0x610], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x140007440
mov edx, 0x5c
lea rcx, [rbp + 0x610]
call fcn.14000d648
lea r9, [rbp + 0x610]
lea r8, str._smoz_update_in_progress.lock
mov word [rax], si
jmp 0x14000748c
mov r9, qword [rbp + 0x1098]
lea r8, str._s.update_in_progress.lock
mov r9, qword [r9 + 0x30]
mov edx, 0x104
lea rcx, [rbp + 0x1f0]
call fcn.140006730
xor edx, edx
lea rcx, [rbp + 0x1f0]
call fcn.140012fe4
test eax, eax
jne 0x1400074f8
lea rcx, [rbp + 0x1f0]
call fcn.14001324c
test eax, eax
je 0x1400074f8
cmp byte [0x140041819], sil
jne 0x1400074d1
cmp byte [0x14004181a], sil
je 0x1400074dd
lea rcx, str.pending
call fcn.140005830
call fcn.140003e20
mov rcx, rax
lea rdx, str.Update_already_in_progress__Exiting
call fcn.1400089d0
mov eax, edi
jmp 0x140007ddd
mov qword [rsp + 0x30], rsi
lea rcx, [rbp + 0x1f0]
mov dword [rsp + 0x28], 0x4000000
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea r9, [0x140040bc0]
mov edx, 0x104
lea r8, str._s_update_elevated.lock
mov r15, rax
lea rcx, [rbp - 0x20]
call fcn.140006730
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000755a
xor ecx, ecx
call 0x1400084f0
cmp r15, r14
jne 0x1400076fe
xor edx, edx
lea rcx, [rbp - 0x20]
call fcn.140012fe4
test eax, eax
jne 0x14000759f
lea rcx, [rbp - 0x20]
call fcn.14001324c
test eax, eax
je 0x14000759f
mov ecx, 2
call fcn.1400131c4
mov rcx, rax
lea rdx, str.Unable_to_create_elevated_lock_file__Exiting_n
call fcn.140006b20
mov eax, edi
jmp 0x140007ddd
mov qword [rsp + 0x30], rsi
lea rcx, [rbp - 0x20]
mov dword [rsp + 0x28], 0x4000000
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x1400075ed
call fcn.140003e20
mov rcx, rax
lea rdx, str.Unable_to_create_elevated_lock_file__Exiting
call fcn.1400089d0
mov eax, edi
jmp 0x140007ddd
mov rcx, qword [rax - 0x77]
pop rsp
and al, 8
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov r14, rdx
mov rbp, rcx
mov edx, 0x20
lea rcx, [rsp + 0x40]
mov edi, r9d
mov rsi, r8
call fcn.1400093cf
lea rdx, [rsp + 0x98]
mov dword [rsp + 0x98], 0x10
lea rcx, [rsp + 0x40]
call qword [rbp + 0x10]
mov rdx, qword [rsp + 0xa0]
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x98], 0x105
call fcn.140008c53
mov ebx, eax
xor ebx, edi
mov ecx, ebx
call qword [rbp]
mov dword [rsi], ebx
call qword [rbp + 8]
mov ebx, eax
and ebx, 0x80000007
jge 0x140007673
dec ebx
or ebx, 0xfffffff8
inc ebx
lea rcx, [rsp + 0x40]
call fcn.140008e73
lea r8d, [rax + 3]
add r8d, ebx
xor ebx, ebx
mov dword [rsp + 0x98], r8d
mov ecx, ebx
mov edx, ebx
lea eax, [rcx + 0x41]
inc ecx
mov byte [rsp + rdx + 0x20], al
movsxd rdx, ecx
cmp rdx, 0x1a
jb 0x140007692
test r8d, r8d
je 0x1400076df
call qword [rbp + 8]
movsxd rcx, eax
inc ebx
movabs rax, 0x4ec4ec4ec4ec4ec5
mul rcx
shr rdx, 3
imul rax, rdx, 0x1a
sub rcx, rax
movsx eax, byte [rsp + rcx + 0x20]
mov word [r14], ax
lea r14, [r14 + 2]
cmp ebx, dword [rsp + 0x98]
jb 0x1400076a9
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
insb byte [rdi], dx
and al, 0x10
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
xor ebx, ebx
lea rsi, [rdx + 0x10de]
mov ebp, r9d
mov r14, r8
mov rdi, rdx
mov r15, rcx
cmp dword [rdx + 0xee4], ebx
jbe 0x140007754
mov r8, qword [rsp + 0x60]
mov rcx, r15
movsxd rax, ebx
imul rdx, rax, 0x8a
add rdx, rsi
call fcn.140008be3
cmp eax, ebp
je 0x14000776f
inc ebx
cmp ebx, dword [rdi + 0xee4]
jb 0x14000772c
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
movsxd rax, ebx
imul rcx, rax, 0x8a
mov eax, dword [rcx + rsi + 0x86]
mov dword [r14], eax
mov eax, dword [rcx + rsi + 0x82]
add rax, 0xee4
add rax, rdi
jmp 0x140007756
stc
je 0x140007918
mov r10, rcx
sub r8, rcx
xor edx, edx
test ebx, ebx
je 0x14000790c
mov rcx, r10
mov r9b, byte [r8 + rcx]
cmp byte [rcx], r9b
je 0x1400078fe
cmp r9b, 0x3f
jne 0x14000790c
inc edx
inc rcx
cmp edx, ebx
jb 0x1400078ef
add rax, r11
jmp 0x14000791a
inc eax
inc r10
dec r8
cmp eax, edi
jb 0x1400078e6
xor eax, eax
mov rbx, qword [rsp + 8]
mov rdi, qword [rsp + 0x10]
ret
xchg dword [rax - 0x77], ecx
and al, 0x58
mov eax, dword [r14 + 0x10c]
mov dword [rsp + 0x30], eax
mov eax, dword [r14 + 0xfc]
mov edi, dword [r15 + r12]
mov r13d, dword [r15 + r12 + 4]
mov dword [rsp + 0x38], eax
mov eax, dword [r14 + 0x124]
xor eax, dword [r14 + 0xec]
mov dword [rbp + 0x7f], ecx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x50], rcx
cmp edi, eax
jne 0x140007dee
mov edx, dword [rbp + 0x6f]
lea rcx, [r12 + 8]
add rcx, r15
mov qword [rsp + 0x28], r14
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], rsi
mov dword [rsp + 0x20], esi
mov r8d, r13d
call fcn.140008fc3
ficom dword [rcx]
add byte [rax], al
jmp 0x140007f86
add byte [rbx + 0x75ff85c7], cl
or dword [rax - 0x75], ecx
xchg byte [rax - 0x75000000], dl
add byte [rbx - 0x7974b730], cl
nop
add byte [rax], al
add byte [rbx + 0x11888], cl
add bh, bh
push rsi
adc byte [rcx - 0x73], cl
push rsp
and al, 8
mov eax, edi
test edi, edi
jne 0x140007dfd
mov rax, qword [rsi + 0x90]
mov eax, dword [rax]
mov edx, eax
mov rax, qword [rsi + 0x90]
mov ecx, dword [rax + 0x118]
call qword [rsi + 0x10]
lea rdx, [r12 + 8]
mov r8d, edi
add rdx, r15
mov rcx, rax
mov rbx, rax