Function at 0x140001000
Capabilities:
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, 0x78
movaps xmmword [rsp + 0x60], xmm6
mov r13, rdx
mov rax, qword [0x14005b018]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x54], ecx
lea rcx, [0x140053520]
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1400010c8
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, [0x140053520]
mov rdx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp esi, eax
jne 0x1400010bf
mov rcx, rdi
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400010bf
mov ebp, eax
mov ecx, eax
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rbx, rax
mov rcx, rdi
mov rdx, rax
mov r8d, ebp
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400010b6
lea rcx, [0x140053520]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
call qword [sym.imp.mozglue.dll_free]
mov rcx, rdi
call qword [sym.imp.mozglue.dll_free]
lea rcx, [0x14005370c]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea r9, str.Mozilla
lea rcx, [rsp + 0x48]
lea rdx, [rsp + 0x54]
mov r8, r13
call fcn.1400043e0
cmp byte [rsp + 0x4c], 0
jne 0x140001253
movsxd rax, dword [rsp + 0x54]
add rax, 1
mov ecx, 8
mul rcx
jo 0x140001259
mov rcx, rax
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r15, rax
mov eax, dword [rsp + 0x54]
test eax, eax
jle 0x140001191
xor edi, edi
xorps xmm6, xmm6
mov r14, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rbx, qword [r13 + rdi*8]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov rbp, rax
lea r12, [rax + rax*2]
lea rcx, [rax + rax*2]
add rcx, 2
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rsi, rax
add r12d, 1
movups xmmword [rsp + 0x30], xmm6
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
xor edx, edx
mov r8, rbx
mov r9d, ebp
call r14
cdqe
mov byte [rsi + rax], 0
mov qword [r15 + rdi*8], rsi
add rdi, 1
movsxd rax, dword [rsp + 0x54]
cmp rdi, rax
jl 0x140001130
cdqe
mov qword [r15 + rax*8], 0
add eax, 1
cdqe
mov ecx, 8
mul rcx
jo 0x140001265
mov rcx, rax
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rsi, rax
mov r8d, dword [rsp + 0x54]
test r8d, r8d
jle 0x1400011d3
shl r8, 3
mov rcx, rsi
mov rdx, r15
call sub.ntdll.dll_memcpy
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
mov r8, qword [rax]
mov ecx, dword [rsp + 0x54]
mov rdx, r15
call fcn.140001280
mov ebx, eax
mov rcx, r15
call qword [sym.imp.mozglue.dll_free]
movsxd rdi, dword [rsp + 0x54]
test rdi, rdi
je 0x140001225
mov rbp, qword [sym.imp.mozglue.dll_free]
nop word cs:[rax + rax]
nop
mov rcx, qword [rsi + rdi*8 - 8]
add rdi, 0xffffffffffffffff
test rcx, rcx
je 0x140001220
call rbp
test rdi, rdi
jne 0x140001210
mov rcx, rsi
call qword [sym.imp.mozglue.dll_free]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14004ce20
mov eax, ebx
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ebx, dword [rsp + 0x48]
jmp 0x14000122e
mov rax, 0xffffffffffffffff
jmp 0x140001110
mov rax, 0xffffffffffffffff
jmp 0x1400011ae