Function at 0x140001090
Capabilities:
Query environment variable

Disassembly:
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
movsxd r14, ecx
mov r12, rdx
mov rdi, 0xffffffffffffffff
lea eax, [r14 + 1]
movsxd r13, eax
mov eax, 8
mul r13
cmovo rax, rdi
mov rcx, rax
call fcn.1400071ec
mov r15, rax
test rax, rax
je 0x140008206
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rbp
xor ebp, ebp
mov qword [rsp + 0x60], rsi
test r14d, r14d
jle 0x140001162
mov rsi, rax
sub r12, rax
mov rbx, qword [r12 + rsi]
inc rdi
cmp word [rbx + rdi*2], 0
jne 0x1400010f2
lea eax, [rdi*2 + 1]
add eax, edi
movsxd rcx, eax
call fcn.1400071ec
mov r11, rax
test rax, rax
je 0x140008311
mov rdx, rax
mov eax, edi
lea r9, [rbx + rax*2]
cmp rbx, r9
jae 0x14000114d
mov eax, 0xff80
nop dword [rax]
movzx ecx, word [rbx]
mov r8, rbx
test ax, cx
jne 0x140008210
mov byte [rdx], cl
inc rdx
add rbx, 2
cmp rbx, r9
jb 0x140001130
mov byte [rdx], 0
inc ebp
mov qword [rsi], r11
or rdi, 0xffffffffffffffff
add rsi, 8
cmp ebp, r14d
jl 0x1400010ee
mov eax, 8
mov qword [r15 + r14*8], 0
mul r13
mov rbx, r14
cmovo rax, rdi
mov rcx, rax
call fcn.1400071ec
mov rdi, rax
test rax, rax
je 0x140008322
test r14d, r14d
jle 0x1400011af
mov rdx, r15
mov rcx, rax
sub rdx, rax
mov r8, rbx
mov rax, qword [rdx + rcx]
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub r8, 1
jne 0x14000119e
lea rcx, [0x14002e880]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll___p__environ]
mov rdx, r15
mov ecx, r14d
mov r8, qword [rax]
call fcn.140001670
mov rcx, r15
mov esi, eax
call fcn.140007ef0
test r14d, r14d
je 0x1400011f1
mov rcx, qword [rdi + rbx*8 - 8]
dec rbx
call fcn.140007ef0
test rbx, rbx
jne 0x1400011df
mov rcx, rdi
call fcn.140007ef0
mov eax, esi
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov eax, 0x7f
jmp 0x14000120a
mov eax, 0xf800
test ax, cx
jne 0x140008235
movzx eax, cx
and cl, 0x3f
shr ax, 6
or al, 0xc0
mov byte [rdx], al
inc rdx
or cl, 0x80
mov byte [rdx], cl
jmp 0x1400082f5
movzx r10d, cx
mov eax, r10d
and eax, 0xfffff800
cmp eax, 0xd800
je 0x140008272
movzx eax, cx
shr ax, 0xc
or al, 0xe0
mov byte [rdx], al
movzx eax, cx
shr ax, 6
and cl, 0x3f
and al, 0x3f
or al, 0x80
mov byte [rdx + 1], al
add rdx, 2
or cl, 0x80
mov byte [rdx], cl
jmp 0x1400082f5
and r10d, 0xfffffc00
cmp r10d, 0xd800
jne 0x1400082e9
add rbx, 2
cmp rbx, r9
je 0x1400082ff
movzx r10d, word [rbx]
mov eax, r10d
and eax, 0xfffffc00
cmp eax, 0xdc00
jne 0x1400082e6
movzx ecx, cx
and r10d, 0x3ff
and ecx, 0x3ff
add ecx, 0x40
shl ecx, 0xa
add ecx, r10d
mov eax, ecx
shr eax, 0x12
or al, 0xf0
mov byte [rdx], al
mov eax, ecx
shr eax, 0xc
and al, 0x3f
or al, 0x80
mov byte [rdx + 1], al
mov eax, ecx
shr eax, 6
and cl, 0x3f
and al, 0x3f
or al, 0x80
mov byte [rdx + 2], al
add rdx, 3
or cl, 0x80
mov byte [rdx], cl
jmp 0x1400082f5
mov rbx, r8
mov word [rdx], 0xbfef
add rdx, 2
mov byte [rdx], 0xbd
mov eax, 0xff80
jmp 0x140001141
mov word [rdx], 0xbfef
mov byte [rdx + 2], 0xbd
add rdx, 3
jmp 0x14000114d
mov qword [rsi], 0
mov eax, 0x7f
jmp 0x1400011fb
mov rdx, r15
mov ecx, r14d
call fcn.14000bfa0
mov eax, 0x7f
jmp 0x1400011fb