Function at 0x140017020
Capabilities:
Check if file exists
Create directory
Create process on windows
Get file attributes
Query environment variable
Set current directory

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0xd20
lea rbp, [rsp + 0x40]
mov qword [rbp + 0xd10], rbx
mov qword [rbp + 0xd18], rsi
mov qword [rbp + 0xd28], rdi
mov rax, qword [0x1400623d0]
xor rax, rbp
mov qword [rbp + 0xcd0], rax
xor edi, edi
mov rbx, r8
lea rcx, [rbp + 0x14]
lea r8d, [rdi + 0x7c]
xor edx, edx
mov dword [rbp + 0x10], edi
call fcn.14001a650
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0x100
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
test eax, eax
jne 0x1400170a7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_raise_main_to_realtime___d__n
mov edx, eax
call fcn.14000b8c0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rdx, [rbp + 0xa8]
lea rcx, str.WizDebug
mov r8d, 4
mov r13d, eax
mov dword [rbp + 8], eax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rdx, [0x1400481d4]
lea rcx, [rbp + 0xa8]
call fcn.14001b25c
mov ecx, dword [0x140063dd0]
mov esi, 1
test eax, eax
lea r8d, [rsi + 3]
lea rdx, [rbp + 0xa0]
cmove ecx, esi
mov dword [0x140063dd0], ecx
lea rcx, str.WizTimeLog
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rdx, [0x1400481d4]
lea rcx, [rbp + 0xa0]
call fcn.14001b25c
mov ecx, dword [0x140063dd4]
test eax, eax
cmove ecx, esi
mov dword [0x140063dd4], ecx
xor ecx, ecx
call fcn.14001d75c
cmp dword [0x140063dd4], edi
mov r14, rdi
mov qword [rbp], rax
je 0x1400171b8
lea rdx, [0x14004dd00]
lea rcx, str.c:_system.savlogsWizTime.log
call fcn.14001cb20
movzx ecx, word [0x1400481d4]
mov r15, rax
cmp cx, word [rbp + 0x10]
jne 0x140017187
movzx ecx, word [0x1400481d6]
cmp cx, word [rbp + 0x12]
jne 0x140017187
lea rdx, str.PostUser1_n
mov rcx, rax
call fcn.14001c184
lea rcx, [rbp]
call fcn.14001d75c
lea rcx, [rbp]
call fcn.14001d408
mov rcx, rax
mov r14, rax
call fcn.14001d04c
lea rdx, str.WizMain_entry__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
jmp 0x1400171bf
mov r15, qword [rbp + 0xa0]
lea rdx, [0x140064d80]
mov r8d, 0x200
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [0x140064d80]
mov edx, 0x5c
call fcn.14001ae48
lea rdx, [0x140064d80]
lea rcx, [0x140064d80]
mov r8d, 0x200
mov word [rax + 2], di
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
cmp dword [0x140063dd4], edi
je 0x14001723a
lea rcx, [rbp]
call fcn.14001d75c
lea rcx, [rbp]
call fcn.14001d408
mov rcx, rax
mov r14, rax
call fcn.14001d04c
lea rdx, str.WizLongPath_done__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
mov rcx, rdi
lea r12, [0x140000000]
nop word [rax + rax]
movzx eax, word [rcx + r12 + 0x4ddb8]
lea rcx, [rcx + 2]
mov word [rbp + rcx + 0xace], ax
test ax, ax
jne 0x140017250
or rsi, 0xffffffffffffffff
test rbx, rbx
je 0x140017389
mov rax, rsi
nop word [rax + rax]
inc rax
cmp byte [rbx + rax], dil
jne 0x140017280
test rax, rax
je 0x140017389
mov rdx, rsi
inc rdx
cmp byte [rbx + rdx], dil
jne 0x140017295
inc edx
cmp edx, 0x3fffffff
jle 0x1400172ad
mov rbx, rdi
jmp 0x1400172ee
movsxd rax, edx
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1400172c6
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.14001d860
sub rsp, rcx
mov r8d, edx
lea rcx, [rsp + 0x40]
mov r9d, 3
mov rdx, rbx
call fcn.140004d40
mov rbx, rax
mov edx, 0x5c
mov rcx, rbx
call fcn.14001ae48
test rax, rax
je 0x140017363
add rax, 2
lea r8, [rbp + 0xad0]
sub r8, rax
mov rdx, rax
nop word [rax + rax]
movzx ecx, word [rdx]
lea rdx, [rdx + 2]
mov word [r8 + rdx - 2], cx
test cx, cx
jne 0x140017320
mov word [rax], di
lea rdi, [0x140065180]
mov rcx, rdi
sub rcx, rbx
nop word [rax + rax]
movzx eax, word [rbx]
lea rbx, [rbx + 2]
mov word [rcx + rbx - 2], ax
test ax, ax
jne 0x140017350
jmp 0x1400173aa
mov rcx, rdi
lea rdi, [0x140065180]
nop dword [rax]
movzx eax, word [rcx + r12 + 0x4dde0]
lea rcx, [rcx + 2]
mov word [rcx + rdi - 2], ax
test ax, ax
jne 0x140017370
jmp 0x1400173aa
mov rcx, rdi
lea rdi, [0x140065180]
movzx eax, word [rcx + r12 + 0x4dde0]
lea rcx, [rcx + 2]
mov word [rcx + rdi - 2], ax
test ax, ax
jne 0x140017393
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [0x140063dd4], 0
je 0x1400173eb
lea rcx, [rbp]
call fcn.14001d75c
lea rcx, [rbp]
call fcn.14001d408
mov rcx, rax
mov r14, rax
call fcn.14001d04c
lea rdx, str.WizSetCurrentDirectory_done__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
lea rbx, [0x140065580]
lea rdx, str._sLG.ini
mov r8, rdi
mov rcx, rbx
call fcn.14001c9d4
lea r9, [rbp + 0xad0]
lea rdx, str._s_s
lea rcx, [0x140065980]
mov r8, rdi
call fcn.14001c9d4
lea rcx, [0x140065980]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140017449
lea rdx, str._sWizInstaller.ini
lea rcx, [0x140065980]
mov r8, rdi
call fcn.14001c9d4
lea r8, [0x140064d80]
lea rdx, str._sBTBEnv.ini
lea rcx, [0x140065d80]
call fcn.14001c9d4
mov dword [rsp + 0x30], 1
lea r9, [rbp + 0x4d0]
lea r8, [0x1400476d0]
lea rdx, str.DetailLog
lea rcx, str.Default
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x100
call fcn.14000e830
mov dword [rsp + 0x30], 1
lea r9, [rbp + 0x8d0]
lea r8, [0x1400476d0]
lea rdx, str.InstallLog
lea rcx, str.Default
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x100
call fcn.14000e830
cmp dword [0x140063dd4], 0
je 0x140017507
lea rcx, [rbp]
call fcn.14001d75c
lea rcx, [rbp]
call fcn.14001d408
mov rcx, rax
mov r14, rax
call fcn.14001d04c
lea rdx, str.WizGetExpandPrivateProfileString_done__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
lea rcx, [rbp + 0x4d0]
mov rax, rsi
inc rax
cmp word [rcx + rax*2], 0
jne 0x140017511
xor ebx, ebx
test rax, rax
je 0x1400175db
mov ecx, ebx
nop dword [rax + rax]
movzx eax, word [rbp + rcx + 0x4d0]
lea rcx, [rcx + 2]
mov word [rbp + rcx + 0x6ce], ax
test ax, ax
jne 0x140017530
mov edi, 0x5c
lea rcx, [rbp + 0x6d0]
mov edx, edi
call fcn.14001ae48
test rax, rax
je 0x140017564
mov word [rax], bx
lea rdx, [0x140047570]
lea rcx, [rbp + 0x6d0]
call fcn.14001b0f4
test rax, rax
je 0x1400175ba
nop dword [rax]
lea rcx, [rbp + 0x6d0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400175a1
lea rcx, [rbp + 0x6d0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rdx, [0x140047570]
xor ecx, ecx
call fcn.14001b0f4
test rax, rax
je 0x1400175ba
mov word [rax - 2], di
jmp 0x140017580
call fcn.14001bfec
lea rdx, [0x14004df24]
lea rcx, [rbp + 0x4d0]
lea r8, [rax + 0x30]
call fcn.14001cc60
mov r12, rax
jmp 0x1400175e2
mov r12, qword [rbp + 0xa0]
cmp dword [0x140063dd4], 0
je 0x14001761a
lea rcx, [rbp]
call fcn.14001d75c
lea rcx, [rbp]
call fcn.14001d408
mov rcx, rax
mov r14, rax
call fcn.14001d04c
lea rdx, str.Wiz_about_to_re_read_sys_vars__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
call fcn.14000ef60
cmp dword [0x140063dd4], 0
je 0x140017657
lea rcx, [rbp]
call fcn.14001d75c
lea rcx, [rbp]
call fcn.14001d408
mov rcx, rax
mov r14, rax
call fcn.14001d04c
lea rdx, str.Wiz_about_to_capture_BIOS_info__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
call fcn.14000ff60
cmp dword [0x140063dd4], 0
je 0x140017694
lea rcx, [rbp]
call fcn.14001d75c
lea rcx, [rbp]
call fcn.14001d408
mov rcx, rax
mov r14, rax
call fcn.14001d04c
lea rdx, str.Wiz_about_to_Set_Environment_Variables__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
call fcn.140012860
lea rcx, [rbp + 0xd4]
xor edx, edx
mov r8d, 0xfc
mov dword [rbp + 0xd0], ebx
call fcn.14001a650
lea rcx, [rbp + 0x1d4]
xor edx, edx
mov r8d, 0xfc
mov dword [rbp + 0x1d0], ebx
call fcn.14001a650
xor eax, eax
lea rcx, [rbp + 0x90]
mov qword [rbp + 0x90], rax
mov qword [rbp + 0x98], rax
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
xor r9d, r9d
lea rax, [rbp + 0xd0]
lea r8, [rbp + 0x90]
lea edx, [r9 + 2]
mov ecx, 0x400
mov dword [rsp + 0x28], 0xff
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetDateFormatW]
lea rax, [rbp + 0x1d0]
lea r8, [rbp + 0x90]
xor r9d, r9d
xor edx, edx
mov ecx, 0x400
mov dword [rsp + 0x28], 0xff
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetTimeFormatW]
cmp dword [0x140063dd4], 0
je 0x14001777a
lea rcx, [rbp]
call fcn.14001d75c
lea rcx, [rbp]
call fcn.14001d408
mov rcx, rax
mov r14, rax
call fcn.14001d04c
lea rdx, str.Wiz_about_to_Get_Info_from_CVA__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
call fcn.14000e950
mov rcx, rsi
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140017782
test rcx, rcx
lea rdx, [0x140065980]
lea rcx, [0x140063df0]
je 0x1400177c8
mov qword [rsp + 0x28], rcx
lea rcx, [rbp + 0x1d0]
lea r9, [rbp + 0xd0]
mov qword [rsp + 0x20], rcx
lea rcx, str.Executing__s__s_on__s_at__s_for__s_n
mov r8, rax
call fcn.14000b8c0
jmp 0x1400177e7
mov qword [rsp + 0x20], rcx
lea r9, [rbp + 0x1d0]
lea r8, [rbp + 0xd0]
lea rcx, str.Executing_on__s_on__s_at__s_for__s_n
call fcn.14000b8c0
cmp dword [0x140063dd0], 0
je 0x140017818
lea rax, [0x140049c08]
lea r8, str.cmd.exe
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 5
mov qword [rsp + 0x20], rax
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
call fcn.14000c320
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
call qword [sym.imp.ole32.dll_CoUninitialize]
lea rax, [rbp + 0x8d0]
mov rcx, rsi
nop dword [rax]
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140017840
test rcx, rcx
je 0x140017927
xor eax, eax
mov ecx, eax
nop word [rax + rax]
movzx eax, word [rbp + rcx + 0x8d0]
lea rcx, [rcx + 2]
mov word [rbp + rcx + 0x2ce], ax
test ax, ax
jne 0x140017860
lea rcx, [rbp + 0x2d0]
mov edx, 0x5c
call fcn.14001ae48
test rax, rax
je 0x140017894
xor ecx, ecx
mov word [rax], cx
lea rdx, [0x140047570]
lea rcx, [rbp + 0x2d0]
call fcn.14001b0f4
test rax, rax
je 0x1400178f1
mov r13d, 0x5c
lea rcx, [rbp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400178d3
lea rcx, [rbp + 0x2d0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rdx, [0x140047570]
xor ecx, ecx
call fcn.14001b0f4
test rax, rax
je 0x1400178ed
mov word [rax - 2], r13w
jmp 0x1400178b2
mov r13d, dword [rbp + 8]
mov ecx, dword [0x1400667b8]
lea rdx, [rbp + 0xb0]
mov r8d, 0xa
call fcn.14001bab4
lea r9, [rbp + 0x8d0]
lea rdx, str.ResultCode
lea rcx, str.ResponseResult
mov r8, rax
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
call fcn.1400143b0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rdx, [0x140064960]
sub eax, edi
sub edi, ebx
sub ebx, r13d
lea rcx, str._nWizinstaller_Instance_ID_t_:__s_nInit_t_:__u_nAction_t_:__u_nUninit_t_:__u_n
mov r8d, ebx
mov r9d, edi
mov dword [rsp + 0x20], eax
call fcn.14000b8c0
lea rax, [rbp + 0x4d0]
nop dword [rax]
inc rsi
cmp word [rax + rsi*2], 0
jne 0x140017960
test rsi, rsi
je 0x140017977
mov rcx, r12
call fcn.14001ce14
cmp dword [0x140063dd4], 0
je 0x1400179a2
mov rcx, r14
call fcn.14001d04c
lea rdx, str.WizMain_exit__hs
mov rcx, r15
mov r8, rax
call fcn.14001c184
mov rcx, r15
call fcn.14001ce14
xor eax, eax
mov rcx, qword [rbp + 0xcd0]
xor rcx, rbp
call fcn.14001a120
mov rbx, qword [rbp + 0xd10]
mov rsi, qword [rbp + 0xd18]
mov rdi, qword [rbp + 0xd28]
lea rsp, [rbp + 0xce0]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret