Function at 0x140199bbf
Capabilities:
Set environment variable

Disassembly:
jmp 0x1404a350c
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 0x1404a29a8
call fcn.140194467
mov dword [rax], 0x16
or rax, 0xffffffffffffffff
jmp 0x1404a2db2
mov edx, 0x3d
mov rdi, r15
call fcn.140199d72
mov rbx, rax
test rax, rax
je 0x1404a2d8c
cmp rax, r15
je 0x1404a2d8c
mov r12, rax
lea r13, [0x14052f3d0]
sub r12, r15
mov r14d, 0x7fff
sar r12, 1
cmp r12, r14
jl 0x1404a2a15
xor r9d, r9d
lea rax, str.equal_sign___option____MAX_ENV
mov qword [rsp + 0x28], rax
lea rdx, [0x140575390]
mov r8d, 0xb6
mov qword [rsp + 0x20], r13
lea ecx, [r9 + 2]
call fcn.140192040
cmp eax, 1
jne 0x1404a2a15
int3
mov rdx, r14
lea rcx, [rbx + 2]
call fcn.140198e81
cmp rax, r14
jb 0x1404a2a56
xor r9d, r9d
lea rax, str.traits::tcsnlen_equal_sign__1___MAX_ENV_____MAX_ENV
mov qword [rsp + 0x28], rax
lea rdx, [0x140575390]
mov r8d, 0xb7
mov qword [rsp + 0x20], r13
lea ecx, [r9 + 2]
call fcn.140192040
cmp eax, 1
jne 0x1404a2a56
int3
mov r14, qword [0x1405e3c50]
cmp r14, qword [0x1405e3c60]
movzx r13d, word [rbx + 2]
jne 0x1404a2a7d
mov rcx, r14
call fcn.1404a308c
mov r14, rax
mov qword [0x1405e3c50], rax
lea rbx, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
test r14, r14
jne 0x1404a2ba4
mov rax, qword [0x1405e3c48]
test ebp, ebp
je 0x1404a2b0f
test rax, rax
je 0x1404a2b0f
call fcn.140196672
test rax, rax
je 0x1404a2d8c
mov r14, qword [0x1405e3c50]
cmp r14, qword [0x1405e3c60]
jne 0x1404a2acd
mov rcx, r14
call fcn.1404a308c
mov r14, rax
mov qword [0x1405e3c50], rax
test r14, r14
jne 0x1404a2ba4
lea rax, str.__CRT_logic_error_in_setenv___0_
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x140575390]
lea rax, [0x14052f3d0]
mov r8d, 0xfe
lea ecx, [r14 + 2]
mov qword [rsp + 0x20], rax
call fcn.140192040
cmp eax, 1
jne 0x1404a2b54
int3
test r13w, r13w
je 0x1404a2d9b
test rax, rax
jne 0x1404a2b69
mov r9, rbx
mov dword [rsp + 0x20], 0xe1
lea edx, [rax + 8]
lea ecx, [rax + 1]
lea r8d, [rax + 2]
call fcn.14019af01
mov edx, 2
mov qword [0x1405e3c48], rax
xor ecx, ecx
call fcn.1401929e1
cmp qword [0x1405e3c48], rsi
jne 0x1404a2b5d
or rbp, 0xffffffffffffffff
jmp 0x1404a2d9d
mov r14, qword [0x1405e3c50]
test r14, r14
jne 0x1404a2ba4
mov edx, 8
mov dword [rsp + 0x20], 0xeb
mov r9, rbx
lea ecx, [rdx - 7]
lea r8d, [rdx - 6]
call fcn.14019af01
mov edx, 2
mov qword [0x1405e3c50], rax
xor ecx, ecx
call fcn.1401929e1
mov r14, qword [0x1405e3c50]
test r14, r14
je 0x1404a2b54
mov rax, qword [r14]
mov rbx, r14
test rax, rax
je 0x1404a2be9
mov r8, r12
mov rdx, rax
mov rcx, r15
call fcn.14019a358
test eax, eax
jne 0x1404a2bd7
mov rax, qword [rbx]
mov ecx, 0x3d
cmp word [rax + r12*2], cx
je 0x1404a2be0
cmp word [rax + r12*2], si
je 0x1404a2be0
add rbx, 8
mov rax, qword [rbx]
jmp 0x1404a2baa
sub rbx, r14
sar rbx, 3
jmp 0x1404a2bf3
sub rbx, r14
sar rbx, 3
neg rbx
test rbx, rbx
js 0x1404a2c76
cmp qword [r14], rsi
je 0x1404a2c76
mov rcx, qword [r14 + rbx*8]
mov edx, 2
call fcn.1401929e1
test r13w, r13w
je 0x1404a2c26
mov qword [r14 + rbx*8], r15
jmp 0x1404a2cee
mov rax, qword [r14 + rbx*8 + 8]
mov qword [r14 + rbx*8], rax
inc rbx
cmp qword [r14 + rbx*8], rsi
jne 0x1404a2c1a
mov r9d, 2
mov dword [rsp + 0x28], 0x119
lea rax, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
mov rdx, rbx
mov rcx, r14
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 6]
call fcn.140192e55
mov edx, 2
xor ecx, ecx
mov rbx, rax
call fcn.1401929e1
test rbx, rbx
je 0x1404a2cf1
mov qword [0x1405e3c50], rbx
jmp 0x1404a2cf1
test r13w, r13w
je 0x1404a2d9f
neg rbx
lea rdx, [rbx + 2]
cmp rdx, rbx
jae 0x1404a2c95
or rbp, 0xffffffffffffffff
jmp 0x1404a2da1
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x1404a2c8c
mov r9d, 2
mov dword [rsp + 0x28], 0x13c
lea rax, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
mov rcx, r14
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 6]
call fcn.140192e55
mov edx, 2
xor ecx, ecx
mov r14, rax
call fcn.1401929e1
test r14, r14
je 0x1404a2c8c
mov qword [r14 + rbx*8], r15
mov qword [r14 + rbx*8 + 8], rsi
mov qword [0x1405e3c50], r14
mov rdi, rsi
test ebp, ebp
je 0x1404a2da3
or rbp, 0xffffffffffffffff
mov r14, rbp
inc r14
cmp word [r15 + r14*2], si
jne 0x1404a2d00
mov eax, 2
mov dword [rsp + 0x20], 0x151
add r14, rax
lea r9, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
mov rcx, r14
mov r8d, eax
mov edx, eax
call fcn.14019af01
mov rbx, rax
test rax, rax
je 0x1404a2d7d
mov r8, r15
mov rdx, r14
mov rcx, rax
call fcn.140195376
test eax, eax
jne 0x1404a2dcf
neg r13w
lea rax, [r12 + 1]
lea rax, [rbx + rax*2]
mov rcx, rbx
sbb rdx, rdx
mov word [rax - 2], si
and rdx, rax
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x1404a2d7d
call fcn.140194467
mov esi, ebp
mov dword [rax], 0x2a
mov edx, 2
mov rcx, rbx
call fcn.1401929e1
jmp 0x1404a2da3
call fcn.140194467
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.1401929e1
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
mov r9d, 0x158
mov qword [rsp + 0x20], rsi
lea r8, [0x140575390]
lea rdx, str.common_set_variable_in_environment_nolock
lea rcx, str.traits::tcscpy_s_name__count__option_
call fcn.1401982f6
int3
jmp 0x1404a296c