Function at 0x180017940
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4a8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x420], 0xfffffffffffffffe
mov rsi, rcx
lea rcx, [rbp - 0x50]
call fcn.180017f80
mov rcx, qword [rbp - 0x50]
mov rax, rcx
neg rax
jno 0x180017a19
mov rax, qword [rbp - 0x48]
mov ecx, eax
and ecx, 3
cmp ecx, 1
jne 0x180017a07
lea rcx, [rax - 1]
mov qword [rbp + 0x400], rcx
mov rcx, qword [rax - 1]
mov qword [rbp + 0x410], rcx
mov rax, qword [rax + 7]
mov qword [rbp + 0x418], rax
mov rax, qword [rax]
test rax, rax
je 0x1800179c2
mov rcx, qword [rbp + 0x410]
call rax
mov r8, qword [rbp + 0x410]
mov rax, qword [rbp + 0x418]
cmp qword [rax + 8], 0
je 0x1800179f1
cmp qword [rax + 0x10], 0x11
jb 0x1800179e2
mov r8, qword [r8 - 8]
mov rcx, qword [0x182093f98]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x182093f98]
xor edx, edx
mov r8, qword [rbp + 0x400]
call qword [sym.imp.KERNEL32.dll_HeapFree]
movabs rax, 0x8000000000000000
mov qword [rsi], rax
jmp 0x180017cd4
mov qword [rbp + 0x408], rsi
mov qword [rbp + 0x400], rcx
mov rax, qword [rbp - 0x48]
mov qword [rbp + 0x410], rax
mov qword [rbp + 0x3e8], 0
mov qword [rbp + 0x3f0], 2
mov qword [rbp + 0x3f8], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x418], rax
xor edi, edi
xor ebx, ebx
xor r14d, r14d
cmp r8, 0x201
jae 0x180017aa0
jmp 0x180017a8f
jae 0x180017b75
cmp r8, 0x201
jae 0x180017aa0
mov r15d, 0x200
lea r12, [rbp - 0x50]
mov r13, r8
jmp 0x180017b07
sub r8, r14
sub rbx, r14
cmp rbx, r8
jae 0x180017ade
mov qword [rsp + 0x20], 2
mov r9d, 2
lea rcx, [rbp + 0x3e8]
mov rdx, r14
call fcn.18006a960
mov rdi, qword [rbp + 0x3e8]
mov rax, qword [rbp + 0x3f0]
mov qword [rbp + 0x418], rax
mov eax, 0xffffffff
cmp rdi, rax
mov r14d, 0xffffffff
cmovb r14, rdi
mov qword [rbp + 0x3f8], r14
mov rbx, rdi
mov r15, r14
mov r12, qword [rbp + 0x418]
mov r13, r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rbp + 0x410]
mov rdx, r12
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
test eax, eax
jne 0x180017b36
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180017bef
mov r8d, esi
cmp r13, r8
jne 0x180017a80
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x180017ce9
add r13, r13
mov eax, 0xffffffff
cmp r13, rax
cmovae r13, rax
mov r8, r13
cmp r8, 0x201
jb 0x180017a8f
jmp 0x180017aa0
cmp r15, r8
jb 0x180017d03
lea rcx, [rbp + 0x3b0]
mov rdx, r12
call fcn.180015b60
mov rsi, qword [rbp + 0x3b0]
mov rdi, qword [rbp + 0x3b8]
movups xmm0, xmmword [rbp + 0x3c0]
movaps xmmword [rbp + 0x3d0], xmm0
cmp qword [rbp + 0x3e8], 0
je 0x180017bc9
mov r8, qword [rbp + 0x3f0]
mov rcx, qword [0x182093f98]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, rsi
neg rax
jo 0x180017c1f
movaps xmm0, xmmword [rbp + 0x3d0]
mov rax, qword [rbp + 0x408]
movups xmmword [rax + 0x10], xmm0
mov qword [rax], rsi
mov qword [rax + 8], rdi
jmp 0x180017cb4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
shl rdi, 0x20
cmp qword [rbp + 0x3e8], 0
je 0x180017c1b
mov r8, qword [rbp + 0x3f0]
mov rcx, qword [0x182093f98]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
or rdi, 2
movabs rax, 0x8000000000000000
mov rcx, qword [rbp + 0x408]
mov qword [rcx], rax
mov eax, edi
and eax, 3
cmp eax, 1
jne 0x180017cb4
lea rax, [rdi - 1]
mov qword [rbp + 0x3e0], rax
mov rax, qword [rdi - 1]
mov qword [rbp + 0x418], rax
mov rax, qword [rdi + 7]
mov qword [rbp + 0x408], rax
mov rax, qword [rax]
test rax, rax
je 0x180017c6f
mov rcx, qword [rbp + 0x418]
call rax
mov r8, qword [rbp + 0x418]
mov rax, qword [rbp + 0x408]
cmp qword [rax + 8], 0
je 0x180017c9e
cmp qword [rax + 0x10], 0x11
jb 0x180017c8f
mov r8, qword [r8 - 8]
mov rcx, qword [0x182093f98]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x182093f98]
xor edx, edx
mov r8, qword [rbp + 0x3e0]
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rbp + 0x400], 0
je 0x180017cd4
mov rcx, qword [0x182093f98]
xor edx, edx
mov r8, qword [rbp + 0x410]
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
add rsp, 0x4a8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [0x1800751b0]
lea r8, [0x180077318]
mov edx, 0x28
call fcn.18006a150
jmp 0x180017d18
lea rax, [0x180077300]
mov rcx, r8
mov rdx, r15
mov r8, rax
call fcn.18006a0e0
ud2