Function at 0x140149e80
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.140146880
mov rax, qword [rsp + 0x78]
cmp rax, r15
jne 0x140149f24
mov rdi, qword [rsp + 0x80]
mov eax, edi
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x140149f1c
test rax, rax
je 0x140149f1c
mov rbx, qword [rdi - 1]
mov rsi, qword [rdi + 7]
mov rax, qword [rsi]
test rax, rax
je 0x140149ee5
mov rcx, rbx
call rax
dec rdi
cmp qword [rsi + 8], 0
je 0x140149f0b
cmp qword [rsi + 0x10], 0x11
jb 0x140149efa
mov rbx, qword [rbx - 8]
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, rdi
call sub.KERNEL32.dll_HeapFree
mov qword [r14], r15
jmp 0x14014a12a
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], r14
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x28], 2
mov qword [rsp + 0x30], 0
mov r8d, 0x200
mov eax, 2
mov qword [rsp + 0x48], rax
xor edi, edi
mov esi, 0xffffffff
xor ebx, ebx
xor r15d, r15d
cmp r8, 0x201
jae 0x140149fa0
jmp 0x140149f8f
jae 0x14014a04b
cmp r8, 0x201
jae 0x140149fa0
mov r14d, 0x200
lea r12, [rsp + 0x78]
mov r13, r8
jmp 0x140149fcb
sub r8, r15
sub rbx, r15
cmp rbx, r8
jb 0x14014a02a
cmp rdi, rsi
mov r15d, 0xffffffff
cmovb r15, rdi
mov qword [rsp + 0x30], r15
mov rbx, rdi
mov r14, r15
mov r12, qword [rsp + 0x48]
mov r13, r15
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov rcx, qword [rsp + 0x50]
mov rdx, r12
mov r8d, r13d
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov ebp, eax
test eax, eax
jne 0x140149ff5
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x14014a13f
mov r8d, ebp
cmp r13, r8
jne 0x140149f80
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x14014a171
add r13, r13
cmp r13, rsi
cmovae r13, rsi
mov r8, r13
cmp r8, 0x201
jb 0x140149f8f
jmp 0x140149fa0
lea rcx, [rsp + 0x20]
mov rdx, r15
call fcn.140056cf0
mov rdi, qword [rsp + 0x20]
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x48], rax
jmp 0x140149fab
cmp r14, r8
jb 0x14014a171
lea rcx, [rsp + 0x58]
mov rdx, r12
call fcn.140154120
cmp qword [rsp + 0x20], 0
movabs rsi, 0x8000000000000000
je 0x14014a086
mov r8, qword [rsp + 0x28]
mov rcx, qword [0x141af8068]
xor edx, edx
call sub.KERNEL32.dll_HeapFree
mov rax, qword [rsp + 0x40]
mov r14, qword [rsp + 0x38]
cmp qword [rsp + 0x58], rsi
jne 0x14014a101
mov qword [rax], rsi
mov rsi, qword [rsp + 0x60]
mov eax, esi
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x14014a112
test rax, rax
je 0x14014a112
mov rbx, qword [rsi - 1]
mov rdi, qword [rsi + 7]
mov rax, qword [rdi]
test rax, rax
je 0x14014a0c8
mov rcx, rbx
call rax
dec rsi
cmp qword [rdi + 8], 0
je 0x14014a0ee
cmp qword [rdi + 0x10], 0x11
jb 0x14014a0dd
mov rbx, qword [rbx - 8]
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_HeapFree
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, rsi
call sub.KERNEL32.dll_HeapFree
jmp 0x14014a112
movups xmm0, xmmword [rsp + 0x58]
movups xmm1, xmmword [rsp + 0x68]
movups xmmword [rax + 0x10], xmm1
movups xmmword [rax], xmm0
test r14, r14
je 0x14014a12a
mov rcx, qword [0x141af8068]
xor edx, edx
mov r8, qword [rsp + 0x50]
call sub.KERNEL32.dll_HeapFree
nop
add rsp, 0x478
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x60], rax
movabs rsi, 0x8000000000000000
mov qword [rsp + 0x58], rsi
cmp qword [rsp + 0x20], 0
jne 0x14014a073
jmp 0x14014a086
ud2