Function at 0x140016b10
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x478
mov r14, rcx
movabs r15, 0x8000000000000000
lea rcx, [rsp + 0x78]
call fcn.140016e90
mov rcx, qword [rsp + 0x78]
mov rax, rcx
neg rax
jno 0x140016baf
mov rdi, qword [rsp + 0x80]
mov eax, edi
and eax, 3
cmp eax, 1
jne 0x140016ba7
mov rbx, qword [rdi - 1]
mov rsi, qword [rdi + 7]
mov rax, qword [rsi]
test rax, rax
je 0x140016b6e
mov rcx, rbx
call rax
dec rdi
cmp qword [rsi + 8], 0
je 0x140016b95
cmp qword [rsi + 0x10], 0x11
jb 0x140016b83
mov rbx, qword [rbx - 8]
mov rcx, qword [0x14002e0f0]
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x14002e0f0]
xor edx, edx
mov r8, rdi
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [r14], r15
jmp 0x140016e1f
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x50], r14
mov rdi, qword [rsp + 0x80]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 2
mov qword [rsp + 0x40], 0
mov r8d, 0x200
mov esi, 2
xor r14d, r14d
xor r15d, r15d
cmp r8, 0x201
jae 0x140016c20
jmp 0x140016c0f
jae 0x140016ced
cmp r8, 0x201
jae 0x140016c20
mov ebx, 0x200
lea r12, [rsp + 0x78]
mov r13, r8
jmp 0x140016c52
sub r8, r15
mov rax, r14
sub rax, r15
cmp r8, rax
ja 0x140016cc2
mov eax, 0xffffffff
cmp r14, rax
mov r15d, 0xffffffff
cmovb r15, r14
mov qword [rsp + 0x40], r15
mov rbx, r15
mov r12, rsi
mov r13, r15
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
mov rdx, r12
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebp, eax
test eax, eax
jne 0x140016c7d
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140016da4
mov r8d, ebp
cmp r13, r8
jne 0x140016c00
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140016e34
lea r8, [r13*2]
cmp r13, 0x7fffffff
mov eax, 0xffffffff
cmova r8, rax
cmp r8, 0x201
jb 0x140016c0f
jmp 0x140016c20
mov qword [rsp + 0x20], 2
mov r9d, 2
lea rcx, [rsp + 0x30]
mov rdx, r15
call fcn.1400214a0
mov r14, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
jmp 0x140016c32
cmp rbx, r8
jb 0x140016e34
lea rcx, [rsp + 0x58]
mov rdx, r12
call fcn.1400171e0
cmp qword [rsp + 0x30], 0
mov rsi, qword [rsp + 0x50]
movabs rbx, 0x8000000000000000
je 0x140016d2e
mov r8, qword [rsp + 0x38]
mov rcx, qword [0x14002e0f0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r15, qword [rsp + 0x48]
cmp qword [rsp + 0x58], rbx
jne 0x140016df7
mov qword [rsi], rbx
mov rsi, qword [rsp + 0x60]
mov eax, esi
and eax, 3
cmp eax, 1
jne 0x140016e08
mov rbx, qword [rsi - 1]
mov r14, qword [rsi + 7]
mov rax, qword [r14]
test rax, rax
je 0x140016d69
mov rcx, rbx
call rax
dec rsi
cmp qword [r14 + 8], 0
je 0x140016d90
cmp qword [r14 + 0x10], 0x11
jb 0x140016d7e
mov rbx, qword [rbx - 8]
mov rcx, qword [0x14002e0f0]
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x14002e0f0]
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140016e08
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x60], rax
movabs rbx, 0x8000000000000000
mov qword [rsp + 0x58], rbx
cmp qword [rsp + 0x30], 0
je 0x140016de2
mov r8, qword [rsp + 0x38]
mov rcx, qword [0x14002e0f0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rsi, qword [rsp + 0x50]
mov r15, qword [rsp + 0x48]
cmp qword [rsp + 0x58], rbx
je 0x140016d3e
movups xmm0, xmmword [rsp + 0x58]
movups xmm1, xmmword [rsp + 0x68]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
test r15, r15
je 0x140016e1f
mov rcx, qword [0x14002e0f0]
xor edx, edx
mov r8, rdi
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
add rsp, 0x478
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2