Function at 0x140001510
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 r14, qword [0x1400f6380]
mov rax, qword [r14]
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 0x1400015d9
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 0x1400015d1
mov rcx, rdi
xor edx, edx
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1400015d1
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 0x1400015c9
lea rcx, str.PATH
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
call sub.mozglue.dll_free
mov rcx, rdi
call sub.mozglue.dll_free
lea rcx, [0x1400f6098]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
lea r9, str.Mozilla
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x4c]
mov r8, r13
call fcn.140005c50
cmp byte [rsp + 0x54], 0
je 0x14000160f
mov ebx, dword [rsp + 0x50]
jmp 0x140001752
movsxd rax, dword [rsp + 0x4c]
add rax, 1
mov ebx, 8
mul rbx
mov rsi, 0xffffffffffffffff
cmovo rax, rsi
mov rcx, rax
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rdi, rax
mov eax, dword [rsp + 0x4c]
test eax, eax
jle 0x1400016c3
xor r12d, r12d
xorps xmm6, xmm6
mov r14, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rbp, qword [r13 + r12*8]
mov rcx, rbp
call sub.api_ms_win_crt_string_l1_1_0.dll_wcslen
mov rbx, rax
lea r15, [rax + rax*2]
lea rcx, [rax + rax*2]
add rcx, 2
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rsi, 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, rbp
mov r9d, ebx
call r14
cdqe
mov byte [rsi + rax], 0
mov qword [rdi + r12*8], rsi
add r12, 1
movsxd rax, dword [rsp + 0x4c]
cmp r12, rax
jl 0x140001650
mov r14, qword [0x1400f6380]
mov rsi, 0xffffffffffffffff
mov ebx, 8
cdqe
mov qword [rdi + rax*8], 0
add eax, 1
cdqe
mul rbx
cmovno rsi, rax
mov rcx, rsi
call qword [sym.imp.mozglue.dll_moz_xmalloc]
mov rsi, rax
mov ebx, dword [rsp + 0x4c]
test ebx, ebx
jle 0x140001700
lea r8, [rbx*8]
mov rcx, rsi
mov rdx, rdi
call sub.ntdll.dll_memcpy
lea rcx, [0x1400f6118]
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, rdi
call fcn.140001780
mov ebx, eax
mov rcx, rdi
call sub.mozglue.dll_free
movsxd rdi, dword [rsp + 0x4c]
nop
test rdi, rdi
je 0x14000174a
mov rcx, qword [rsi + rdi*8 - 8]
add rdi, 0xffffffffffffffff
test rcx, rcx
je 0x140001730
call sub.mozglue.dll_free
jmp 0x140001730
mov rcx, rsi
call sub.mozglue.dll_free
mov rax, qword [rsp + 0x58]
xor rax, rsp
mov rcx, qword [r14]
cmp rcx, rax
jne 0x14000177a
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
call fcn.140072349
int3