Function at 0x140022ce4
Capabilities:
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2fe0]
mov eax, 0x30e0
call fcn.140055f20
sub rsp, rax
mov qword [rbp - 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x3130], rbx
mov rax, qword [0x140081ee0]
xor rax, rsp
mov qword [rbp + 0x2fd0], rax
mov bl, r9b
mov qword [rsp + 0x50], rdx
xor edi, edi
mov word [rbp + 0xfd0], di
mov eax, 0x800
test rcx, rcx
je 0x140022d6e
test r8b, r8b
mov r8d, eax
je 0x140022d5f
mov byte [rsp + 0x20], dil
mov r9b, 1
lea rdx, [rbp + 0xfd0]
call fcn.140031b44
jmp 0x140022d6e
mov rdx, rcx
lea rcx, [rbp + 0xfd0]
call fcn.140046158
lea rcx, [rbp - 0x60]
call fcn.14002071c
nop
cmp word [rbp + 0xfd0], di
je 0x140022dc1
lea rdx, [rbp + 0xfd0]
lea rcx, [rbp - 0x60]
test bl, bl
je 0x140022d97
call fcn.140021278
jmp 0x140022d9f
xor r8d, r8d
call fcn.140020c80
test al, al
jne 0x140022dc8
test bl, bl
je 0x140023216
mov edx, 6
lea rcx, [0x140094860]
call fcn.14001bc60
jmp 0x140023216
mov dword [rbp - 0x4c], 1
mov ebx, edi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x70], rdi
mov edx, 0x1005
lea rcx, [rsp + 0x58]
call fcn.140001858
nop
mov esi, 0x1000
mov r13, qword [rsp + 0x58]
mov rdx, r13
jmp 0x140022e15
add ebx, eax
mov edx, eax
lea rcx, [rsp + 0x58]
call fcn.140001858
mov edx, ebx
mov r13, qword [rsp + 0x58]
add rdx, r13
mov r8, rsi
lea rcx, [rbp - 0x60]
call fcn.140020ed4
test eax, eax
jne 0x140022dfd
mov edx, ebx
xor eax, eax
mov dword [rdx + r13], eax
mov byte [rdx + r13 + 4], al
mov qword [rsp + 0x30], rdi
mov r12, rdi
mov qword [rsp + 0x38], rdi
mov r10, rdi
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], rdi
cmp byte [r13], 0xff
jne 0x140022e5d
cmp byte [r13 + 1], 0xfe
lea esi, [rax + 1]
je 0x140022e5f
mov esi, edi
cmp byte [r13], 0xfe
jne 0x140022e73
cmp byte [r13 + 1], 0xff
mov r15d, 1
je 0x140022e76
mov r15d, edi
mov r9b, dil
test esi, esi
jne 0x140022e82
test r15d, r15d
je 0x140022eb7
cmp rdx, 2
jbe 0x140022eb7
lea rcx, [r13 + 2]
mov r8, r13
neg r8
cmp byte [rcx], 0x1f
ja 0x140022ea6
movzx eax, byte [rcx]
mov r11d, 0xffffdbff
bt r11d, eax
jb 0x140022eb4
inc rcx
lea rax, [r8 + rcx]
cmp rax, rdx
jae 0x140022eb7
jmp 0x140022e92
mov r9b, 1
mov r14d, dword [rbp + 0x3040]
cmp r14d, 3
je 0x140023043
test r14d, r14d
jne 0x140022ed6
test r9b, r9b
jne 0x140023043
mov rbx, r13
mov r15, qword [rsp + 0x30]
cmp byte [r13], dil
je 0x1400231fd
mov r13, qword [rsp + 0x50]
mov rsi, rbx
mov rcx, rdi
cmp byte [rbx], 0xd
je 0x140022f24
cmp byte [rsi], 0xa
je 0x140022f24
cmp byte [rsi], dil
je 0x140022f24
cmp byte [rbp + 0x3050], dil
je 0x140022f1c
cmp byte [rsi], 0x2f
jne 0x140022f1c
cmp byte [rsi + 1], 0x2f
jne 0x140022f1c
mov byte [rsi], dil
mov rcx, rsi
inc rsi
cmp byte [rsi], 0xd
jne 0x140022ef8
mov byte [rsi], dil
mov rax, rsi
test rcx, rcx
cmovne rax, rcx
jmp 0x140022f40
cmp byte [rax], 0x20
je 0x140022f3d
cmp byte [rax], 9
jne 0x140022f48
mov byte [rax], dil
dec rax
cmp rax, rbx
jae 0x140022f33
cmp byte [rbx], dil
je 0x14002301d
cmp byte [rbp + 0x3048], dil
je 0x140022f7b
cmp byte [rbx], 0x22
jne 0x140022f7b
or rax, 0xffffffffffffffff
inc rax
cmp byte [rbx + rax], dil
jne 0x140022f63
cmp byte [rax + rbx - 1], 0x22
jne 0x140022f7b
mov byte [rax + rbx - 1], dil
inc rbx
cmp r14d, 2
jne 0x140022f92
mov rdx, rbx
mov rcx, rbx
call qword [sym.imp.USER32.dll_OemToCharA]
mov r10, qword [rsp + 0x40]
or rax, 0xffffffffffffffff
inc rax
cmp byte [rbx + rax], dil
jne 0x140022f96
inc rax
cmp rax, r10
jbe 0x140022fc3
sub rax, r12
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140007a44
mov r12, qword [rsp + 0x38]
mov r15, qword [rsp + 0x30]
jmp 0x140022fcb
mov r12, rax
mov qword [rsp + 0x38], rax
mov r8, r12
mov rdx, r15
mov rcx, rbx
call fcn.1400489f0
cmp byte [rbp + 0x3058], dil
je 0x14002300d
cmp byte [rbx], 0x25
jne 0x14002300d
mov r8d, 0x800
lea rdx, [rbp + 0x1fd0]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x7fe
lea rdx, [rbp + 0x1fd0]
jbe 0x140023010
mov rdx, r15
mov rcx, r13
call fcn.1400461bc
mov r10, qword [rsp + 0x40]
lea rbx, [rsi + 1]
cmp byte [rbx], 0xd
je 0x14002302b
cmp byte [rbx], 0xa
jne 0x140023030
inc rbx
jmp 0x140023021
cmp byte [rbx], dil
jne 0x140022eed
mov r13, qword [rsp + 0x58]
jmp 0x1400231fd
mov r14d, 2
test esi, esi
jne 0x140023059
test r15d, r15d
jne 0x140023059
mov r14, rdi
lea esi, [r15 + 1]
mov qword [rsp + 0x78], rdi
mov qword [rbp - 0x80], rdi
mov qword [rbp - 0x78], rdi
mov qword [rbp - 0x70], rdi
mov rbx, qword [rsp + 0x60]
mov rdx, rbx
shr rdx, 1
inc rdx
lea rcx, [rsp + 0x78]
call fcn.140007a44
nop
dec rbx
mov r12, qword [rsp + 0x78]
cmp r14, rbx
jae 0x1400230dc
movsxd r9, esi
movsxd rcx, r15d
lea r8, [rcx + r13]
add r8, r14
sub r9, rcx
mov r10, r8
neg r10
sub rbx, r14
dec rbx
shr rbx, 1
inc rbx
movzx edx, byte [r9 + r8]
mov ecx, pe_nt_image_headers64
imul edx, ecx
movzx eax, byte [r8]
add dx, ax
lea rax, [r8 + r10]
shr rax, 1
mov word [r12 + rax*2], dx
lea r8, [r8 + 2]
sub rbx, 1
jne 0x1400230b2
mov rbx, r12
cmp word [r12], di
je 0x1400231f0
mov r13, qword [rsp + 0x50]
mov rsi, rbx
mov rcx, rdi
cmp word [rbx], 0xd
je 0x14002312c
cmp word [rsi], 0xa
je 0x14002312c
cmp word [rsi], di
je 0x14002312c
cmp byte [rbp + 0x3050], dil
je 0x140023122
cmp word [rsi], 0x2f
jne 0x140023122
cmp word [rsi + 2], 0x2f
jne 0x140023122
mov word [rsi], di
mov rcx, rsi
add rsi, 2
cmp word [rsi], 0xd
jne 0x1400230fb
mov word [rsi], di
mov rax, rsi
test rcx, rcx
cmovne rax, rcx
jmp 0x14002314a
cmp word [rax], 0x20
je 0x140023147
cmp word [rax], 9
jne 0x140023153
mov word [rax], di
sub rax, 2
cmp rax, rbx
jae 0x14002313b
cmp word [rbx], di
je 0x1400231cc
or rax, 0xffffffffffffffff
inc rax
cmp word [rbx + rax*2], di
jne 0x14002315c
cmp byte [rbp + 0x3048], dil
je 0x140023185
cmp word [rbx], 0x22
jne 0x140023185
cmp word [rbx + rax*2 - 2], 0x22
jne 0x140023185
mov word [rbx + rax*2 - 2], di
add rbx, 2
cmp byte [rbp + 0x3058], dil
je 0x1400231c1
cmp word [rbx], 0x25
jne 0x1400231c1
mov word [rbp + 0x1fd0], di
mov r8d, 0x800
lea rdx, [rbp + 0x1fd0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x7fe
lea rdx, [rbp + 0x1fd0]
jbe 0x1400231c4
mov rdx, rbx
mov rcx, r13
call fcn.1400461bc
lea rbx, [rsi + 2]
cmp word [rbx], 0xd
je 0x1400231dc
cmp word [rbx], 0xa
jne 0x1400231e2
add rbx, 2
jmp 0x1400231d0
cmp word [rbx], di
jne 0x1400230ef
mov r13, qword [rsp + 0x58]
mov rcx, r12
call fcn.14005a938
mov r15, qword [rsp + 0x30]
test r15, r15
je 0x14002320b
mov rcx, r15
call fcn.14005a938
nop
mov rcx, r13
call fcn.14005a938
mov dil, 1
lea rcx, [rbp - 0x60]
call fcn.140020758
mov al, dil
mov rcx, qword [rbp + 0x2fd0]
xor rcx, rsp
call fcn.140055f90
mov rbx, qword [rsp + 0x3130]
add rsp, 0x30e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret