Function at 0x140004910
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4b8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x430], 0xfffffffffffffffe
mov rsi, rcx
lea rcx, [rbp - 0x60]
call fcn.14000eb50
mov rdi, qword [rbp - 0x58]
test rdi, rdi
je 0x140004ac6
mov qword [rbp + 0x410], rsi
mov rcx, qword [rbp - 0x60]
mov rax, qword [rbp - 0x50]
mov qword [rbp + 0x3f0], rcx
mov qword [rbp + 0x3b8], rcx
mov qword [rbp + 0x3c0], rdi
mov qword [rbp + 0x3c8], rax
mov qword [rbp + 0x3f8], 0
mov qword [rbp + 0x400], 2
mov qword [rbp + 0x408], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x420], rax
xor eax, eax
mov qword [rbp + 0x428], rax
xor r14d, r14d
xor r13d, r13d
cmp r8, 0x201
jae 0x1400049f0
jmp 0x1400049e2
mov rdi, r15
jae 0x140004b33
cmp r8, 0x201
jae 0x1400049f0
lea r12, [rbp - 0x60]
mov esi, 0x200
mov rbx, r8
jmp 0x140004a56
sub r8, r13
sub r14, r13
cmp r14, r8
mov r14, qword [rbp + 0x428]
jae 0x140004a26
lea rcx, [rbp + 0x3f8]
mov rdx, r13
call fcn.14001dd70
mov r14, qword [rbp + 0x3f8]
mov rax, qword [rbp + 0x400]
mov qword [rbp + 0x420], rax
mov eax, 0xffffffff
cmp r14, rax
mov r13d, 0xffffffff
cmovb r13, r14
mov qword [rbp + 0x408], r13
mov rax, r14
mov qword [rbp + 0x428], r14
mov r12, qword [rbp + 0x420]
mov rsi, r13
mov rbx, r13
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r15, rdi
mov rcx, rdi
mov rdx, r12
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
jne 0x140004a84
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140004c75
mov r8d, edi
cmp rbx, r8
jne 0x1400049d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140004ca0
mov rdi, r15
add rbx, rbx
mov eax, 0xffffffff
cmp rbx, rax
cmovae rbx, rax
mov r8, rbx
cmp r8, 0x201
jb 0x1400049e2
jmp 0x1400049f0
mov rdx, qword [rbp - 0x60]
mov eax, edx
and eax, 3
cmp eax, 1
jne 0x140004b2a
lea rax, [rdx - 1]
mov qword [rbp + 0x428], rax
mov rcx, qword [rdx - 1]
mov qword [rbp + 0x420], rdx
mov rax, qword [rdx + 7]
call qword [rax]
mov rax, qword [rbp + 0x420]
mov rax, qword [rax + 7]
mov rdx, qword [rax + 8]
test rdx, rdx
mov rdi, qword [rbp + 0x428]
je 0x140004b17
mov r8, qword [rax + 0x10]
mov rcx, qword [rdi]
call fcn.140001320
mov edx, 0x18
mov r8d, 8
mov rcx, rdi
call fcn.140001320
mov byte [rsi + 0x18], 2
jmp 0x140004c5e
cmp rsi, r8
jb 0x140004cba
lea rcx, [rbp + 0x3d0]
mov rdx, r12
call fcn.140006920
mov r14, qword [rbp + 0x3d0]
movups xmm0, xmmword [rbp + 0x3d8]
movaps xmmword [rbp + 0x3a0], xmm0
movzx ebx, byte [rbp + 0x3e8]
mov eax, dword [rbp + 0x3e9]
mov dword [rbp + 0x418], eax
mov eax, dword [rbp + 0x3ec]
mov dword [rbp + 0x41b], eax
mov rdx, qword [rbp + 0x428]
test rdx, rdx
je 0x140004ba0
add rdx, rdx
mov r8d, 2
mov rcx, qword [rbp + 0x420]
call fcn.140001320
cmp bl, 2
jne 0x140004c17
mov rsi, qword [rbp + 0x410]
mov byte [rsi + 0x18], 2
mov eax, r14d
and eax, 3
cmp eax, 1
jne 0x140004c41
lea rax, [r14 - 1]
mov qword [rbp + 0x428], rax
mov rcx, qword [r14 - 1]
mov rax, qword [r14 + 7]
mov qword [rbp + 0x420], r14
call qword [rax]
mov rax, qword [rbp + 0x420]
mov rax, qword [rax + 7]
mov rdx, qword [rax + 8]
test rdx, rdx
mov rbx, qword [rbp + 0x428]
je 0x140004c02
mov r8, qword [rax + 0x10]
mov rcx, qword [rbx]
call fcn.140001320
mov edx, 0x18
mov r8d, 8
mov rcx, rbx
call fcn.140001320
jmp 0x140004c41
movaps xmm0, xmmword [rbp + 0x3a0]
mov rsi, qword [rbp + 0x410]
movups xmmword [rsi + 8], xmm0
mov eax, dword [rbp + 0x418]
mov ecx, dword [rbp + 0x41b]
mov dword [rsi + 0x19], eax
mov dword [rsi + 0x1c], ecx
mov qword [rsi], r14
mov byte [rsi + 0x18], bl
mov rdx, qword [rbp + 0x3f0]
test rdx, rdx
je 0x140004c5e
add rdx, rdx
mov r8d, 2
mov rcx, rdi
call fcn.140001320
mov rax, rsi
add rsp, 0x4b8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
shl r14, 0x20
or r14, 2
mov bl, 2
mov rdi, r15
mov rdx, qword [rbp + 0x428]
test rdx, rdx
jne 0x140004b8b
jmp 0x140004ba0
lea rcx, [0x14001f9a3]
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.14001e8c0
jmp 0x140004ccf
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, rsi
mov r8, rax
call fcn.14001ecb0
ud2