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 qword [rsp + 0x40], rdx
mov rax, qword [0x140055018]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x4c], ecx
lea rcx, str.PATH
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x1400010d4
mov esi, eax
mov ecx, eax
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
mov ebx, esi
add ebx, 0xffffffff
lea rcx, str.PATH
mov rdx, rax
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp ebx, eax
jne 0x1400010c6
mov rcx, rdi
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400010c6
mov ebx, eax
mov ecx, eax
add rcx, rcx
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rsi, rax
mov rcx, rdi
mov rdx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400010b8
lea rcx, str.PATH
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test rsi, rsi
je 0x1400010c6
mov rcx, rsi
call qword [sym.imp.mozglue.dll_free]
test rdi, rdi
je 0x1400010d4
mov rcx, rdi
call qword [sym.imp.mozglue.dll_free]
lea rcx, [0x14004dfbe]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea r9, str.Mozilla
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x4c]
mov r8, qword [rsp + 0x40]
call fcn.140003ea0
cmp byte [rsp + 0x54], 0
jne 0x14000129a
movsxd rax, dword [rsp + 0x4c]
add rax, 1
mov ecx, 8
mul rcx
jo 0x1400012bb
mov rcx, rax
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov ebp, 0x7f
test rax, rax
je 0x14000126e
mov r12, rax
mov eax, dword [rsp + 0x4c]
test eax, eax
jle 0x1400011cd
xor ebx, ebx
mov r13, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov r14, qword [sym.imp.mozglue.dll_moz_xmalloc]
xorps xmm6, xmm6
mov r15, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
nop
mov rax, qword [rsp + 0x40]
mov rdi, qword [rax + rbx*8]
mov rcx, rdi
call r13
mov rbp, rax
lea rcx, [rax + rax*2]
add rcx, 2
call r14
test rax, rax
je 0x1400012a5
mov rsi, rax
lea rax, [rbp*2]
add rax, rbp
add eax, 1
movups xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x20], rsi
mov dword [rsp + 0x28], eax
mov ecx, 0xfde9
xor edx, edx
mov r8, rdi
mov r9d, ebp
call r15
cdqe
mov byte [rsi + rax], 0
mov qword [r12 + rbx*8], rsi
add rbx, 1
movsxd rax, dword [rsp + 0x4c]
cmp rbx, rax
jl 0x140001160
cdqe
mov qword [r12 + rax*8], 0
add eax, 1
cdqe
mov ecx, 8
mul rcx
jo 0x1400012c7
mov rcx, rax
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov r8d, dword [rsp + 0x4c]
test rax, rax
je 0x1400012d3
mov rsi, rax
test r8d, r8d
jle 0x140001218
shl r8, 3
mov rcx, rsi
mov rdx, r12
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 + 0x4c]
mov rdx, r12
call fcn.140001310
mov ebp, eax
mov rcx, r12
call qword [sym.imp.mozglue.dll_free]
movsxd rdi, dword [rsp + 0x4c]
test rdi, rdi
je 0x140001265
mov rbx, qword [sym.imp.mozglue.dll_free]
nop dword [rax]
mov rcx, qword [rsi + rdi*8 - 8]
add rdi, 0xffffffffffffffff
test rcx, rcx
je 0x140001260
call rbx
test rdi, rdi
jne 0x140001250
mov rcx, rsi
call qword [sym.imp.mozglue.dll_free]
cmp byte [rsp + 0x54], 0
jne 0x14000129e
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400477a0
mov eax, ebp
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 ebp, dword [rsp + 0x50]
mov byte [rsp + 0x54], 0
jmp 0x140001275
mov qword [r12 + rbx*8], 0
mov ebp, 0x7f
cmp byte [rsp + 0x54], 0
je 0x140001275
jmp 0x14000129e
mov rax, 0xffffffffffffffff
jmp 0x14000111e
mov rax, 0xffffffffffffffff
jmp 0x1400011ea
test r8d, r8d
je 0x1400012fb
movsxd rsi, r8d
mov rdi, qword [sym.imp.mozglue.dll_free]
jmp 0x1400012e9
test rsi, rsi
je 0x1400012fb
mov rcx, qword [r12 + rsi*8 - 8]
add rsi, 0xffffffffffffffff
test rcx, rcx
je 0x1400012e4
call rdi
jmp 0x1400012e4
mov rcx, r12
call qword [sym.imp.mozglue.dll_free]
jmp 0x1400012ad