Function at 0x14002e4e4
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov r15, rcx
xor r14d, r14d
mov dword [rbp + 0x67], r14d
cmp qword [rcx + 0x10], r14
je 0x14002e543
xor r8d, r8d
mov ebx, 0x8000ffff
mov edx, ebx
lea rcx, str.PkgDefManagement_already_initialized
call fcn.140032190
mov eax, ebx
mov rbx, qword [rsp + 0x118]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r12, [rcx + 0x58]
or edi, 0xffffffff
test rdx, rdx
je 0x14002e58d
lea rcx, [rbp - 0x79]
call fcn.140009580
nop
lea rdx, [rbp - 0x79]
mov rcx, r12
call fcn.140009900
nop
mov rdx, qword [rbp - 0x79]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e69d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14002e69d
mov rcx, r12
call fcn.140038d74
mov r14d, eax
test eax, eax
jns 0x14002e69a
call fcn.140002dfc
mov rcx, rax
test rax, rax
je 0x14002eefc
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x69], rax
mov rcx, qword [r12]
test rcx, rcx
je 0x14002e5e4
add rcx, 0xffffffffffffffe8
call fcn.14000a2b4
lea r8, [rax + 0x18]
mov qword [rbp - 1], r8
mov esi, 1
mov rbx, qword [rbp - 0x71]
jmp 0x14002e601
lea rdx, str.NULL
lea rcx, [rbp - 0x71]
call fcn.140009580
nop
mov esi, 2
mov rbx, qword [rbp - 0x71]
mov r8, rbx
mov dword [rbp + 0x67], esi
lea rdx, str.DiscoverHostingAppPath_failed_for_executable_path:__s
lea rcx, [rbp - 0x69]
call fcn.14000a5f0
nop
or edi, 0xffffffff
test sil, 2
je 0x14002e641
and esi, 0xfffffffd
mov dword [rbp + 0x67], esi
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e63e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov esi, dword [rbp + 0x67]
test sil, 1
je 0x14002e665
mov rdx, qword [rbp - 1]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e665
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor r8d, r8d
mov edx, r14d
mov rbx, qword [rbp - 0x69]
mov rcx, rbx
call fcn.140032190
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e692
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, r14d
jmp 0x14002e528
xor r14d, r14d
mov rcx, qword [r12]
sub rcx, 0x18
call fcn.14000a2b4
add rax, 0x18
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x28]
call fcn.140038ac4
mov esi, eax
test eax, eax
jns 0x14002e7a6
call fcn.140002dfc
test rax, rax
je 0x14002eee6
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rbp - 0x59], rax
mov rcx, qword [r12]
test rcx, rcx
je 0x14002e70c
add rcx, 0xffffffffffffffe8
call fcn.14000a2b4
lea r8, [rax + 0x18]
mov qword [rbp + 7], r8
mov r14d, 4
mov rbx, qword [rbp - 0x61]
jmp 0x14002e72a
lea rdx, str.NULL
lea rcx, [rbp - 0x61]
call fcn.140009580
nop
mov r14d, 8
mov rbx, qword [rbp - 0x61]
mov r8, rbx
mov dword [rbp + 0x67], r14d
lea rdx, str.GetCanonicalName_failed_for_application_executable_path__s
lea rcx, [rbp - 0x59]
call fcn.14000a5f0
nop
test r14b, 8
je 0x14002e76b
and r14d, 0xfffffff7
mov dword [rbp + 0x67], r14d
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e767
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r14d, dword [rbp + 0x67]
test r14b, 4
je 0x14002e78f
mov rdx, qword [rbp + 7]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e78f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor r8d, r8d
mov edx, esi
mov rbx, qword [rbp - 0x59]
mov rcx, rbx
call fcn.140032190
nop
jmp 0x14002eb10
mov rdx, qword [rsp + 0x28]
lea rcx, [rbp - 0x51]
call fcn.140009580
nop
lea rdx, [rbp - 0x51]
mov rcx, r12
call fcn.140009900
nop
mov rdx, qword [rbp - 0x51]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e7e0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [r12]
call qword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
lea r13, [r15 + 0x190]
mov rsi, qword [r12]
test eax, eax
je 0x14002eb33
test rsi, rsi
jne 0x14002e80c
mov esi, 0x80070057
jmp 0x14002ea36
lea rdx, [0x1400706b8]
lea rcx, [rbp - 0x49]
call fcn.140009580
nop
lea rdx, [rbp - 0x49]
mov rcx, r13
call fcn.140009900
nop
mov rdx, qword [rbp - 0x49]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e848
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, rsi
lea rcx, [rbp + 0x77]
call fcn.140009580
nop
mov rbx, qword [rbp + 0x77]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x14002e87a
mov r8, rsi
mov esi, 0x80070057
lea rcx, str.AppId_path_is_not_a_directory
jmp 0x14002ea14
lea rdx, str.master.pkgdef
lea rcx, [rbp + 0x77]
call fcn.140009210
mov rbx, qword [rbp + 0x77]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14002e8cb
lea rdx, [rbp + 0x77]
mov rcx, r13
call fcn.140009900
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002ee58
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14002ee58
mov rdx, rsi
lea rcx, [rbp - 0x41]
call fcn.140009580
nop
lea rdx, [rbp - 0x41]
lea rcx, [rbp + 0x77]
call fcn.140009900
nop
mov rdx, qword [rbp - 0x41]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e904
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rdx, str.devenv.pkgdef
lea rcx, [rbp + 0x77]
call fcn.140009210
mov rbx, qword [rbp + 0x77]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14002e89b
mov rdx, rsi
lea rcx, [rbp - 0x39]
call fcn.140009580
nop
lea rdx, [rbp - 0x39]
lea rcx, [rbp + 0x77]
call fcn.140009900
nop
mov rdx, qword [rbp - 0x39]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e962
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rdx, [0x140077768]
lea rcx, [rbp + 0x77]
call fcn.140009210
lea rdx, str.master.pkgdef
lea rcx, [rbp + 0x77]
call fcn.140009210
mov rbx, qword [rbp + 0x77]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14002e89b
mov rdx, rsi
lea rcx, [rbp - 0x31]
call fcn.140009580
nop
lea rdx, [rbp - 0x31]
lea rcx, [rbp + 0x77]
call fcn.140009900
nop
mov rdx, qword [rbp - 0x31]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002e9d0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rdx, [0x140077768]
lea rcx, [rbp + 0x77]
call fcn.140009210
lea rdx, str.devenv.pkgdef
lea rcx, [rbp + 0x77]
call fcn.140009210
mov rbx, qword [rbp + 0x77]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14002e89b
mov r8, rsi
mov esi, 0x80030002
lea rcx, str.Could_not_locate_master_pkgdef_file_in_directory
mov edx, esi
call fcn.140032190
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002ea36
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
call fcn.140002dfc
mov rcx, rax
test rax, rax
je 0x14002eee6
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x21], rax
mov rcx, qword [r12]
test rcx, rcx
je 0x14002ea7b
add rcx, 0xffffffffffffffe8
call fcn.14000a2b4
lea r8, [rax + 0x18]
mov qword [rbp + 0xf], r8
mov r14d, reloc.OLEAUT32.dll_SafeArrayGetDim
mov rbx, qword [rbp - 0x29]
jmp 0x14002ea99
lea rdx, str.NULL
lea rcx, [rbp - 0x29]
call fcn.140009580
nop
mov r14d, 0x20
mov rbx, qword [rbp - 0x29]
mov r8, rbx
mov dword [rbp + 0x67], r14d
lea rdx, str.LocateMasterPkgDefInDirectory_failed_for_app_executable_path__s
lea rcx, [rbp - 0x21]
call fcn.14000a5f0
nop
test r14b, 0x20
je 0x14002eada
and r14d, 0xffffffdf
mov dword [rbp + 0x67], r14d
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002ead6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r14d, dword [rbp + 0x67]
test r14b, 0x10
je 0x14002eafe
mov rdx, qword [rbp + 0xf]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002eafe
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor r8d, r8d
mov edx, esi
mov rbx, qword [rbp - 0x21]
mov rcx, rbx
call fcn.140032190
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002eec0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14002eec0
test rsi, rsi
jne 0x14002eb42
mov esi, 0x80070057
jmp 0x14002ed34
mov rdx, rsi
lea rcx, [rsp + 0x20]
call fcn.140009580
nop
lea rdx, [0x1400706b8]
lea rcx, [rbp - 0x19]
call fcn.140009580
nop
lea rdx, [rbp - 0x19]
mov rcx, r13
call fcn.140009900
nop
mov rdx, qword [rbp - 0x19]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002eb8c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14002ebd2
mov esi, 0x80030002
lea rcx, str.Could_not_locate_executable
mov edx, esi
mov r8, rbx
call fcn.140032190
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002ed34
mov rcx, qword [rdx]
jmp 0x14002ed2e
lea rdx, [rbp + 0x17]
lea rcx, [rsp + 0x20]
call fcn.140031424
mov r14, rax
mov rax, qword [rax]
movsxd rbx, dword [rax - 0x10]
test ebx, ebx
js 0x14002eef1
mov edx, 1
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, ebx
or ecx, edx
jge 0x14002ec0d
mov edx, ebx
mov rcx, r14
call fcn.1400028a0
lea eax, [rbx + 1]
movsxd rdx, eax
mov rcx, qword [r14]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsupr_s]
mov rax, qword [r14]
cmp ebx, dword [rax - 0xc]
jg 0x14002eef1
mov dword [rax - 0x10], ebx
mov rax, qword [r14]
xor r8d, r8d
mov word [rax + rbx*2], r8w
lea rdx, str..EXE
mov rcx, qword [r14]
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscmp
mov ebx, eax
mov rdx, qword [rbp + 0x17]
add rdx, 0xffffffffffffffe8
mov ecx, edi
lock xadd dword [rdx + 0x10], ecx
add ecx, edi
test ecx, ecx
jg 0x14002ec66
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
test ebx, ebx
je 0x14002ec80
mov rbx, qword [rsp + 0x20]
mov esi, 0x80070057
lea rcx, str.Executable_is_not_.EXE
jmp 0x14002ebaa
mov r14, qword [rsp + 0x20]
add r14, 0xffffffffffffffe8
mov rcx, r14
call fcn.14000a2b4
add rax, 0x18
mov qword [rbp + 0x7f], rax
lea rdx, str..PkgDef
lea rcx, [rbp + 0x7f]
call fcn.140024cc4
mov rbx, qword [rbp + 0x7f]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14002ecd7
lea rcx, [rbp + 0x7f]
call fcn.140009184
lea rdx, str.master.pkgdef
lea rcx, [rbp + 0x7f]
call fcn.140009210
mov rbx, qword [rbp + 0x7f]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14002ee13
mov r8, rsi
mov esi, 0x80030002
mov edx, esi
lea rcx, str.Could_not_locate_master_pkgdef_file_for_AppId
call fcn.140032190
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002ed1a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov eax, edi
lock xadd dword [r14 + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002ed34
mov rcx, qword [r14]
mov rdx, r14
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
call fcn.140002dfc
mov rcx, rax
test rax, rax
je 0x14002eee6
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 9], rax
mov rcx, qword [r12]
test rcx, rcx
je 0x14002ed79
add rcx, 0xffffffffffffffe8
call fcn.14000a2b4
lea r8, [rax + 0x18]
mov qword [rbp + 0x1f], r8
mov r14d, 0x40
mov rbx, qword [rbp - 0x11]
jmp 0x14002ed97
lea rdx, str.NULL
lea rcx, [rbp - 0x11]
call fcn.140009580
nop
mov r14d, 0x80
mov rbx, qword [rbp - 0x11]
mov r8, rbx
mov dword [rbp + 0x67], r14d
lea rdx, str.LocateMasterPkgDefFromExe_failed_for_app_executable_path__s
lea rcx, [rbp - 9]
call fcn.14000a5f0
nop
test r14b, r14b
jns 0x14002edd8
btr r14d, 7
mov dword [rbp + 0x67], r14d
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002edd4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r14d, dword [rbp + 0x67]
test r14b, 0x40
je 0x14002edfc
mov rdx, qword [rbp + 0x1f]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002edfc
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor r8d, r8d
mov edx, esi
mov rbx, qword [rbp - 9]
mov rcx, rbx
call fcn.140032190
nop
jmp 0x14002eb10
lea rdx, [rbp + 0x7f]
mov rcx, r13
call fcn.140009900
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002ee3b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov eax, edi
lock xadd dword [r14 + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002ee55
mov rcx, qword [r14]
mov rax, qword [rcx]
mov rdx, r14
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor r14d, r14d
mov esi, r14d
mov rdx, r13
lea rcx, [r15 + 0x50]
call fcn.140009900
lea rcx, [r15 + 0x50]
call fcn.140009184
test byte [r15 + 0x3c], 0x20
jne 0x14002ee91
test dword [r15 + 0x3c], 0x2000
jne 0x14002ee91
cmp dword [r15 + 0x44], edi
je 0x14002ee91
mov rax, qword [r15 + 0x78]
cmp dword [rax - 0x10], r14d
je 0x14002eec0
mov rcx, r15
call fcn.14002ff0c
mov esi, eax
test eax, eax
jns 0x14002eeb2
xor r8d, r8d
mov edx, eax
lea rcx, str.ScanMasterPkgDefForInitializationFields_failed
call fcn.140032190
jmp 0x14002eec0
cmp dword [r15 + 0x44], edi
jne 0x14002eec0
mov dword [r15 + 0x44], 1
mov rdx, qword [rsp + 0x28]
add rdx, 0xffffffffffffffe8
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x14002eedf
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, esi
jmp 0x14002e528
mov ecx, 0x80004005
call fcn.140002fa4
nop
mov ecx, 0x80070057
call fcn.140002fa4
nop
mov ecx, 0x80004005
call fcn.140002fa4
int3