Function at 0x140097050
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x20390
call fcn.1400ae240
sub rsp, rax
mov rax, qword [0x1400c1008]
xor rax, rsp
mov qword [rsp + 0x20380], rax
mov r12, r8
mov r14, rcx
xor esi, esi
mov qword [rsp + 0x70], rsi
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rsp + 0x180]
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
movups xmmword [rsp + 0xa0], xmm0
movups xmmword [rsp + 0xb0], xmm0
movups xmmword [rsp + 0xc0], xmm0
movups xmmword [rsp + 0xd0], xmm0
movups xmmword [rsp + 0xe0], xmm0
movups xmmword [rsp + 0xf0], xmm0
xorps xmm1, xmm1
movups xmmword [rsp + 0x100], xmm1
movups xmmword [rsp + 0x110], xmm1
movups xmmword [rsp + 0x120], xmm1
movups xmmword [rsp + 0x130], xmm1
movups xmmword [rsp + 0x140], xmm1
movups xmmword [rsp + 0x150], xmm1
movups xmmword [rsp + 0x160], xmm1
movups xmmword [rsp + 0x170], xmm1
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rsp + 0x380]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rsp + 0x10380]
call sub.VCRUNTIME140.dll_memset
mov ebx, esi
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x68], rsi
test r12, r12
je 0x140097985
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x68]
mov edx, recv
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140097985
xor ebx, ebx
mov r13d, ebx
mov dword [rsp + 0x4c], ebx
nop dword [rax + rax]
cmp r13d, dword [r14]
jae 0x14009730e
mov edi, ebx
mov dword [rsp + 0x50], ebx
nop
cmp edi, dword [r12]
jae 0x140097301
mov eax, edi
imul rdx, rax, 0x658
add rdx, r12
cmp dword [rdx + 8], 1
jne 0x1400972f4
mov eax, r13d
imul rsi, rax, 0x658
add rsi, r14
add rdx, 0x10
lea rcx, [rsi + 0x58]
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
je 0x1400972f4
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rsp + 0x180]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x30], ebx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x1fe
lea r9, [rsp + 0x180]
mov r8, qword [rsi + 0x258]
lea rdx, [rsi + 0x58]
mov rcx, r12
call fcn.140097a70
test eax, eax
jne 0x1400972f4
cmp dword [rsp + 0x48], eax
jbe 0x1400972f4
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rsi + 0x58]
call sub.VCRUNTIME140.dll_memset
lea rax, [rsp + 0x180]
mov qword [rsp + 0x20], rax
lea r9, [0x1400fd8a4]
mov edx, 0x1fe
mov r8, 0xffffffffffffffff
lea rcx, [rsi + 0x58]
call fcn.140001030
movsxd rcx, eax
mov qword [rsi + 0x258], rcx
mov byte [rsi + 0x255], 0
xor edx, edx
mov r8d, 0x3fc
lea rcx, [rsi + 0x260]
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x20], 0xffffffffffffffff
lea r9, [rsi + 0x58]
mov r8d, 0x1fe
lea rdx, [rsi + 0x260]
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_mbstowcs_s]
test eax, eax
je 0x1400972eb
cmp eax, 0x50
je 0x1400972eb
inc edi
mov dword [rsp + 0x50], edi
xor ebx, ebx
jmp 0x1400971b0
xor eax, eax
mov word [rsi + 0x65a], ax
inc edi
mov dword [rsp + 0x50], edi
xor ebx, ebx
jmp 0x1400971b0
inc r13d
mov dword [rsp + 0x4c], r13d
jmp 0x1400971a0
mov r12d, ebx
mov dword [rsp + 0x4c], ebx
cmp r12d, dword [r14]
jae 0x14009796a
xorps xmm0, xmm0
movups xmmword [rsp + 0x100], xmm0
movups xmmword [rsp + 0x110], xmm0
movups xmmword [rsp + 0x120], xmm0
movups xmmword [rsp + 0x130], xmm0
movups xmmword [rsp + 0x140], xmm0
movups xmmword [rsp + 0x150], xmm0
movups xmmword [rsp + 0x160], xmm0
movups xmmword [rsp + 0x170], xmm0
mov ebx, r12d
imul r13, rbx, 0x658
lea r9, [r14 + 0x11]
add r9, r13
mov qword [rsp + 0x20], 0xffffffffffffffff
mov r8d, 0x40
lea rdx, [rsp + 0x100]
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_mbstowcs_s]
test eax, eax
je 0x1400973aa
cmp eax, 0x50
je 0x1400973aa
inc r12d
mov dword [rsp + 0x4c], r12d
jmp 0x140097315
mov rax, qword [rsp + 0x70]
lea rax, [rax*2 - 4]
cmp rax, 0x80
jae 0x1400979f1
xor esi, esi
mov word [rsp + rax + 0x100], si
xorps xmm0, xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
movups xmmword [rsp + 0xa0], xmm0
movups xmmword [rsp + 0xb0], xmm0
movups xmmword [rsp + 0xc0], xmm0
movups xmmword [rsp + 0xd0], xmm0
movups xmmword [rsp + 0xe0], xmm0
movups xmmword [rsp + 0xf0], xmm0
lea r9, [r14 + 0x10]
add r9, r13
mov qword [rsp + 0x20], 0xffffffffffffffff
lea r8d, [rsi + 0x40]
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_mbstowcs_s]
test eax, eax
je 0x14009744d
cmp eax, 0x50
je 0x14009744d
inc r12d
mov dword [rsp + 0x4c], r12d
jmp 0x140097315
mov word [rsp + 0xfe], si
mov r15d, esi
mov dword [rsp + 0x58], esi
nop dword [rax]
cmp r15d, r12d
jae 0x1400975e0
mov esi, r12d
mov dword [rsp + 0x54], r12d
cmp esi, dword [r14]
jae 0x1400975d3
mov eax, esi
imul rbx, rax, 0x658
cmp dword [rbx + r14 + 8], 1
jne 0x1400975c8
lea rdi, [r14 + 0x58]
add rdi, rbx
mov eax, r15d
imul rcx, rax, 0x658
lea rdx, [r14 + 0x10]
add rdx, rcx
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
je 0x1400975c8
xor edx, edx
mov r8d, 0x1fe
lea rcx, [rsp + 0x180]
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x30], 1
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x1fe
lea r9, [rsp + 0x180]
mov r8, qword [rbx + r14 + 0x258]
mov rdx, rdi
mov rcx, r14
call fcn.140097a70
test eax, eax
jne 0x1400975c8
cmp dword [rsp + 0x48], eax
jbe 0x1400975c8
xor edx, edx
mov r8d, 0x1fe
mov rcx, rdi
call sub.VCRUNTIME140.dll_memset
lea rax, [rsp + 0x180]
mov qword [rsp + 0x20], rax
lea r9, [0x1400fd84c]
mov edx, 0x1fe
mov r8, 0xffffffffffffffff
mov rcx, rdi
call fcn.140001030
movsxd rcx, eax
mov qword [rbx + r14 + 0x258], rcx
mov byte [rbx + r14 + 0x255], 0
lea rdi, [rbx + r14]
xor edx, edx
mov r8d, 0x3fc
lea rcx, [rdi + 0x260]
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x20], 0xffffffffffffffff
lea r9, [rsp + 0x180]
mov r8d, 0x1fe
lea rdx, [rdi + 0x260]
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_mbstowcs_s]
test eax, eax
je 0x1400975bd
cmp eax, 0x50
je 0x1400975bd
inc esi
mov dword [rsp + 0x54], esi
jmp 0x140097471
xor eax, eax
mov word [rbx + r14 + 0x65a], ax
inc esi
mov dword [rsp + 0x54], esi
jmp 0x140097471
inc r15d
mov dword [rsp + 0x58], r15d
jmp 0x140097460
mov eax, dword [r14 + r13 + 0xc]
dec eax
cmp eax, 5
ja case.default.0x140097603
cdqe
lea rdi, [0x140000000]
mov ecx, dword [rdi + rax*4 + 0x979f8]
add rcx, rdi
jmp rcx
lea rdx, [r14 + 0x260]
add rdx, r13
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne case.0x140097603.1
mov rbx, qword [rsp + 0x40]
xor esi, esi
jmp 0x140097985
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, r12d
imul rbx, rcx, 0x658
add rbx, r14
mov rcx, qword [rsp + 0x68]
cmp dword [rbx + 0xc], 5
mov esi, 0
cmove rcx, rsi
mov r9d, 0x7fff
lea r8, [rsp + 0x380]
lea rdx, [rsp + 0x80]
call qword [sym.imp.USERENV.dll_ExpandEnvironmentStringsForUserW]
test eax, eax
jne 0x140097682
mov rbx, qword [rsp + 0x40]
jmp 0x140097985
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x140097699
cmp dword [rbx + 0xc], 4
jne 0x140097732
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, 0x7fff
lea rdx, [rsp + 0x10380]
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x1400976d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x1400976d8
mov rbx, qword [rsp + 0x40]
jmp 0x140097985
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140097732
cmp dword [rbx + 0xc], 4
jne 0x140097732
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rsp + 0x380]
call sub.VCRUNTIME140.dll_memset
lea rax, [rsp + 0x10380]
mov qword [rsp + 0x20], rax
lea r9, [0x1400fe0a4]
mov edx, 0x7fff
mov r8, 0xffffffffffffffff
lea rcx, [rsp + 0x380]
call fcn.140001140
mov word [rsp + 0x1037c], si
lea rdi, [rbx + 0x260]
mov rdx, rdi
lea rcx, [rsp + 0x380]
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x140097773
mov r8, qword [rbx + 0x50]
dec r8
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
test eax, eax
jne 0x140097773
inc r12d
mov dword [rsp + 0x4c], r12d
jmp 0x140097315
mov r8, qword [rbx + 0x50]
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x380]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
lea rcx, [rsp + 0x380]
test eax, eax
jne 0x1400977d5
xor edx, edx
mov r8d, 0xfffe
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x20], rdi
lea r9, [0x1400fe08c]
mov edx, 0x7fff
mov r8, 0xffffffffffffffff
lea rcx, [rsp + 0x380]
call fcn.140001140
movsxd rcx, eax
mov qword [rsp + 0x60], rcx
jmp 0x140097839
mov edx, 0x7fff
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
mov qword [rsp + 0x60], rax
add rax, 2
cmp rax, 0xfffe
jb 0x1400977fb
mov rbx, qword [rsp + 0x40]
jmp 0x140097985
mov r9, 0xffffffffffffffff
lea r8, [0x1400fd71c]
mov edx, 0x7fff
lea rcx, [rsp + 0x380]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
mov r9, 0xffffffffffffffff
mov r8, rdi
mov edx, 0x7fff
lea rcx, [rsp + 0x380]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
mov word [rsp + 0x1037c], si
mov ecx, dword [rbx + 0xc]
sub ecx, 4
je 0x140097933
cmp ecx, 1
je 0x14009785c
mov rbx, qword [rsp + 0x40]
jmp 0x140097985
cmp word [rsp + 0x80], 0x25
je 0x140097871
mov rbx, qword [rsp + 0x40]
jmp 0x140097985
lea rdx, [0x1400fd6ac]
lea rcx, [rsp + 0x82]
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
jne 0x140097895
mov rbx, qword [rsp + 0x40]
jmp 0x140097985
mov word [rax], si
lea rdx, str.Environment
mov rcx, 0xffffffff80000001
call fcn.140091430
mov rbx, rax
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140097985
lea rcx, [rsp + 0x380]
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rcx + rax*2], si
jne 0x1400978d0
mov qword [rsp + 0x60], rax
add eax, eax
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x380]
mov qword [rsp + 0x20], rax
mov r9d, 2
xor r8d, r8d
lea rdx, [rsp + 0x82]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x140097985
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegFlushKey]
test eax, eax
jne 0x140097985
mov rcx, rbx
call fcn.1400965f0
mov rbx, rsi
mov qword [rsp + 0x40], rbx
cmp eax, 1
jne case.0x140097603.1
jmp 0x140097985
lea rdx, [rsp + 0x380]
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne case.0x140097603.1
mov rbx, qword [rsp + 0x40]
jmp 0x140097985
inc r12d
mov dword [rsp + 0x4c], r12d
jmp 0x140097315
mov rbx, qword [rsp + 0x40]
xor esi, esi
jmp 0x140097985
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400979bb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1400979bb
mov rbx, qword [rsp + 0x40]
xor esi, esi
nop
test rbx, rbx
je 0x140097998
mov rcx, rbx
call fcn.1400965f0
mov qword [rsp + 0x40], rsi
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400979ad
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x68], rsi
mov eax, 1
jmp 0x1400979c4
xor eax, eax
jmp 0x1400979c4
mov rcx, qword [rsp + 0x20380]
xor rcx, rsp
call fcn.140001ea0
lea r11, [rsp + 0x20390]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
call fcn.140001fd4
nop
nop
push rsp
jns 5369330180
add byte [rcx + rdi*2 + 9], dl
add byte [0x17109837b], al
jbe 0x140097a10
xor dword [rsi + 9], esi
add byte [rcx], dh
jbe 0x140097a14
add byte [rcx + rdi*2 + 9], dl
add ah, cl
int3
int3
int3