Function at 0x140001230
Capabilities:
Get common file path
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xf0
mov rax, qword [0x140007010]
xor rax, rsp
mov qword [rbp + 0x47], rax
xor r14d, r14d
xorps xmm0, xmm0
movups xmmword [rbp - 0x61], xmm0
mov qword [rbp - 0x51], r14
mov qword [rbp - 0x49], 7
mov word [rbp - 0x61], r14w
mov edx, 0x104
mov r9d, edx
lea rcx, [rbp - 0x61]
call fcn.140002940
lea rdx, [rbp - 0x61]
cmp qword [rbp - 0x49], 8
cmovae rdx, qword [rbp - 0x61]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400012b2
cmp eax, 0x104
jne 0x1400012c8
lea rax, [rbp - 0x61]
cmp qword [rbp - 0x49], 8
cmovae rax, qword [rbp - 0x61]
mov qword [rbp - 0x51], r14
mov word [rax], r14w
lea rcx, [rbp - 0x61]
cmp qword [rbp - 0x49], 8
cmovae rcx, qword [rbp - 0x61]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
jne 0x1400012f6
lea rax, [rbp - 0x61]
cmp qword [rbp - 0x49], 8
cmovae rax, qword [rbp - 0x61]
mov qword [rbp - 0x51], r14
mov word [rax], r14w
xorps xmm0, xmm0
movups xmmword [rbp - 0x21], xmm0
mov qword [rbp - 0x11], r14
mov qword [rbp - 9], 7
mov ecx, 0x210
call fcn.140003134
mov r8, rax
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x11], 0x104
mov qword [rbp - 9], 0x107
movzx eax, r14w
mov rdi, r8
mov ecx, 0x104
rep stosw word [rdi], ax
mov word [r8 + 0x208], r14w
lea rcx, [rbp - 0x21]
cmp qword [rbp - 9], 8
cmovae rcx, qword [rbp - 0x21]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rdx, [rbp - 0x61]
cmp qword [rbp - 0x49], 8
cmovae rdx, qword [rbp - 0x61]
lea rcx, [rbp - 0x41]
call fcn.140002190
nop
mov rcx, qword [rbp - 0x31]
mov rdx, qword [rbp - 0x29]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x1400013a4
lea rax, [rcx + 1]
mov qword [rbp - 0x31], rax
lea rax, [rbp - 0x41]
cmp rdx, 8
cmovae rax, qword [rbp - 0x41]
mov dword [rax + rcx*2], 0x3b
jmp 0x1400013c2
mov qword [rsp + 0x20], 1
lea r9, [0x1400054e0]
mov edx, 1
lea rcx, [rbp - 0x41]
call fcn.140002b10
lea r9, [rbp - 0x21]
cmp qword [rbp - 9], 8
cmovae r9, qword [rbp - 0x21]
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp word [r9 + rbx*2], 0
jne 0x1400013e0
mov rsi, qword [rbp - 0x31]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
sub rax, rsi
cmp rbx, rax
ja 0x14000142e
lea rax, [rsi + rbx]
mov qword [rbp - 0x31], rax
lea rdi, [rbp - 0x41]
cmp rcx, 8
cmovae rdi, qword [rbp - 0x41]
lea rcx, [rdi + rsi*2]
lea r8, [rbx + rbx]
mov rdx, r9
call sub.VCRUNTIME140.dll_memmove
lea rax, [rsi + rbx]
mov word [rdi + rax*2], r14w
jmp 0x14000143f
mov qword [rsp + 0x20], rbx
mov rdx, rbx
lea rcx, [rbp - 0x41]
call fcn.140002b10
mov qword [rbp - 0x69], r14
mov qword [rbp - 1], r14
lea r8, str.BD_EPS_OLD_PATH
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x69]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wdupenv_s]
test eax, eax
jne 0x14000148e
mov rdx, qword [rbp - 0x69]
test rdx, rdx
je 0x14000148e
lea rcx, [rbp + 0x27]
call fcn.140002190
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
movups xmm0, xmmword [rbp + 0x27]
movups xmmword [rbp + 7], xmm0
movups xmm1, xmmword [rbp + 0x37]
movups xmmword [rbp + 0x17], xmm1
jmp 0x14000149e
lea rdx, [0x140005448]
lea rcx, [rbp + 7]
call fcn.140002190
cmp qword [rbp + 0x17], 0
sete dil
mov rdx, qword [rbp + 0x1f]
cmp rdx, 8
jb 0x1400014ea
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 7]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400014e5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400014e5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003100
test dil, dil
je 0x1400015b0
mov qword [rbp - 0x69], r14
mov qword [rbp - 1], r14
lea r8, str.PATH
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x69]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wdupenv_s]
test eax, eax
jne 0x140001542
mov rdx, qword [rbp - 0x69]
test rdx, rdx
je 0x140001542
lea rcx, [rbp + 0x27]
call fcn.140002190
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
movups xmm0, xmmword [rbp + 0x27]
movups xmmword [rbp + 7], xmm0
movups xmm1, xmmword [rbp + 0x37]
movups xmmword [rbp + 0x17], xmm1
jmp 0x140001552
lea rdx, [0x140005448]
lea rcx, [rbp + 7]
call fcn.140002190
lea rdx, [rbp + 7]
cmp qword [rbp + 0x1f], 8
cmovae rdx, qword [rbp + 7]
lea rcx, str.BD_EPS_OLD_PATH
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, qword [rbp + 0x1f]
cmp rdx, 8
jb 0x1400015b0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 7]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400015ab
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400015ab
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003100
lea rdx, [rbp - 0x41]
cmp qword [rbp - 0x29], 8
cmovae rdx, qword [rbp - 0x41]
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
mov rdx, qword [rbp - 0x29]
cmp rdx, 8
jb 0x14000160f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x41]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000160a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000160a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003100
mov qword [rbp - 0x31], r14
mov qword [rbp - 0x29], 7
mov word [rbp - 0x41], r14w
mov rdx, qword [rbp - 9]
cmp rdx, 8
jb 0x140001663
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000165e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000165e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003100
mov qword [rbp - 0x11], r14
mov qword [rbp - 9], 7
mov word [rbp - 0x21], r14w
mov rdx, qword [rbp - 0x49]
cmp rdx, 8
jb 0x1400016b7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x61]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400016b2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400016b2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003100
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.1400030e0
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret