Function at 0x140019230
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 r15, rdx
mov r14d, ecx
mov rax, qword [0x140043010]
xor rax, rsp
mov qword [rsp + 0x2a8], rax
lea rsi, [rsp + 0x9c]
mov r8d, 0x110
mov rcx, rsi
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov dword [rsi - 0xc], 0x11c
mov rdi, qword [sym.imp.ntdll.dll_VerSetConditionMask]
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
movabs rcx, 0x200000006
mov qword [rsi - 8], rcx
mov word [rsi + 0x108], 0
lea rcx, [rsp + 0x90]
mov edx, 0x23
mov r8, rax
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
jne 0x140019385
lea rsi, [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp word [rsi], 0
jne 0x140019385
mov eax, dword [0x140043208]
mov ecx, dword [0x1400431a8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jle 0x140019362
lea rcx, [0x140043208]
call fcn.14001c1e0
cmp dword [0x140043208], 0xffffffff
jne 0x140019362
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 [0x140043200], rax
lea rcx, [0x140043208]
call fcn.14001c180
cmp qword [0x140043200], 0
je 0x1400196d4
lea rcx, str.user32.dll
xor edx, edx
mov r8d, 0x800
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
lea rcx, [0x14003cb30]
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140019427
mov ebx, eax
mov ecx, eax
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rsi, rax
mov edi, ebx
dec edi
lea rcx, [0x14003cb30]
mov rdx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp edi, eax
jne 0x14001941e
mov rcx, rsi
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebp, eax
lea eax, [rbp - 1]
cmp eax, 0x7ffe
ja 0x14001941e
mov ecx, ebp
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rbx, rax
mov rcx, rsi
mov rdx, rax
mov r8d, ebp
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140019415
lea rcx, [0x14003cb30]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
call qword [sym.imp.mozglue.dll_free]
mov rcx, rsi
call qword [sym.imp.mozglue.dll_free]
lea rcx, [0x14003ccb6]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea eax, [r14 + 1]
cdqe
mov ecx, 8
mul rcx
mov rsi, 0xffffffffffffffff
cmovno rsi, rax
mov rcx, rsi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r13, rax
movsxd rbp, r14d
test r14d, r14d
jle 0x140019516
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], r14
mov ebx, r14d
xor r14d, r14d
xorps xmm6, xmm6
mov rbp, qword [r15 + r14*8]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov rsi, rax
mov r12, r15
lea r15, [rax + rax*2]
lea rcx, [rax + rax*2]
add rcx, 2
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
inc r15d
movups xmmword [rsp + 0x30], xmm6
mov dword [rsp + 0x28], r15d
mov r15, r12
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
xor edx, edx
mov r8, rbp
mov r9d, esi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cdqe
mov byte [rdi + rax], 0
mov qword [r13 + r14*8], rdi
inc r14
cmp rbx, r14
jne 0x14001947d
mov qword [r13 + rbx*8], 0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
lea r8, [rbx*8]
mov rcx, rax
mov rdx, r13
call sub.VCRUNTIME140.dll_memcpy
mov r14, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x50]
jmp 0x14001952e
mov qword [r13 + rbp*8], 0
mov rcx, rsi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
mov rbx, rbp
lea rsi, [rsp + 0x90]
mov qword [rsi], 0
mov rcx, rsi
call sub.xul.dll_XRE_GetBootstrap
mov rsi, qword [rsi]
mov rcx, qword [r13 + rbp*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]
xor ecx, ecx
cmp eax, 8
sete cl
cmp eax, 0xb
lea eax, [rcx*8 + 1]
mov ecx, 5
cmovne ecx, eax
call qword [sym.imp.mozglue.dll_void___cdecl_DllBlocklist_Initialize_unsigned_int_]
test r14d, r14d
jle 0x140019688
xorps xmm0, xmm0
movaps xmmword [rsp + 0x90], xmm0
mov qword [rsp + 0xa0], 0
cmp qword [sym.plugin_container.exe_g_shared_section], 0
jne 0x140019692
lea ebp, [r14 - 1]
mov eax, ebp
mov rdx, qword [r13 + rax*8]
mov rax, qword [rsi]
mov rax, qword [rax + 0x50]
mov rcx, rsi
call qword [case.0x14001ca4e.0]
mov rax, qword [rsi]
mov rax, qword [rax + 0x48]
mov rcx, rsi
call qword [case.0x14001ca4e.0]
cmp eax, 9
je 0x1400196b8
mov rax, qword [rsi]
mov rax, qword [rax + 0x58]
lea r9, [rsp + 0x90]
mov rcx, rsi
mov edx, ebp
mov r8, r13
call qword [case.0x14001ca4e.0]
mov ebp, eax
shr ebp, 0x1f
call qword [sym.imp.mozglue.dll_void___cdecl_CrashReporter::UnregisterRuntimeExceptionModule_void_]
test rsi, rsi
je 0x140019621
mov rax, qword [rsi]
mov rax, qword [rax + 8]
mov rcx, rsi
call qword [case.0x14001ca4e.0]
mov rcx, r13
call qword [sym.imp.mozglue.dll_free]
test r14d, r14d
je 0x140019651
dec rbx
mov rsi, qword [sym.imp.mozglue.dll_free]
mov rcx, qword [rdi + rbx*8]
test rcx, rcx
je 0x140019644
call rsi
mov rax, rbx
dec rax
test ebx, ebx
mov rbx, rax
jne 0x140019639
mov rcx, rdi
call qword [sym.imp.mozglue.dll_free]
mov rcx, qword [rsp + 0x2a8]
xor rcx, rsp
call fcn.14001d580
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 0x140019606
call fcn.140038680
mov qword [rsp + 0x90], rax
test rax, rax
je 0x1400196ca
lea rax, [0x140021230]
mov qword [rsp + 0x98], rax
jmp 0x1400195b0
call fcn.14001f860
mov qword [rsp + 0xa0], rax
jmp 0x1400195e4
mov ebp, 1
jmp 0x140019606
lea rcx, [rsp + 0x90]
mov edx, 0x105
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [rax - 1]
cmp ecx, 0xf9
ja 0x140019715
mov eax, eax
cmp word [rsp + rax*2 + 0x8e], 0x5c
je 0x140019717
cmp eax, 0xf9
ja 0x140019715
mov word [rsp + rax*2 + 0x90], 0x5c
inc rax
jmp 0x140019717
xor eax, eax
lea rsi, [rsp + rax*2]
add rsi, 0x90
lea rdx, str.user32.dll
mov r8d, 0xa
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [rsi + 0x14], 0
lea rcx, [rsp + 0x90]
xor edx, edx
mov r8d, 8
jmp 0x14001937f