Function at 0x140102c5c
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov dword [rax + 0x10], edx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor esi, esi
mov r15, rcx
test rcx, rcx
jne 0x140102711
call fcn.1400d1c70
mov dword [rax], 0x16
or rax, 0xffffffffffffffff
jmp 0x140102839
mov edx, 0x3d
mov rdi, rcx
call fcn.1401108c0
mov r13, rax
test rax, rax
je 0x140102813
cmp rax, r15
je 0x140102813
mov rbp, rax
lea r12, [0x1401356c8]
sub rbp, r15
mov r14d, 0x7fff
cmp rbp, r14
jl 0x14010277b
xor r9d, r9d
lea rax, str.equal_sign___option____MAX_ENV
mov qword [rsp + 0x28], rax
lea rdx, [0x1401481a0]
mov r8d, 0xa7
mov qword [rsp + 0x20], r12
lea ecx, [r9 + 2]
call fcn.1400bbc70
cmp eax, 1
jne 0x14010277b
int3
mov rdx, r14
lea rcx, [r13 + 1]
call fcn.1400dc740
cmp rax, r14
jb 0x1401027bc
xor r9d, r9d
lea rax, str.traits::tcsnlen_equal_sign__1___MAX_ENV_____MAX_ENV
mov qword [rsp + 0x28], rax
lea rdx, [0x1401481a0]
mov r8d, 0xa8
mov qword [rsp + 0x20], r12
lea ecx, [r9 + 2]
call fcn.1400bbc70
cmp eax, 1
jne 0x1401027bc
int3
cmp byte [r13 + 1], sil
mov r14, qword [0x1402ec438]
sete r12b
cmp r14, qword [0x1402ec450]
jne 0x1401027e6
mov rcx, r14
call fcn.140102b2c
mov r14, rax
mov qword [0x1402ec438], rax
lea rax, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
test r14, r14
jne 0x140102928
cmp dword [rsp + 0x68], esi
je 0x140102856
cmp qword [0x1402ec440], rsi
je 0x140102856
call fcn.1400e4d94
test rax, rax
jne 0x1401028dc
call fcn.1400d1c70
or rsi, 0xffffffffffffffff
mov dword [rax], 0x16
mov ebp, esi
mov esi, ebp
mov ebp, esi
mov esi, ebp
mov edx, 2
mov rcx, rdi
call fcn.1400c92e0
mov eax, esi
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
test r12b, r12b
jne 0x140102822
mov ebx, 2
mov dword [rsp + 0x20], 0xcf
mov r9, rax
mov r8d, ebx
lea edx, [rbx + 6]
lea ecx, [rbx - 1]
call fcn.1400c9240
mov edx, ebx
mov qword [0x1402ec438], rax
xor ecx, ecx
call fcn.1400c92e0
mov r14, qword [0x1402ec438]
test r14, r14
jne 0x14010289b
or rbp, 0xffffffffffffffff
jmp 0x140102824
cmp qword [0x1402ec440], rsi
jne 0x1401028e3
mov edx, 8
mov dword [rsp + 0x20], 0xd9
lea r9, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
mov r8d, ebx
lea ecx, [rdx - 7]
call fcn.1400c9240
mov edx, ebx
mov qword [0x1402ec440], rax
xor ecx, ecx
call fcn.1400c92e0
cmp qword [0x1402ec440], rsi
je 0x140102895
mov r14, qword [0x1402ec438]
test r14, r14
jne 0x140102928
lea rax, str.__CRT_logic_error_in_setenv___0_
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x1401481a0]
lea rax, [0x1401356c8]
mov r8d, 0xec
lea ecx, [r14 + 2]
mov qword [rsp + 0x20], rax
call fcn.1400bbc70
cmp eax, 1
jne 0x140102895
int3
cmp qword [r14], rsi
mov rbx, r14
je 0x140102963
mov rdx, qword [rbx]
mov r8, rbp
mov rcx, r15
call fcn.14010a6f0
test eax, eax
jne 0x140102951
mov rax, qword [rbx]
cmp byte [rax + rbp], 0x3d
je 0x14010295a
cmp byte [rax + rbp], sil
je 0x14010295a
add rbx, 8
cmp qword [rbx], rsi
jmp 0x14010292e
sub rbx, r14
sar rbx, 3
jmp 0x14010296d
sub rbx, r14
sar rbx, 3
neg rbx
test rbx, rbx
js 0x1401029ef
cmp qword [r14], rsi
je 0x1401029ef
mov rcx, qword [r14 + rbx*8]
mov edx, 2
call fcn.1400c92e0
test r12b, r12b
jne 0x14010299f
mov qword [r14 + rbx*8], r15
jmp 0x140102a66
mov rax, qword [r14 + rbx*8 + 8]
mov qword [r14 + rbx*8], rax
inc rbx
cmp qword [r14 + rbx*8], rsi
jne 0x140102993
mov r9d, 2
mov dword [rsp + 0x28], 0x107
lea rax, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
mov rdx, rbx
mov rcx, r14
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 6]
call fcn.1400c95a0
mov edx, 2
xor ecx, ecx
mov rbx, rax
call fcn.1400c92e0
test rbx, rbx
je 0x140102a69
mov qword [0x1402ec438], rbx
jmp 0x140102a69
test r12b, r12b
jne 0x140102826
neg rbx
lea rdx, [rbx + 2]
cmp rdx, rbx
jae 0x140102a0d
or rbp, 0xffffffffffffffff
jmp 0x140102828
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x140102a04
mov r9d, 2
mov dword [rsp + 0x28], 0x12a
lea rax, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
mov rcx, r14
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 6]
call fcn.1400c95a0
mov edx, 2
xor ecx, ecx
mov r14, rax
call fcn.1400c92e0
test r14, r14
je 0x140102a04
mov qword [r14 + rbx*8], r15
mov qword [r14 + rbx*8 + 8], rsi
mov qword [0x1402ec438], r14
mov rdi, rsi
cmp dword [rsp + 0x68], esi
je 0x14010282a
or rbp, 0xffffffffffffffff
mov r14, rbp
inc r14
cmp byte [r15 + r14], sil
jne 0x140102a7a
mov edx, 1
mov dword [rsp + 0x20], 0x13f
lea r9, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
lea rcx, [r14 + 2]
lea r8d, [rdx + 1]
call fcn.1400c9240
mov rbx, rax
test rax, rax
je 0x140102af1
mov r8, r15
lea rdx, [r14 + 2]
mov rcx, rax
call fcn.1400e99c0
test eax, eax
jne 0x140102b03
mov rax, rbx
lea rdx, [r13 + 1]
sub rax, r15
mov rcx, rbx
add rdx, rax
test r12b, r12b
mov byte [rdx - 1], sil
cmovne rdx, rsi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x140102af1
call fcn.1400d1c70
mov esi, ebp
mov dword [rax], 0x2a
mov edx, 2
mov rcx, rbx
call fcn.1400c92e0
jmp 0x14010282a
mov r9d, 0x146
mov qword [rsp + 0x20], rsi
lea r8, [0x1401481a0]
lea rdx, str.common_set_variable_in_environment_nolock
lea rcx, str.traits::tcscpy_s_name__count__option_
call fcn.1400bc230
int3
jmp 0x1401026d4