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 rbp, rdx
mov r15, qword [0x1400f7448]
mov rax, qword [r15]
xor rax, rsp
mov qword [rsp + 0x298], rax
mov dword [rsp + 0x7c], ecx
lea rcx, [rsp + 0x8c]
mov r8d, 0x110
xor edx, edx
call sub.ntdll.dll_memset
movabs rax, 0x60000011c
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x88], 2
mov rsi, qword [sym.imp.ntdll.dll_VerSetConditionMask]
xor ecx, ecx
mov edx, 2
mov r8b, 3
call rsi
mov rcx, rax
mov edx, 1
mov r8b, 3
call rsi
mov rcx, rax
mov edx, 0x20
mov r8b, 3
call rsi
lea rcx, [rsp + 0x80]
mov edx, 0x23
mov r8, rax
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
jne 0x14000163e
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp word [rsp + 0x48], 0
jne 0x14000163e
lea rcx, [rsp + 0x80]
mov edx, 0x105
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [rax - 1]
cmp ecx, 0xf9
ja 0x140001607
mov esi, eax
cmp word [rsp + rsi*2 + 0x7e], 0x5c
je 0x140001609
cmp esi, 0xf9
ja 0x140001607
mov word [rsp + rsi*2 + 0x80], 0x5c
add rsi, 1
jmp 0x140001609
xor esi, esi
lea rcx, [rsp + rsi*2]
add rcx, 0x80
lea rdx, [0x1400f7098]
mov r8d, 0xa
call sub.api_ms_win_crt_string_l1_1_0.dll_wcsncpy
mov word [rsp + rsi*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 0x1400016df
mov ebx, eax
mov ecx, eax
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
mov esi, ebx
add esi, 0xffffffff
lea rcx, str.PATH
mov rdx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, eax
jne 0x1400016d7
mov rcx, rdi
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
lea eax, [rbx - 1]
cmp eax, 0x7ffe
ja 0x1400016d7
mov ecx, ebx
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r14, rax
mov rcx, rdi
mov rdx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400016cf
lea rcx, str.PATH
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, r14
call sub.mozglue.dll_free
mov rcx, rdi
call sub.mozglue.dll_free
lea rcx, [0x1400f70ae]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea r9, str.Mozilla
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x7c]
mov r8, rbp
call fcn.140005f90
cmp byte [rsp + 0x84], 0
je 0x14000171e
mov ebx, dword [rsp + 0x80]
jmp 0x140001881
movsxd rax, dword [rsp + 0x7c]
add rax, 1
mov edi, 8
mul rdi
mov rsi, 0xffffffffffffffff
cmovo rax, rsi
mov rcx, rax
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r12, rax
mov eax, dword [rsp + 0x7c]
test eax, eax
jle 0x1400017d3
xor r13d, r13d
xorps xmm6, xmm6
mov r14, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
nop
mov rbx, qword [rbp + r13*8]
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
mov rsi, rax
lea r15, [rax + rax*2]
lea rcx, [rax + rax*2]
add rcx, 2
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, 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, rbx
mov r9d, esi
call r14
cdqe
mov byte [rdi + rax], 0
mov qword [r12 + r13*8], rdi
add r13, 1
movsxd rax, dword [rsp + 0x7c]
cmp r13, rax
jl 0x140001760
mov r15, qword [0x1400f7448]
mov rsi, 0xffffffffffffffff
mov edi, 8
cdqe
mov qword [r12 + rax*8], 0
add eax, 1
cdqe
mul rdi
cmovno rsi, rax
mov rcx, rsi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r14, rax
mov ebx, dword [rsp + 0x7c]
test ebx, ebx
jle 0x140001810
lea r8, [rbx*8]
mov rcx, r14
mov rdx, r12
call sub.ntdll.dll_memcpy
lea rcx, [0x1400f7128]
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
mov r8, qword [rax]
mov ecx, ebx
mov rdx, r12
call fcn.1400018c0
mov ebx, eax
mov rcx, r12
call sub.mozglue.dll_free
movsxd rax, dword [rsp + 0x7c]
test rax, rax
je 0x140001879
mov edi, eax
neg edi
lea rbp, [r14 + rax*8]
add rbp, 0xfffffffffffffff8
xor esi, esi
jmp 0x140001868
add rsi, 0xffffffffffffffff
cmp edi, esi
je 0x140001879
mov rcx, qword [rbp + rsi*8]
test rcx, rcx
je 0x140001860
call sub.mozglue.dll_free
jmp 0x140001860
mov rcx, r14
call sub.mozglue.dll_free
mov rax, qword [rsp + 0x298]
xor rax, rsp
mov rcx, qword [r15]
cmp rcx, rax
jne 0x1400018b2
mov eax, ebx
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
call fcn.1400763e0
int3