Function at 0x140002718
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14000a008]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rbx, rcx
lea rsi, [0x140007c20]
mov qword [rbp - 0x48], rsi
xor r12d, r12d
mov qword [rbp - 0x40], r12
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
lea r9, [rbp - 0x40]
lea edx, [r12 + 0xe]
lea r8d, [r12 + 1]
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
lea r13d, [r12 + 8]
test eax, eax
je 0x1400029dc
lea rcx, [rbp - 0x30]
call fcn.1400037ec
nop
mov r15d, 0x104
lea r8, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae r8, qword [rbp - 0x30]
cmp qword [rbx + 0x18], r13
jb 0x1400027b4
mov rdx, qword [rbx]
jmp 0x1400027b7
mov rdx, rbx
mov r9d, dword [rbp - 0x20]
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.USERENV.dll_ExpandEnvironmentStringsForUserW]
test eax, eax
setne al
test al, al
jne 0x140002926
cmp r15d, 0x410
jae 0x140002903
add r15d, r15d
mov esi, r15d
mov rcx, qword [rbp - 0x20]
cmp rsi, rcx
ja 0x140002809
mov qword [rbp - 0x20], rsi
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rax, qword [rbp - 0x30]
mov word [rax + r15*2], r12w
jmp 0x1400028bd
sub rsi, rcx
or rax, 0xffffffffffffffff
sub rax, rcx
cmp rax, rsi
jbe 0x1400028fd
test rsi, rsi
je 0x1400028c1
lea r14, [rcx + rsi]
movabs rax, 0x7ffffffffffffffe
cmp r14, rax
ja 0x1400028f7
cmp qword [rbp - 0x18], r14
jae 0x140002853
mov r8, rcx
mov rdx, r14
lea rcx, [rbp - 0x30]
call fcn.14000409c
jmp 0x14000286d
test r14, r14
jne 0x140002876
mov qword [rbp - 0x20], r12
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rax, qword [rbp - 0x30]
mov word [rax], r12w
mov rcx, qword [rbp - 0x20]
test r14, r14
je 0x1400028c1
lea rax, [rbp - 0x30]
cmp rsi, 1
jne 0x140002890
cmp qword [rbp - 0x18], r13
cmovae rax, qword [rbp - 0x30]
mov word [rax + rcx*2], r12w
jmp 0x1400028a7
cmp qword [rbp - 0x18], r13
cmovae rax, qword [rbp - 0x30]
lea rdi, [rax + rcx*2]
movzx eax, r12w
mov rcx, rsi
rep stosw word [rdi], ax
mov qword [rbp - 0x20], r14
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rax, qword [rbp - 0x30]
mov word [rax + r14*2], r12w
mov rcx, qword [rbp - 0x20]
lea r8, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae r8, qword [rbp - 0x30]
cmp qword [rbx + 0x18], r13
jb 0x1400028d9
mov rdx, qword [rbx]
jmp 0x1400028dc
mov rdx, rbx
mov r9d, ecx
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.USERENV.dll_ExpandEnvironmentStringsForUserW]
test eax, eax
setne al
test al, al
jne 0x14000291f
jmp 0x1400027d2
call fcn.140003f68
int3
call fcn.140003f68
int3
test al, al
jne 0x14000291f
lea rdx, [0x1400076dc]
mov rcx, rbx
call fcn.140003a60
lea rsi, [0x140007c20]
jmp 0x14000298b
lea rsi, [0x140007c20]
mov rdx, r12
lea rcx, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rcx, qword [rbp - 0x30]
mov r8d, r15d
test rcx, rcx
je 0x140002972
cmp r8, 0x7fffffff
ja 0x140002972
mov edi, r8d
mov eax, r12d
test r15d, r15d
je 0x14000296f
cmp word [rcx], r12w
je 0x140002962
add rcx, 2
sub rdi, 1
jne 0x140002952
test rdi, rdi
je 0x14000296f
mov rdx, r8
sub rdx, rdi
jmp 0x140002977
mov rdx, r12
mov eax, 0x80070057
test eax, eax
jns 0x140002990
lea rdx, [0x1400076dc]
mov rcx, rbx
call fcn.140003a60
nop
jmp 0x140002bac
mov edx, edx
cmp rdx, qword [rbp - 0x20]
ja 0x1400029b0
mov qword [rbp - 0x20], rdx
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rax, qword [rbp - 0x30]
mov word [rax + rdx*2], r12w
jmp 0x1400029bd
sub rdx, qword [rbp - 0x20]
lea rcx, [rbp - 0x30]
call fcn.140003954
lea rdx, [rbp - 0x30]
mov rcx, rbx
call fcn.14000387c
nop
cmp qword [rbp - 0x18], r13
jb 0x1400029f8
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
jmp 0x1400029f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
mov rcx, qword [rbp + 0x28]
je 0x1400029f8
mov edx, 0x657
call fcn.140002454
int3
mov r11d, 0x25
mov word [rbp - 0x50], r11w
mov rdi, qword [rbx + 0x10]
test rdi, rdi
je 0x140002aae
cmp rdi, 1
jb 0x140002aae
cmp qword [rbx + 0x18], r13
jb 0x140002a25
mov r10, qword [rbx]
jmp 0x140002a28
mov r10, rbx
test rdi, rdi
je 0x140002a43
mov rax, rdi
mov rdx, r10
cmp word [rdx], r11w
je 0x140002a46
add rdx, 2
sub rax, 1
jne 0x140002a33
mov rdx, r12
test rdx, rdx
je 0x140002aae
mov r9d, 1
lea rcx, [rbp - 0x50]
mov r8, rdx
movzx eax, word [rcx]
cmp word [r8], ax
jne 0x140002a74
add r8, 2
add rcx, 2
sub r9, 1
jne 0x140002a58
mov eax, r12d
jmp 0x140002a7b
sbb eax, eax
and eax, 0xfffffffe
inc eax
test eax, eax
je 0x140002a98
mov rcx, rdx
sub rcx, r10
sar rcx, 1
or rax, 0xffffffffffffffff
sub rax, rcx
add rdi, rax
lea r10, [rdx + 2]
jmp 0x140002a28
cmp qword [rbx + 0x18], r13
jb 0x140002aa3
mov rax, qword [rbx]
jmp 0x140002aa6
mov rax, rbx
sub rdx, rax
sar rdx, 1
jmp 0x140002ab2
or rdx, 0xffffffffffffffff
cmp rdx, 0xffffffffffffffff
je 0x140002bbd
lea rcx, [rbp - 0x30]
call fcn.1400037ec
nop
lea rdx, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rdx, qword [rbp - 0x30]
cmp qword [rbx + 0x18], r13
jb 0x140002ade
mov rcx, qword [rbx]
jmp 0x140002ae1
mov rcx, rbx
mov r8d, dword [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test eax, eax
mov rcx, qword [rbp + 0x28]
jne 0x140002b00
mov edx, 0x663
call fcn.140002454
int3
mov rdx, rdi
mov rcx, qword [rbp - 0x20]
cmp rdi, rcx
jb 0x140002b73
cmp rdx, rcx
ja 0x140002b29
mov qword [rbp - 0x20], rdx
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rax, qword [rbp - 0x30]
mov word [rax + rdi*2], r12w
jmp 0x140002b35
sub rdx, rcx
lea rcx, [rbp - 0x30]
call fcn.140003954
lea rdx, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rdx, qword [rbp - 0x30]
cmp qword [rbx + 0x18], r13
jb 0x140002b4d
mov rcx, qword [rbx]
jmp 0x140002b50
mov rcx, rbx
mov r8d, dword [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test eax, eax
mov rcx, qword [rbp + 0x28]
jne 0x140002b6f
mov edx, 0x66a
call fcn.140002454
int3
mov rcx, qword [rbp - 0x20]
lea edx, [rdi - 1]
cmp rdx, rcx
ja 0x140002b93
mov qword [rbp - 0x20], rdx
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], r13
cmovae rax, qword [rbp - 0x30]
mov word [rax + rdx*2], r12w
jmp 0x140002b9f
sub rdx, rcx
lea rcx, [rbp - 0x30]
call fcn.140003954
lea rdx, [rbp - 0x30]
mov rcx, rbx
call fcn.14000387c
nop
cmp qword [rbp - 0x18], r13
jb 0x140002bbd
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_]
nop
mov qword [rbp - 0x48], rsi
mov rcx, qword [rbp - 0x40]
test rcx, rcx
je 0x140002bee
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140002bee
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.140002474
int3
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140004bb0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret