Function at 0x18008be80
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor esi, esi
mov ebp, edx
mov r15, rcx
test rcx, rcx
jne 0x18008b9e4
call fcn.18007d01c
mov dword [rax], 0x16
or rax, 0xffffffffffffffff
jmp 0x18008ba75
mov edx, 0x3d
mov rdi, rcx
call fcn.18009286c
mov r12, rax
test rax, rax
je 0x18008ba54
cmp rax, r15
je 0x18008ba54
cmp word [rax + 2], si
mov r14, qword [0x1800e1570]
sete r13b
cmp r14, qword [0x1800e1578]
jne 0x18008ba28
mov rcx, r14
call fcn.18008bd84
mov r14, rax
mov qword [0x1800e1570], rax
mov ebx, 1
test r14, r14
jne 0x18008baf7
mov rax, qword [0x1800e1568]
test ebp, ebp
je 0x18008ba92
test rax, rax
je 0x18008ba92
call fcn.180080d74
test rax, rax
jne 0x18008baeb
call fcn.18007d01c
or rsi, 0xffffffffffffffff
mov dword [rax], 0x16
mov ebp, esi
mov esi, ebp
mov ebp, esi
mov esi, ebp
mov rcx, rdi
call fcn.180083260
mov eax, esi
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
test r13b, r13b
jne 0x18008ba63
test rax, rax
jne 0x18008bad0
lea edx, [rax + 8]
mov rcx, rbx
call fcn.180085988
xor ecx, ecx
mov qword [0x1800e1568], rax
call fcn.180083260
cmp qword [0x1800e1568], rsi
jne 0x18008bac4
or rbp, 0xffffffffffffffff
jmp 0x18008ba65
mov r14, qword [0x1800e1570]
test r14, r14
jne 0x18008baf7
mov edx, 8
mov rcx, rbx
call fcn.180085988
xor ecx, ecx
mov qword [0x1800e1570], rax
call fcn.180083260
mov r14, qword [0x1800e1570]
test r14, r14
je 0x18008babe
sub r12, r15
mov rbx, r14
sar r12, 1
cmp qword [r14], rsi
je 0x18008bb3f
mov rdx, qword [rbx]
mov r8, r12
mov rcx, r15
call fcn.1800856a8
test eax, eax
jne 0x18008bb2d
mov rax, qword [rbx]
mov ecx, 0x3d
cmp word [rax + r12*2], cx
je 0x18008bb36
cmp word [rax + r12*2], si
je 0x18008bb36
add rbx, 8
cmp qword [rbx], rsi
jmp 0x18008bb03
sub rbx, r14
sar rbx, 3
jmp 0x18008bb49
sub rbx, r14
sar rbx, 3
neg rbx
test rbx, rbx
js 0x18008bba5
cmp qword [r14], rsi
je 0x18008bba5
mov rcx, qword [r14 + rbx*8]
call fcn.180083260
test r13b, r13b
jne 0x18008bb76
mov qword [r14 + rbx*8], r15
jmp 0x18008bbff
mov rax, qword [r14 + rbx*8 + 8]
mov qword [r14 + rbx*8], rax
inc rbx
cmp qword [r14 + rbx*8], rsi
jne 0x18008bb6a
mov r8d, 8
mov rdx, rbx
mov rcx, r14
call fcn.18008be88
xor ecx, ecx
mov rbx, rax
call fcn.180083260
test rbx, rbx
je 0x18008bc02
mov qword [0x1800e1570], rbx
jmp 0x18008bc02
test r13b, r13b
jne 0x18008ba67
neg rbx
lea rdx, [rbx + 2]
cmp rdx, rbx
jae 0x18008bbc3
or rbp, 0xffffffffffffffff
jmp 0x18008ba69
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x18008bbba
mov r8d, 8
mov rcx, r14
call fcn.18008be88
xor ecx, ecx
mov r14, rax
call fcn.180083260
test r14, r14
je 0x18008bbba
mov qword [r14 + rbx*8], r15
mov qword [r14 + rbx*8 + 8], rsi
mov qword [0x1800e1570], r14
mov rdi, rsi
test ebp, ebp
je 0x18008ba6b
or rbp, 0xffffffffffffffff
mov r14, rbp
inc r14
cmp word [r15 + r14*2], si
jne 0x18008bc11
mov edx, 2
add r14, rdx
mov rcx, r14
call fcn.180085988
mov rbx, rax
test rax, rax
je 0x18008bc73
mov r8, r15
mov rdx, r14
mov rcx, rax
call fcn.18007fe9c
test eax, eax
jne 0x18008bc80
lea rdx, [r12 + 1]
test r13b, r13b
lea rdx, [rbx + rdx*2]
mov rcx, rbx
mov word [rdx - 2], si
cmovne rdx, rsi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x18008bc73
call fcn.18007d01c
mov esi, ebp
mov dword [rax], 0x2a
mov rcx, rbx
call fcn.180083260
jmp 0x18008ba6b
xor r9d, r9d
mov qword [rsp + 0x20], rsi
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.180070f44
int3
jmp 0x18008b9a8