Function at 0x140039650
Capabilities:
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x70
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0xb0], rbx
mov rax, qword [0x14022b078]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov r14, rdx
mov rdi, rcx
mov qword [rsp + 0x40], rdx
lea rbx, [rcx + 0x20]
cmp qword [rbx + 0x10], 0
jne 0x140039983
mov rax, qword [rcx + 0x10]
test rax, rax
jne 0x1400396b2
mov r8d, dword [rcx + 0x18]
xor edx, edx
mov ecx, dword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rdi + 0x10], rax
xor r15d, r15d
test rax, rax
je 0x140039737
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140043710
mov rsi, rax
cmp rbx, rax
je 0x1400396f5
mov rcx, rbx
call fcn.140017110
movups xmm0, xmmword [rsi]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [rsi + 0x10]
movups xmmword [rbx + 0x10], xmm1
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], 7
mov word [rsi], r15w
mov rdx, qword [rsp + 0x60]
cmp rdx, 8
jb 0x140039737
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140039732
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400399b8
call fcn.14013f180
cmp qword [rbx + 0x10], r15
jne 0x140039983
cmp dword [rdi + 0x18], 4
jne 0x140039983
xor eax, eax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x30]
mov edx, 0x100
lea rcx, [rsp + 0x48]
call fcn.140025f20
nop
mov r8, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
sub r8, rdi
sar r8, 1
mov rdx, rdi
lea rcx, str.windir
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp word [rdi + r8*2], 0
jne 0x1400397a0
mov rdx, rdi
mov rcx, rbx
call fcn.140017000
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x1400397fb
lea rbp, [rcx + 1]
mov qword [rbx + 0x10], rbp
mov rsi, rbx
cmp rdx, 8
jb 0x1400397de
mov rsi, qword [rbx]
lea rcx, [rsi + rcx*2]
mov r8d, 2
lea rdx, [0x1401d7eac]
call fcn.14015dc80
mov word [rsi + rbp*2], r15w
jmp 0x14003981a
mov qword [rsp + 0x20], 1
lea r9, [0x1401d7eac]
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rbx
call fcn.1400249f0
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
mov rax, rdx
sub rax, rcx
cmp rax, 8
jb 0x14003985f
lea rbp, [rcx + 8]
mov qword [rbx + 0x10], rbp
mov rsi, rbx
cmp rdx, 8
jb 0x140039842
mov rsi, qword [rbx]
lea rcx, [rsi + rcx*2]
mov r8d, SafeArrayUnlock
lea rdx, str.system32
call fcn.14015dc80
mov word [rsi + rbp*2], r15w
jmp 0x14003987e
mov qword [rsp + 0x20], 8
lea r9, str.system32
xor r8d, r8d
lea edx, [r8 + 8]
mov rcx, rbx
call fcn.1400249f0
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x1400398c3
lea rbp, [rcx + 1]
mov qword [rbx + 0x10], rbp
mov rsi, rbx
cmp rdx, 8
jb 0x1400398a6
mov rsi, qword [rbx]
lea rcx, [rsi + rcx*2]
mov r8d, 2
lea rdx, [0x1401d7eac]
call fcn.14015dc80
mov word [rsi + rbp*2], r15w
jmp 0x1400398e2
mov qword [rsp + 0x20], 1
lea r9, [0x1401d7eac]
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rbx
call fcn.1400249f0
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
mov rax, rdx
sub rax, rcx
cmp rax, 0xc
jb 0x140039927
lea rbp, [rcx + 0xc]
mov qword [rbx + 0x10], rbp
mov rsi, rbx
cmp rdx, 8
jb 0x14003990a
mov rsi, qword [rbx]
lea rcx, [rsi + rcx*2]
mov r8d, SafeArrayCopy
lea rdx, str.ntoskrnl.exe
call fcn.14015dc80
mov word [rsi + rbp*2], r15w
jmp 0x140039947
mov qword [rsp + 0x20], reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea r9, str.ntoskrnl.exe
xor r8d, r8d
lea edx, [r8 + 0xc]
mov rcx, rbx
call fcn.1400249f0
nop
test rdi, rdi
je 0x140039983
mov rdx, qword [rsp + 0x58]
sub rdx, rdi
sar rdx, 1
add rdx, rdx
mov rax, rdi
cmp rdx, 0x1000
jb 0x14003997b
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400399b2
mov rcx, rdi
call fcn.14013f180
mov rdx, rbx
mov rcx, r14
call fcn.140020720
mov rax, r14
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14013f550
mov rbx, qword [rsp + 0xb0]
add rsp, 0x70
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.14016111c
int3
call fcn.14016111c
int3