Function at 0x1400233a8
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor r12d, r12d
mov ebx, edx
mov r13, rcx
mov ebp, r12d
cmp rcx, r12
jne 0x1400233fd
call fcn.140019fc2
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], r12
mov dword [rax], 0x16
call fcn.140015c4d
jmp 0x140023530
mov r15, qword [rcx]
cmp r15, r12
je 0x140023525
mov edx, 0x3d
mov rcx, r15
call fcn.140017653
mov r14, rax
cmp rax, r12
je 0x140023525
cmp r15, rax
je 0x140023525
cmp word [rax + 2], r12w
mov rdi, qword [0x1401384d0]
mov ecx, r12d
sete cl
mov dword [rsp + 0x90], ecx
cmp rdi, qword [0x1401384d8]
jne 0x1400234db
mov rsi, rdi
mov eax, r12d
cmp rdi, r12
jne 0x14002346e
mov rdi, r12
jmp 0x1400234d4
add rdi, 8
inc eax
cmp qword [rdi], r12
jne 0x140023468
inc eax
mov edx, 8
movsxd rcx, eax
call fcn.14001eb57
mov rbx, rax
mov rdi, rax
cmp rax, r12
jne 0x1400234b7
mov ecx, 9
call fcn.14001ed66
jmp 0x1400234b7
mov rcx, rax
call fcn.14002d5e4
mov qword [rbx], rax
add rbx, 8
add rsi, 8
mov rax, qword [rsi]
cmp rax, r12
jne 0x1400234a4
mov ecx, dword [rsp + 0x90]
mov qword [rbx], r12
mov ebx, dword [rsp + 0x88]
mov qword [0x1401384d0], rdi
cmp rdi, r12
jne 0x1400235b5
mov rax, qword [0x1401384c0]
cmp ebx, r12d
je 0x14002354b
cmp rax, r12
je 0x14002354b
call fcn.14002d8ad
mov qword [0x140137ef8], rax
call fcn.14002d751
cmp eax, r12d
jge 0x1400235ae
call fcn.14002d667
cmp eax, r12d
je 0x1400235ae
call fcn.140019fc2
mov dword [rax], 0x16
or eax, 0xffffffff
mov rbx, qword [rsp + 0x98]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp ecx, r12d
je 0x14002355b
xor eax, eax
jmp 0x140023533
cmp rax, r12
jne 0x140023591
mov ecx, 8
call fcn.14001eadf
mov qword [0x1401384c0], rax
cmp rax, r12
je 0x140023530
mov qword [rax], r12
mov rdi, qword [0x1401384d0]
cmp rdi, r12
jne 0x1400235b5
mov ecx, 8
call fcn.14001eadf
mov qword [0x1401384d0], rax
cmp rax, r12
je 0x140023530
mov qword [rax], r12
mov rdi, qword [0x1401384d0]
mov rsi, rdi
cmp rdi, r12
je 0x140023530
mov rax, qword [rdi]
sub r14, r15
xor ecx, ecx
sar r14, 1
mov rbx, rdi
movsxd r12, r14d
cmp rax, rcx
je 0x140023626
lea edi, [rcx + 0x3d]
mov r8, r12
mov rdx, rax
mov rcx, r15
call fcn.14002d50e
xor ecx, ecx
cmp eax, ecx
jne 0x14002360f
mov rax, qword [rbx]
cmp word [rax + r12*2], di
je 0x1400236c9
cmp word [rax + r12*2], cx
je 0x1400236c9
add rbx, 8
mov rax, qword [rbx]
cmp rax, rcx
jne 0x1400235de
mov rdi, qword [0x1401384d0]
sub rbx, rdi
sar rbx, 3
neg ebx
cmp ebx, ecx
jl 0x1400237a0
cmp qword [rsi], rcx
je 0x1400237a0
movsxd rdi, ebx
mov rcx, qword [rsi + rdi*8]
call fcn.1400186be
mov r12d, dword [rsp + 0x90]
xor ecx, ecx
cmp r12d, ecx
je 0x1400236dc
cmp qword [rsi + rdi*8], rcx
je 0x14002368a
lea rcx, [rsi + rdi*8 + 8]
xor edx, edx
mov rax, qword [rcx]
inc ebx
add rcx, 8
mov qword [rsi + rdi*8], rax
inc rdi
cmp qword [rsi + rdi*8], rdx
jne 0x140023670
movsxd rdx, ebx
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x1400236e4
mov rcx, qword [0x1401384d0]
mov r8d, 8
call fcn.14001ec7f
xor edi, edi
cmp rax, rdi
je 0x1400236e6
mov qword [0x1401384d0], rax
jmp 0x1400236e6
mov rdi, qword [0x1401384d0]
sub rbx, rdi
sar rbx, 3
jmp 0x14002362f
mov qword [rsi + rdi*8], r15
mov qword [r13], rcx
xor edi, edi
cmp dword [rsp + 0x88], edi
je 0x140023987
mov rcx, r15
call fcn.140015e86
mov ebx, 2
lea rcx, [rbx + rax]
mov rdx, rbx
call fcn.14001eb57
mov rsi, rax
cmp rax, rdi
je 0x140023987
mov rcx, r15
call fcn.140015e86
mov r8, r15
mov rcx, rsi
lea rdx, [rbx + rax]
call fcn.140021b5f
xor ecx, ecx
cmp eax, ecx
je 0x14002374d
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rcx
call fcn.140015b16
xor ecx, ecx
lea rdi, [rsi + r14*2]
mov word [rdi], cx
add rdi, rbx
or ebx, 0xffffffff
cmp dword [0x140128ae4], 1
jne 0x14002380b
cmp r12d, ecx
mov rdx, rdi
cmovne rdx, rcx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
xor ecx, ecx
cmp eax, ecx
jne 0x14002380b
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0x78
jne 0x140023809
mov dword [0x140128ae4], ecx
jmp 0x140023817
mov r12d, dword [rsp + 0x90]
cmp r12d, ecx
jne 0x1400239a7
cmp ebx, ecx
jge 0x1400237bb
neg ebx
lea eax, [rbx + 2]
cmp eax, ebx
jl 0x140023530
movsxd r8, eax
movabs rax, 0x1fffffffffffffff
cmp r8, rax
jae 0x140023530
mov edx, 8
mov rcx, rdi
call fcn.14001ec7f
xor edi, edi
cmp rax, rdi
je 0x140023530
movsxd rcx, ebx
mov qword [rax + rcx*8], r15
mov qword [rax + rcx*8 + 8], rdi
mov qword [r13], rdi
jmp 0x1400236bd
mov ebp, ebx
cmp dword [0x140128ae4], ecx
jne 0x14002396a
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rcx
mov r12, rcx
mov r14, rcx
mov r9d, ebx
mov r8, rsi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor edx, edx
movsxd r13, eax
cmp r13d, edx
jne 0x140023855
mov ebp, ebx
jmp 0x140023952
mov rcx, r13
mov edx, 1
call fcn.14001eb57
mov r12, rax
xor eax, eax
cmp r12, rax
je 0x14002384e
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov r9d, ebx
mov r8, rsi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor r13d, r13d
cmp eax, r13d
je 0x14002384e
mov eax, dword [rsp + 0x90]
cmp eax, r13d
jne 0x140023931
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov r9d, ebx
mov r8, rdi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd r13, eax
xor edx, edx
cmp r13d, edx
je 0x14002384e
mov rcx, r13
mov edx, 1
call fcn.14001eb57
mov r14, rax
xor eax, eax
cmp r14, rax
je 0x14002384e
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov r9d, ebx
mov r8, rdi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor r13d, r13d
cmp eax, r13d
mov eax, dword [rsp + 0x90]
cmove ebp, ebx
cmp ebp, ebx
je 0x140023952
cmp eax, r13d
mov rdx, r14
mov rcx, r12
cmovne rdx, r13
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmp eax, r13d
cmove ebp, ebx
mov rcx, r14
call fcn.1400186be
mov rcx, r12
call fcn.1400186be
mov r13, qword [rsp + 0x80]
cmp ebp, ebx
jne 0x14002397d
call fcn.140019fc2
mov dword [rax], 0x2a
mov rcx, rsi
call fcn.1400186be
xor edi, edi
cmp dword [rsp + 0x90], edi
je 0x1400239a0
mov rcx, r15
call fcn.1400186be
mov qword [r13], rdi
mov eax, ebp
jmp 0x140023533
mov rcx, r15
call fcn.1400186be
xor edx, edx
mov qword [r13], rdx
jmp 0x140023554