Function at 0x140055654
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 0x140055101
call fcn.140033040
mov dword [rax], 0x16
or rax, 0xffffffffffffffff
jmp 0x140055229
mov edx, 0x3d
mov rdi, rcx
call fcn.140063e60
mov r13, rax
test rax, rax
je 0x140055203
cmp rax, r15
je 0x140055203
mov rbp, rax
lea r12, [0x14006c0f0]
sub rbp, r15
mov r14d, 0x7fff
cmp rbp, r14
jl 0x14005516b
xor r9d, r9d
lea rax, str.equal_sign___option____MAX_ENV
mov qword [rsp + 0x28], rax
lea rdx, [0x14007bbc0]
mov r8d, 0xa7
mov qword [rsp + 0x20], r12
lea ecx, [r9 + 2]
call fcn.140022000
cmp eax, 1
jne 0x14005516b
int3
mov rdx, r14
lea rcx, [r13 + 1]
call fcn.140038f60
cmp rax, r14
jb 0x1400551ac
xor r9d, r9d
lea rax, str.traits::tcsnlen_equal_sign__1___MAX_ENV_____MAX_ENV
mov qword [rsp + 0x28], rax
lea rdx, [0x14007bbc0]
mov r8d, 0xa8
mov qword [rsp + 0x20], r12
lea ecx, [r9 + 2]
call fcn.140022000
cmp eax, 1
jne 0x1400551ac
int3
cmp byte [r13 + 1], sil
mov r14, qword [0x14008d768]
sete r12b
cmp r14, qword [0x14008d780]
jne 0x1400551d6
mov rcx, r14
call fcn.14005551c
mov r14, rax
mov qword [0x14008d768], rax
lea rax, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
test r14, r14
jne 0x140055318
cmp dword [rsp + 0x68], esi
je 0x140055246
cmp qword [0x14008d770], rsi
je 0x140055246
call fcn.14003a734
test rax, rax
jne 0x1400552cc
call fcn.140033040
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.14002ffb0
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 0x140055212
mov ebx, 2
mov dword [rsp + 0x20], 0xcf
mov r9, rax
mov r8d, ebx
lea edx, [rbx + 6]
lea ecx, [rbx - 1]
call fcn.14002ff10
mov edx, ebx
mov qword [0x14008d768], rax
xor ecx, ecx
call fcn.14002ffb0
mov r14, qword [0x14008d768]
test r14, r14
jne 0x14005528b
or rbp, 0xffffffffffffffff
jmp 0x140055214
cmp qword [0x14008d770], rsi
jne 0x1400552d3
mov edx, 8
mov dword [rsp + 0x20], 0xd9
lea r9, str.minkernelcrtsucrt_srcdesktopcrtenv_setenv.cpp
mov r8d, ebx
lea ecx, [rdx - 7]
call fcn.14002ff10
mov edx, ebx
mov qword [0x14008d770], rax
xor ecx, ecx
call fcn.14002ffb0
cmp qword [0x14008d770], rsi
je 0x140055285
mov r14, qword [0x14008d768]
test r14, r14
jne 0x140055318
lea rax, str.__CRT_logic_error_in_setenv___0_
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rdx, [0x14007bbc0]
lea rax, [0x14006c0f0]
mov r8d, 0xec
lea ecx, [r14 + 2]
mov qword [rsp + 0x20], rax
call fcn.140022000
cmp eax, 1
jne 0x140055285
int3
cmp qword [r14], rsi
mov rbx, r14
je 0x140055353
mov rdx, qword [rbx]
mov r8, rbp
mov rcx, r15
call fcn.140061650
test eax, eax
jne 0x140055341
mov rax, qword [rbx]
cmp byte [rax + rbp], 0x3d
je 0x14005534a
cmp byte [rax + rbp], sil
je 0x14005534a
add rbx, 8
cmp qword [rbx], rsi
jmp 0x14005531e
sub rbx, r14
sar rbx, 3
jmp 0x14005535d
sub rbx, r14
sar rbx, 3
neg rbx
test rbx, rbx
js 0x1400553df
cmp qword [r14], rsi
je 0x1400553df
mov rcx, qword [r14 + rbx*8]
mov edx, 2
call fcn.14002ffb0
test r12b, r12b
jne 0x14005538f
mov qword [r14 + rbx*8], r15
jmp 0x140055456
mov rax, qword [r14 + rbx*8 + 8]
mov qword [r14 + rbx*8], rax
inc rbx
cmp qword [r14 + rbx*8], rsi
jne 0x140055383
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.140030270
mov edx, 2
xor ecx, ecx
mov rbx, rax
call fcn.14002ffb0
test rbx, rbx
je 0x140055459
mov qword [0x14008d768], rbx
jmp 0x140055459
test r12b, r12b
jne 0x140055216
neg rbx
lea rdx, [rbx + 2]
cmp rdx, rbx
jae 0x1400553fd
or rbp, 0xffffffffffffffff
jmp 0x140055218
movabs rax, 0x1fffffffffffffff
cmp rdx, rax
jae 0x1400553f4
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.140030270
mov edx, 2
xor ecx, ecx
mov r14, rax
call fcn.14002ffb0
test r14, r14
je 0x1400553f4
mov qword [r14 + rbx*8], r15
mov qword [r14 + rbx*8 + 8], rsi
mov qword [0x14008d768], r14
mov rdi, rsi
cmp dword [rsp + 0x68], esi
je 0x14005521a
or rbp, 0xffffffffffffffff
mov r14, rbp
inc r14
cmp byte [r15 + r14], sil
jne 0x14005546a
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.14002ff10
mov rbx, rax
test rax, rax
je 0x1400554e1
mov r8, r15
lea rdx, [r14 + 2]
mov rcx, rax
call fcn.14003e6c0
test eax, eax
jne 0x1400554f3
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 0x1400554e1
call fcn.140033040
mov esi, ebp
mov dword [rax], 0x2a
mov edx, 2
mov rcx, rbx
call fcn.14002ffb0
jmp 0x14005521a
mov r9d, 0x146
mov qword [rsp + 0x20], rsi
lea r8, [0x14007bbc0]
lea rdx, str.common_set_variable_in_environment_nolock
lea rcx, str.traits::tcscpy_s_name__count__option_
call fcn.140022950
int3
jmp 0x1400550c4