Function at 0x140001500
Capabilities:
Get common file path
Get system information on windows
Query environment variable
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x2b8
movaps xmmword [rsp + 0x2a0], xmm6
mov rsi, rdx
mov r14d, ecx
mov r15, qword [0x1400e00c0]
mov rax, qword [r15]
xor rax, rsp
mov qword [rsp + 0x298], rax
lea rcx, [rsp + 0x8c]
mov r8d, 0x110
xor edx, edx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
ror byte [0x15cb85d4e], cl
add dword [rax], eax
add byte [rsi], al
add byte [rax], al
add byte [rax - 0x77], cl
test byte [rax + rax*4], ah
add byte [rax], al
add bh, al
test byte [rax + rcx*4], ah
add byte [rax], al
add byte [rdx], al
add byte [rax], al
add byte [rax - 0x75], cl
cmp eax, 0x10f131
xor ecx, ecx
mov edx, 2
mov r8b, 3
call rdi
mov rcx, rax
mov edx, 1
mov r8b, 3
call rdi
mov rcx, rax
mov edx, 0x20
mov r8b, 3
call rdi
lea rcx, [rsp + 0x80]
mov edx, 0x23
mov r8, rax
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
jne 0x14000163d
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp word [rsp + 0x50], 0
jne 0x14000163d
lea rcx, [rsp + 0x80]
mov edx, 0x105
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
add byte [rbp - 0x67e00b8], cl
stc
add byte [rax], al
add byte [rdi + 0x22], dh
mov edi, eax
cmp word [rsp + rdi*2 + 0x7e], 0x5c
je 0x140001608
cmp edi, 0xf9
ja 0x140001606
mov word [rsp + rdi*2 + 0x80], 0x5c
add rdi, 1
jmp 0x140001608
xor edi, edi
lea rcx, [rsp + rdi*2]
add rcx, 0x80
lea rdx, [0x1400e0098]
mov r8d, 0xa
call sub.api_ms_win_crt_string_l1_1_0.dll_wcsncpy
mov word [rsp + rdi*2 + 0x94], 0
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rcx, str.PATH
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1400016e4
mov ebx, eax
mov ecx, eax
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rbp, rax
mov edi, ebx
add edi, 0xffffffff
lea rcx, str.PATH
mov rdx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp edi, eax
jne 0x1400016dc
mov rcx, rbp
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
lea eax, [rbx - 1]
cmp eax, 0x7ffe
ja 0x1400016dc
mov rdi, rsi
mov ecx, ebx
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rsi, rax
mov rcx, rbp
mov rdx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400016d1
lea rcx, str.PATH
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rsi
call sub.mozglue.dll_free
mov rsi, rdi
mov rcx, rbp
call sub.mozglue.dll_free
lea rcx, [0x1400e00ae]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea eax, [r14 + 1]
cdqe
mov ecx, 8
mul rcx
mov rdi, 0xffffffffffffffff
cmovno rdi, rax
mov rcx, rdi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r13, rax
test r14d, r14d
jle 0x1400017de
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], r14
mov r12d, r14d
xor r14d, r14d
xorps xmm6, xmm6
nop word cs:[rax + rax]
nop dword [rax]
mov rdi, qword [rsi + r14*8]
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
mov rbx, rax
lea r15, [rax + rax*2]
lea rcx, [rax + rax*2]
add rcx, 2
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rbp, rax
add r15d, 1
movups xmmword [rsp + 0x30], xmm6
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
xor edx, edx
mov r8, rdi
mov r9d, ebx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
adc byte [rax], al
cdqe
mov byte [rbp + rax], 0
mov qword [r13 + r14*8], rbp
add r14, 1
cmp r12, r14
jne 0x140001740
mov r14, qword [rsp + 0x48]
movsxd rbx, r14d
mov qword [r13 + rbx*8], 0
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
test r14d, r14d
mov r15, qword [0x1400e00c0]
jle 0x1400017f6
shl r12, 3
mov rcx, rdi
mov rdx, r13
mov r8, r12
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
jmp 0x1400017f6
movsxd rbx, r14d
mov qword [r13 + rbx*8], 0
mov rcx, rdi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
mov ecx, r14d
mov rdx, r13
call fcn.140001870
mov esi, eax
mov rcx, r13
call sub.mozglue.dll_free
test r14d, r14d
jne 0x140001854
mov rcx, rdi
call sub.mozglue.dll_free
mov rax, qword [rsp + 0x298]
xor rax, rsp
mov rcx, qword [r15]
cmp rcx, rax
jne 0x140001869
mov eax, esi
movaps xmm6, xmmword [rsp + 0x2a0]
add rsp, 0x2b8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test ebx, ebx
je 0x140001810
mov rcx, qword [rdi + rbx*8 - 8]
add rbx, 0xffffffffffffffff
test rcx, rcx
je 0x140001850
call sub.mozglue.dll_free
jmp 0x140001850
call fcn.14005fbe0
int3