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.140005f70
mov r15, rax
test rax, rax
je 0x140007076
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.140005f70
mov r11, rax
test rax, rax
je 0x140007183
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 0x140007080
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.140005f70
mov rdi, rax
test rax, rax
je 0x140007194
test r14d, r14d
jle 0x1400011af
mov r8, r15
mov rcx, rax
sub r8, rax
mov rdx, rbx
mov rax, qword [r8 + rcx]
mov qword [rcx], rax
lea rcx, [rcx + 8]
sub rdx, 1
jne 0x14000119e
lea rcx, [0x14002c890]
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.140001660
mov rcx, r15
mov esi, eax
call fcn.140006c90
test r14d, r14d
je 0x1400011f1
mov rcx, qword [rdi + rbx*8 - 8]
dec rbx
call fcn.140006c90
test rbx, rbx
jne 0x1400011df
mov rcx, rdi
call fcn.140006c90
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 0x1400070a5
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 0x140007167
movzx r10d, cx
mov eax, r10d
and eax, 0xfffff800
cmp eax, 0xd800
je 0x1400070e2
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 0x140007167
mov eax, r10d
and eax, 0xfffffc00
cmp eax, 0xd800
jne 0x14000715b
add rbx, 2
cmp rbx, r9
je 0x140007171
movzx ecx, word [rbx]
mov eax, ecx
and eax, 0xfffffc00
cmp eax, 0xdc00
jne 0x140007158
and r10d, 0x3ff
and ecx, 0x3ff
add r10d, 0x40
shl r10d, 0xa
add r10d, ecx
mov eax, r10d
shr eax, 0x12
or al, 0xf0
mov byte [rdx], al
mov eax, r10d
shr eax, 0xc
and al, 0x3f
or al, 0x80
mov byte [rdx + 1], al
mov eax, r10d
shr eax, 6
and r10b, 0x3f
and al, 0x3f
or al, 0x80
mov byte [rdx + 2], al
add rdx, 3
or r10b, 0x80
mov byte [rdx], r10b
jmp 0x140007167
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.14000a550
mov eax, 0x7f
jmp 0x1400011fb