Function at 0x14001b6a0
Capabilities:
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1cd0
call fcn.140048c40
sub rsp, rax
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x1d20], rbx
mov rax, qword [0x140056850]
xor rax, rsp
mov qword [rsp + 0x1cc0], rax
mov dil, r9b
mov r14, rdx
mov qword [rsp + 0x48], rdx
xor ebx, ebx
cmp r8b, bl
je 0x14001b703
mov r8b, 1
lea rdx, [rsp + 0xcc0]
call fcn.140027108
jmp 0x14001b71a
lea rdx, [rsp + 0xcc0]
sub rdx, rcx
mov al, byte [rcx]
mov byte [rdx + rcx], al
inc rcx
cmp al, bl
jne 0x14001b70e
lea rcx, [rsp + 0x90]
call fcn.1400191e4
nop
cmp byte [rsp + 0xcc0], bl
je 0x14001b78f
cmp dil, bl
je 0x14001b750
xor r8d, r8d
lea rdx, [rsp + 0xcc0]
lea rcx, [rsp + 0x90]
call fcn.140019740
jmp 0x14001b76f
mov byte [rsp + 0x20], bl
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0xcc0]
lea rcx, [rsp + 0x90]
call fcn.1400195c0
cmp al, bl
jne 0x14001b7a1
cmp dil, bl
je 0x14001b78a
mov edx, 6
lea rcx, [0x140060e68]
call fcn.140015610
nop
jmp 0x14001bbd3
mov edx, 1
lea rcx, [rsp + 0x90]
call fcn.140019558
mov edi, ebx
mov edx, 0x405
lea rcx, [rsp + 0x50]
call fcn.140006904
nop
mov r15d, 0x400
mov r8, r15
mov r12, qword [rsp + 0x50]
mov rdx, r12
lea rcx, [rsp + 0x90]
call fcn.140019ddc
cmp eax, ebx
je 0x14001b801
add edi, eax
mov edx, eax
lea rcx, [rsp + 0x50]
call fcn.14001b640
mov edx, edi
mov r12, qword [rsp + 0x50]
add rdx, r12
mov r8, r15
lea rcx, [rsp + 0x90]
call fcn.140019ddc
cmp eax, ebx
jne 0x14001b7d5
mov eax, edi
add rax, r12
xor ecx, ecx
mov dword [rax], ecx
mov byte [rax + 4], cl
mov r13d, dword [rsp + 0x1d30]
cmp r13d, 3
je 0x14001b97b
cmp r13d, ebx
jne 0x14001b85f
cmp edi, 4
jl 0x14001b85f
cmp byte [r12], 0xff
jne 0x14001b85f
cmp byte [r12 + 1], 0xfe
jne 0x14001b85f
lea edx, [rcx + 2]
cmp edi, edx
jle 0x14001b85f
lea rcx, [r12 + 2]
mov al, byte [rcx]
cmp al, 0x20
jae 0x14001b856
cmp al, 0xd
je 0x14001b856
cmp al, 0xa
jne 0x14001b97b
inc edx
inc rcx
cmp edx, edi
jl 0x14001b844
mov rsi, r12
cmp byte [r12], bl
je 0x14001bbc3
mov rbp, rsi
mov rcx, rbx
cmp byte [rsi], 0xd
je 0x14001b8a6
cmp byte [rbp], 0xa
je 0x14001b8a6
cmp byte [rbp], bl
je 0x14001b8a6
cmp byte [rsp + 0x1d40], bl
je 0x14001b89d
cmp byte [rbp], 0x2f
jne 0x14001b89d
cmp byte [rbp + 1], 0x2f
jne 0x14001b89d
mov byte [rbp], bl
mov rcx, rbp
inc rbp
cmp byte [rbp], 0xd
jne 0x14001b877
mov byte [rbp], bl
mov rax, rbp
cmp rcx, rbx
cmovne rax, rcx
dec rax
cmp rax, rsi
jb 0x14001b8cf
cmp byte [rax], 0x20
je 0x14001b8c5
cmp byte [rax], 9
jne 0x14001b8cf
mov byte [rax], bl
dec rax
cmp rax, rsi
jae 0x14001b8bb
cmp byte [rsi], bl
je 0x14001b95b
cmp byte [rsp + 0x1d38], bl
je 0x14001b901
cmp byte [rsi], 0x22
jne 0x14001b901
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
cmp byte [rcx + rsi - 2], 0x22
jne 0x14001b901
mov byte [rcx + rsi - 2], bl
inc rsi
cmp r13d, 2
jne 0x14001b913
mov rdx, rsi
mov rcx, rsi
call qword [sym.imp.USER32.dll_OemToCharA]
cmp byte [rsp + 0x1d48], bl
je 0x14001b950
cmp byte [rsi], 0x25
jne 0x14001b950
mov r8d, r15d
lea rdx, [rsp + 0x10c0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp eax, ebx
je 0x14001b950
cmp eax, r15d
jae 0x14001b950
lea rdx, [rsp + 0x10c0]
mov rcx, r14
call fcn.140034848
jmp 0x14001b95b
mov rdx, rsi
mov rcx, r14
call fcn.140034848
lea rsi, [rbp + 1]
cmp byte [rsi], 0xd
je 0x14001b969
cmp byte [rsi], 0xa
jne 0x14001b96e
inc rsi
jmp 0x14001b95f
cmp byte [rsi], bl
jne 0x14001b86c
jmp 0x14001bbc3
mov rdi, qword [rsp + 0x58]
mov rdx, rdi
shr rdx, 1
inc rdx
lea rcx, [rsp + 0x68]
call fcn.1400068bc
nop
lea rdx, [rdi - 1]
mov r15, qword [rsp + 0x68]
cmp rdx, 2
jbe 0x14001b9e5
lea rdi, [r12 + 2]
mov r8, 0xfffffffffffffffe
sub r8, r12
add rdx, 0xfffffffffffffffd
shr rdx, 1
inc rdx
movzx ecx, byte [rdi + 1]
mov eax, 0x100
imul cx, ax
movzx eax, byte [rdi]
add cx, ax
lea rax, [r8 + rdi]
shr rax, 1
mov word [r15 + rax*2], cx
add rdi, 2
sub rdx, 1
jne 0x14001b9bc
mov rdi, r15
mov r13, rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rbx
cmp word [r15], bx
je 0x14001bbac
mov r12, rbx
mov r15, qword [rsp + 0x48]
mov r14, rdi
mov rcx, rbx
cmp word [rdi], 0xd
je 0x14001ba4f
cmp word [r14], 0xa
je 0x14001ba4f
cmp word [r14], bx
je 0x14001ba4f
cmp byte [rsp + 0x1d40], bl
je 0x14001ba44
cmp word [r14], 0x2f
jne 0x14001ba44
cmp word [r14 + 2], 0x2f
jne 0x14001ba44
mov word [r14], bx
mov rcx, r14
add r14, 2
cmp word [r14], 0xd
jne 0x14001ba18
mov word [r14], bx
mov rax, r14
cmp rcx, rbx
cmovne rax, rcx
sub rax, 2
cmp rax, rdi
jb 0x14001ba7e
cmp word [rax], 0x20
je 0x14001ba72
cmp word [rax], 9
jne 0x14001ba7e
mov word [rax], bx
sub rax, 2
cmp rax, rdi
jae 0x14001ba66
cmp word [rdi], bx
je 0x14001bb83
mov rcx, rdi
call fcn.140035758
mov rsi, rax
sub eax, r12d
lea eax, [rax*4 + 4]
cmp eax, ebx
jle 0x14001bab7
movsxd rdx, eax
lea rcx, [rsp + 0x30]
call fcn.14001b640
mov r13, qword [rsp + 0x30]
mov r12, qword [rsp + 0x38]
cmp byte [rsp + 0x1d38], bl
je 0x14001bada
cmp word [rdi], 0x22
jne 0x14001bada
movsxd rax, esi
cmp word [rdi + rax*2 - 2], 0x22
jne 0x14001bada
mov word [rdi + rax*2 - 2], bx
add rdi, 2
mov r8, r12
mov rdx, r13
mov rcx, rdi
call fcn.1400354f8
cmp byte [rsp + 0x1d48], bl
je 0x14001bb75
cmp word [rdi], 0x25
jne 0x14001bb75
mov word [rsp + 0x14c0], bx
mov esi, 1
mov r8d, 0x400
lea rdx, [rsp + 0x10c0]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ebp, eax
cmp eax, ebx
je 0x14001bb75
call fcn.14001caa0
cmp eax, ebx
je 0x14001bb47
mov r8d, 0x400
lea rdx, [rsp + 0x14c0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
cmp ebp, 0x400
jae 0x14001bb75
cmp esi, ebx
je 0x14001bb75
cmp esi, 0x400
jae 0x14001bb75
lea r8, [rsp + 0x14c0]
lea rdx, [rsp + 0x10c0]
mov rcx, r15
call fcn.1400345e0
jmp 0x14001bb83
mov r8, rdi
mov rdx, r13
mov rcx, r15
call fcn.1400345e0
lea rdi, [r14 + 2]
cmp word [rdi], 0xd
je 0x14001bb93
cmp word [rdi], 0xa
jne 0x14001bb99
add rdi, 2
jmp 0x14001bb87
cmp word [rdi], bx
jne 0x14001ba0c
mov r12, qword [rsp + 0x50]
mov r15, qword [rsp + 0x68]
cmp r13, rbx
je 0x14001bbba
mov rcx, r13
call fcn.14003cf00
nop
mov rcx, r15
call fcn.14003cf00
nop
cmp r12, rbx
je 0x14001bbd1
mov rcx, r12
call fcn.14003cf00
nop
mov bl, 1
lea rcx, [rsp + 0x90]
call fcn.14001958c
mov al, bl
mov rcx, qword [rsp + 0x1cc0]
xor rcx, rsp
call fcn.14003d0b0
mov rbx, qword [rsp + 0x1d20]
add rsp, 0x1cd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret