Function at 0x140015730
Capabilities:
Check if file exists
Get file attributes
Set current directory
Set environment variable

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp - 8], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov r13, rdx
mov r12, rcx
xor ebx, ebx
mov qword [rbp + 0x50], rbx
xor edi, edi
mov qword [rbp + 0x58], rdi
xor esi, esi
mov qword [rbp - 0x10], rsi
test rdx, rdx
jne 0x1400157c5
mov r15d, 0x80070057
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x922
lea r9, str.CSetupHost::OnWorkingPathChanged
lea r8, str._s__d_:_Result__0x_X
mov edx, 4
mov rcx, rax
call fcn.14002374c
test eax, eax
mov ecx, eax
jns 0x1400157bb
call fcn.140025d30
call fcn.140025d50
jmp 0x140015ce4
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
mov r14d, eax
cmp eax, 0xffffffff
je 0x1400157e6
shr r14d, 4
and r14d, 1
jmp 0x1400157e9
xor r14d, r14d
xor ecx, ecx
call fcn.140025d50
xor ecx, ecx
call fcn.140025d50
test r14d, r14d
jne 0x14001582c
mov r15d, 0x80070003
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x925
jmp 0x140015795
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop dword [rax + rax]
test eax, eax
jne 0x14001589f
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x140015857
mov r15d, 0x80004005
jmp 0x140015868
movzx r15d, ax
or r15d, 0x80070000
test eax, eax
cmovle r15d, eax
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test r15d, r15d
jns 0x1400157bb
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x927
jmp 0x140015795
lea rdx, [rbp + 0x48]
mov rcx, r13
call fcn.140029fcc
mov r15d, eax
test eax, eax
jns 0x1400158bb
mov ecx, eax
call fcn.140025d30
jmp 0x1400158dc
lea r8, [rbp + 0x50]
mov edx, dword [rbp + 0x48]
mov rcx, r13
call fcn.140028308
mov r15d, eax
test eax, eax
jns 0x1400158d8
mov ecx, eax
call fcn.140025d30
mov rbx, qword [rbp + 0x50]
mov ecx, r15d
call fcn.140025d50
test r15d, r15d
jns 0x140015917
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x929
jmp 0x140015795
lea r9, [rbp + 0x58]
lea rdx, str.Panther
mov rcx, rbx
call fcn.140024234
mov r15d, eax
test eax, eax
jns 0x140015988
mov rcx, qword [r12]
mov rax, qword [rcx + 0x18]
mov rcx, r12
call qword [str.PN_t_]
xor ecx, ecx
test rax, rax
je 0x14001597a
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x92a
lea r9, str.CSetupHost::OnWorkingPathChanged
lea r8, str._s__d_:_Result__0x_X
lea edx, [rcx + 4]
mov rcx, rax
call fcn.14002374c
mov ecx, eax
test eax, eax
jns 0x14001597a
call fcn.140025d30
call fcn.140025d50
mov rdi, qword [rbp + 0x58]
jmp 0x140015ce4
mov rdi, qword [rbp + 0x58]
or r9d, 0xffffffff
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x20], rdi
mov r8, qword [r12 + 0x30]
lea edx, [r9 + 2]
mov ecx, 0x409
call qword [sym.imp.KERNEL32.dll_CompareStringW]
nop dword [rax + rax]
cmp eax, 2
je 0x140015a2a
mov rdx, rdi
mov rcx, qword [r12 + 0x30]
call fcn.14002eeec
test eax, eax
jne 0x140015a2a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x1400159e2
mov r15d, 0x80004005
jmp 0x1400159f3
movzx r15d, ax
or r15d, 0x80070000
test eax, eax
cmovle r15d, eax
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test r15d, r15d
jns 0x1400157bb
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x92d
jmp 0x140015795
mov rcx, 0xffffffff80000002
call fcn.14002f4fc
test eax, eax
je 0x140015ba7
lea r9, [rbp - 0x10]
lea rdx, str.ProvTemp
mov rcx, rbx
call fcn.140024234
mov r15d, eax
test eax, eax
jns 0x140015aaf
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test rax, rax
je 0x140015aa1
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x936
lea r9, str.CSetupHost::OnWorkingPathChanged
lea r8, str._s__d_:_Result__0x_X
lea edx, [rcx + 4]
mov rcx, rax
call fcn.14002374c
mov ecx, eax
test eax, eax
jns 0x140015aa1
call fcn.140025d30
call fcn.140025d50
mov rsi, qword [rbp - 0x10]
jmp 0x140015ce4
mov rsi, qword [rbp - 0x10]
mov rdx, rsi
lea rcx, [0x1400a25b0]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop dword [rax + rax]
test eax, eax
jne 0x140015b2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x140015ae5
mov r15d, 0x80004005
jmp 0x140015af6
movzx r15d, ax
or r15d, 0x80070000
test eax, eax
cmovle r15d, eax
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test r15d, r15d
jns 0x1400157bb
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x937
jmp 0x140015795
mov rdx, rsi
lea rcx, str.TEMP
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop dword [rax + rax]
test eax, eax
jne 0x140015ba7
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x140015b5f
mov r15d, 0x80004005
jmp 0x140015b70
movzx r15d, ax
or r15d, 0x80070000
test eax, eax
cmovle r15d, eax
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test r15d, r15d
jns 0x1400157bb
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x938
jmp 0x140015795
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
mov r8, rax
test rax, rax
je 0x140015c08
mov rcx, qword [rax]
mov rax, qword [rcx + 0x40]
mov rdx, rdi
mov rcx, r8
call qword [str.PN_t_]
mov r15d, eax
test eax, eax
jns 0x140015c08
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x93e
jmp 0x140015795
mov rcx, qword [r12 + 0xf8]
test rcx, rcx
je 0x140015c5a
mov rax, qword [rcx]
mov rdx, rdi
mov rax, qword [rax + 0x30]
call qword [str.PN_t_]
mov r15d, eax
test eax, eax
jns 0x140015c5a
mov rax, qword [r12]
mov rcx, r12
mov rax, qword [rax + 0x18]
call qword [str.PN_t_]
xor ecx, ecx
test rax, rax
je 0x1400157bb
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 0x943
jmp 0x140015795
mov r13, rbx
xor ebx, ebx
mov r14, qword [r12 + 0x28]
test r14, r14
je 0x140015c91
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
lea r8, [r14 - 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
xor ecx, ecx
call fcn.140025d50
xor eax, eax
test r13, r13
cmovne rax, r13
mov qword [r12 + 0x28], rax
mov r13, rdi
xor edi, edi
mov r14, qword [r12 + 0x30]
test r14, r14
je 0x140015cd6
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
lea r8, [r14 - 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
xor ecx, ecx
call fcn.140025d50
xor eax, eax
test r13, r13
cmovne rax, r13
mov qword [r12 + 0x30], rax
mov ecx, r15d
call fcn.140025d50
nop
test rsi, rsi
je 0x140015d1b
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
lea r8, [rsi - 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
xor ecx, ecx
call fcn.140025d50
nop
test rdi, rdi
je 0x140015d49
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
lea r8, [rdi - 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
xor ecx, ecx
call fcn.140025d50
nop
test rbx, rbx
je 0x140015d76
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov rcx, rax
lea r8, [rbx - 4]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
xor ecx, ecx
call fcn.140025d50
mov eax, r15d
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret