Function at 0x140018c24
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov dword [rsp + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor ebp, ebp
mov edi, edx
mov r13, rcx
cmp rcx, rbp
mov dword [rsp + 0x70], ebp
jne 0x140018c70
call fcn.140013f24
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rbp
mov dword [rax], 0x16
call fcn.14001345c
jmp 0x140018d4e
mov r12, qword [rcx]
cmp r12, rbp
je 0x140018d43
mov edx, 0x3d
mov rcx, r12
call fcn.140015970
cmp rax, rbp
mov r15, rax
je 0x140018d43
cmp r12, rax
je 0x140018d43
cmp byte [rax + 1], bpl
mov rbx, qword [0x14001f128]
mov r14d, ebp
sete r14b
cmp rbx, qword [0x14001f130]
jne 0x140018d24
cmp rbx, rbp
mov rsi, rbx
mov eax, ebp
jne 0x140018ccf
mov rbx, rbp
jmp 0x140018d1d
add rbx, 8
add eax, 1
cmp qword [rbx], rbp
jne 0x140018cc8
add eax, 1
mov edx, 8
movsxd rcx, eax
call fcn.140015838
cmp rax, rbp
mov rdi, rax
mov rbx, rax
jne 0x140018d0e
mov ecx, 9
call fcn.1400137a4
jmp 0x140018d0e
mov rcx, rax
call fcn.140019cf0
mov qword [rdi], rax
add rdi, 8
add rsi, 8
mov rax, qword [rsi]
cmp rax, rbp
jne 0x140018cfb
mov qword [rdi], rbp
mov edi, dword [rsp + 0x78]
mov qword [0x14001f128], rbx
cmp rbx, rbp
jne 0x140018db4
cmp edi, ebp
je 0x140018d69
cmp qword [0x14001f138], rbp
je 0x140018d69
call fcn.140016bb4
cmp eax, ebp
je 0x140018dad
call fcn.140013f24
mov dword [rax], 0x16
or eax, 0xffffffff
mov rbx, qword [rsp + 0x80]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp r14d, ebp
je 0x140018d72
xor eax, eax
jmp 0x140018d51
mov ecx, 8
call fcn.1400178ac
cmp rax, rbp
mov qword [0x14001f128], rax
je 0x140018d4e
mov qword [rax], rbp
cmp qword [0x14001f138], rbp
jne 0x140018dad
mov ecx, 8
call fcn.1400178ac
cmp rax, rbp
mov qword [0x14001f138], rax
je 0x140018d4e
mov qword [rax], rbp
mov rbx, qword [0x14001f128]
test rbx, rbx
mov rbp, rbx
je 0x140018d4e
mov rcx, qword [rbx]
mov eax, r15d
mov rdi, rbx
sub eax, r12d
test rcx, rcx
movsxd rsi, eax
je 0x140018e0c
mov rdx, rcx
mov r8, rsi
mov rcx, r12
call fcn.140016bac
test eax, eax
jne 0x140018df9
mov rax, qword [rdi]
cmp byte [rsi + rax], 0x3d
je 0x140018ebb
cmp byte [rsi + rax], 0
je 0x140018ebb
add rdi, 8
mov rcx, qword [rdi]
test rcx, rcx
jne 0x140018dd0
mov rbx, qword [0x14001f128]
sub rdi, rbx
sar rdi, 3
neg edi
xor esi, esi
cmp edi, esi
jl 0x140018edb
cmp qword [rbp], rsi
je 0x140018edb
movsxd rsi, edi
mov rcx, qword [rbp + rsi*8]
cmp rcx, qword [0x14001f130]
jb 0x140018e43
cmp rcx, qword [0x140020108]
jbe 0x140018e4f
call fcn.140013474
mov rbx, qword [0x14001f128]
test r14d, r14d
je 0x140018ece
cmp qword [rbp + rsi*8], 0
je 0x140018e83
lea rcx, [rbp + rsi*8 + 8]
mov rax, qword [rcx]
add edi, 1
add rcx, 8
mov qword [rbp + rsi*8], rax
add rsi, 1
cmp qword [rbp + rsi*8], 0
jne 0x140018e61
mov rbx, qword [0x14001f128]
movsxd rdx, edi
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x140018f36
mov r8d, 8
mov rcx, rbx
call fcn.1400186e8
xor esi, esi
cmp rax, rsi
je 0x140018f38
mov qword [0x14001f128], rax
jmp 0x140018f38
mov rbx, qword [0x14001f128]
sub rdi, rbx
sar rdi, 3
jmp 0x140018e15
mov qword [rbp + rsi*8], r12
xor esi, esi
mov qword [r13], rsi
jmp 0x140018f38
cmp r14d, esi
jne 0x140018ff3
cmp edi, esi
jge 0x140018eea
neg edi
lea eax, [rdi + 2]
cmp eax, edi
jl 0x140018d4e
movsxd r8, eax
movabs rax, 0x1fffffffffffffff
cmp r8, rax
jae 0x140018d4e
mov edx, 8
mov rcx, rbx
call fcn.1400186e8
cmp rax, rsi
je 0x140018d4e
movsxd rcx, edi
mov qword [rax + rcx*8], r12
mov qword [rax + rcx*8 + 8], rsi
mov qword [r13], rsi
jmp 0x140018eb2
xor esi, esi
cmp dword [rsp + 0x78], esi
je 0x140018fdd
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r12
repne scasb al, byte [rdi]
lea ebp, [rax + 1]
not rcx
mov rdx, rbp
sub rcx, rbp
add rcx, 2
call fcn.140015838
cmp rax, rsi
mov rbx, rax
je 0x140018fdd
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r12
repne scasb al, byte [rdi]
mov r8, r12
not rcx
sub rcx, rbp
lea rdx, [rcx + 2]
mov rcx, rbx
call fcn.140016a28
cmp eax, esi
je 0x140018fa2
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rsi
call fcn.1400133b8
mov rdx, rbx
mov rcx, rbx
sub rdx, r12
add rdx, r15
mov byte [rdx], sil
add rdx, rbp
cmp r14d, esi
cmovne rdx, rsi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmp eax, esi
jne 0x140018fd5
or dword [rsp + 0x70], 0xffffffff
call fcn.140013f24
mov dword [rax], 0x2a
mov rcx, rbx
call fcn.140013474
cmp r14d, esi
je 0x140018fea
mov rcx, r12
call fcn.140013474
mov eax, dword [rsp + 0x70]
jmp 0x140018d51
mov rcx, r12
call fcn.140013474
mov qword [r13], rsi
jmp 0x140018d6e