Function at 0x140018f90
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, 0x2c8
movaps xmmword [rsp + 0x2b0], xmm6
mov rdi, rdx
mov r12d, ecx
mov rax, qword [0x140044028]
xor rax, rsp
mov qword [rsp + 0x2a8], rax
lea rbx, [rsp + 0x9c]
mov r8d, 0x110
mov rcx, rbx
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov dword [rbx - 0xc], 0x11c
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
movabs rcx, 0x200000006
mov qword [rbx - 8], rcx
mov word [rbx + 0x108], 0
lea rcx, [rsp + 0x90]
mov edx, 0x23
mov r8, rax
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
jne 0x1400190e5
lea rbx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp word [rbx], 0
jne 0x1400190e5
mov eax, dword [0x140044218]
mov ecx, dword [0x1400441a8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jle 0x1400190c2
lea rcx, [0x140044218]
call fcn.14001bb50
cmp dword [0x140044218], 0xffffffff
jne 0x1400190c2
lea rcx, str.kernel32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.SetDefaultDllDirectories
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140044210], rax
lea rcx, [0x140044218]
call fcn.14001baf0
cmp qword [0x140044210], 0
je 0x140019433
lea rcx, str.user32.dll
xor edx, edx
mov r8d, 0x800
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
lea rcx, str.PATH
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x14001918a
mov ebp, eax
mov ecx, eax
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rbx, rax
mov esi, ebp
dec esi
lea rcx, str.PATH
mov rdx, rax
mov r8d, ebp
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, eax
jne 0x140019181
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov r15d, eax
lea eax, [r15 - 1]
cmp eax, 0x7ffe
ja 0x140019181
mov ecx, r15d
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r14, rax
mov rcx, rbx
mov rdx, rax
mov r8d, r15d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140019178
lea rcx, str.PATH
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, r14
call qword [sym.imp.mozglue.dll_free]
mov rcx, rbx
call qword [sym.imp.mozglue.dll_free]
lea rcx, [0x14003dd12]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea eax, [r12 + 1]
shl rax, 3
cmp r12d, 0xffffffff
mov rsi, 0xffffffffffffffff
cmovge rsi, rax
mov rcx, rsi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r15, rax
movsxd rbx, r12d
test r12d, r12d
jle 0x140019277
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], r12
mov esi, r12d
xor ebp, ebp
xorps xmm6, xmm6
mov rbx, r15
mov r15, qword [rdi + rbp*8]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov r12, rax
lea r14, [rax + rax*2]
lea rcx, [rax + rax*2]
add rcx, 2
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r13, rax
inc r14d
movups xmmword [rsp + 0x30], xmm6
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
xor edx, edx
mov r8, r15
mov r15, rbx
mov r9d, r12d
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cdqe
mov byte [r13 + rax], 0
mov qword [rbx + rbp*8], r13
inc rbp
cmp rsi, rbp
jne 0x1400191de
mov qword [r15 + rsi*8], 0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
lea r8, [rsi*8]
mov rcx, rax
mov rdx, r15
call sub.VCRUNTIME140.dll_memcpy
mov r12, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
jmp 0x14001928e
mov qword [r15 + rbx*8], 0
mov rcx, rsi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
mov rsi, rbx
lea r14, [rsp + 0x90]
mov qword [r14], 0
mov rcx, r14
call sub.xul.dll_XRE_GetBootstrap
mov r14, qword [r14]
mov rcx, qword [r15 + rbx*8 - 8]
call qword [sym.imp.mozglue.dll_void___cdecl_mozilla::SetGeckoProcessType_char_const____ptr64_]
call qword [sym.imp.mozglue.dll_void___cdecl_CrashReporter::RegisterRuntimeExceptionModule_void_]
mov rax, qword [sym.imp.mozglue.dll_enum_GeckoProcessType_mozilla::startup::sChildProcessType]
mov eax, dword [rax]
add eax, 0xfffffffc
mov ecx, 1
cmp eax, 7
ja 0x1400192db
cdqe
lea rcx, [0x14003b158]
mov ecx, dword [rcx + rax*4]
call qword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
test r12d, r12d
jle 0x1400193e7
xorps xmm0, xmm0
movaps xmmword [rsp + 0x90], xmm0
mov qword [rsp + 0xa0], 0
cmp qword [sym.plugin_container.exe_g_shared_section], 0
jne 0x1400193f1
lea ebp, [r12 - 1]
mov eax, ebp
mov rdx, qword [r15 + rax*8]
mov rax, qword [r14]
mov rax, qword [rax + 0x50]
mov rcx, r14
call qword [0x14004a010]
mov rax, qword [r14]
mov rax, qword [rax + 0x48]
mov rcx, r14
call qword [0x14004a010]
cmp eax, 9
je 0x140019417
mov rax, qword [r14]
mov rax, qword [rax + 0x58]
lea r9, [rsp + 0x90]
mov rcx, r14
mov edx, ebp
mov r8, r15
call qword [0x14004a010]
mov ebp, eax
shr ebp, 0x1f
call qword [sym.imp.mozglue.dll_void___cdecl_CrashReporter::UnregisterRuntimeExceptionModule_void_]
test r14, r14
je 0x140019380
mov rax, qword [r14]
mov rax, qword [rax + 8]
mov rcx, r14
call qword [0x14004a010]
mov rcx, r15
call qword [sym.imp.mozglue.dll_free]
test r12d, r12d
je 0x1400193b0
dec rsi
mov rbx, qword [sym.imp.mozglue.dll_free]
mov rcx, qword [rdi + rsi*8]
test rcx, rcx
je 0x1400193a3
call rbx
mov rax, rsi
dec rax
test esi, esi
mov rsi, rax
jne 0x140019398
mov rcx, rdi
call qword [sym.imp.mozglue.dll_free]
mov rcx, qword [rsp + 0x2a8]
xor rcx, rsp
call fcn.14001cdf0
mov eax, ebp
movaps xmm6, xmmword [rsp + 0x2b0]
add rsp, 0x2c8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ebp, 3
jmp 0x140019365
call fcn.140038f70
mov qword [rsp + 0x90], rax
test rax, rax
je 0x140019429
lea rax, [0x1400211b0]
mov qword [rsp + 0x98], rax
jmp 0x14001930f
call fcn.14001f250
mov qword [rsp + 0xa0], rax
jmp 0x140019343
mov ebp, 1
jmp 0x140019365
lea rcx, [rsp + 0x90]
mov edx, 0x105
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [rax - 1]
cmp ecx, 0xf9
ja 0x140019474
mov eax, eax
cmp word [rsp + rax*2 + 0x8e], 0x5c
je 0x140019476
cmp eax, 0xf9
ja 0x140019474
mov word [rsp + rax*2 + 0x90], 0x5c
inc rax
jmp 0x140019476
xor eax, eax
lea rbx, [rsp + rax*2]
add rbx, 0x90
lea rdx, str.user32.dll
mov r8d, 0xa
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [rbx + 0x14], 0
lea rcx, [rsp + 0x90]
xor edx, edx
mov r8d, 8
jmp 0x1400190df