Function at 0x1800313e0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x498
mov rbx, rcx
lea rcx, [rsp + 0x98]
call fcn.180017890
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x18003154b
mov qword [rsp + 0x38], rbx
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 2
mov qword [rsp + 0x58], 0
mov r8d, 0x200
mov eax, 2
mov qword [rsp + 0x20], rax
xor edi, edi
mov esi, 0xffffffff
xor ebx, ebx
xor r15d, r15d
cmp r8, 0x201
jae 0x1800314a0
jmp 0x18003147f
jae 0x180031598
cmp r8, 0x201
jae 0x1800314a0
lea r12, [rsp + 0x98]
mov r13d, 0x200
mov rbp, r8
jmp 0x1800314e7
sub r8, r15
sub rbx, r15
cmp rbx, r8
jae 0x1800314c7
lea rcx, [rsp + 0x48]
mov rdx, r15
call fcn.180017d20
mov rdi, qword [rsp + 0x48]
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
cmp rdi, rsi
mov r15d, 0xffffffff
cmovb r15, rdi
mov qword [rsp + 0x58], r15
mov rbx, rdi
mov r12, qword [rsp + 0x20]
mov r13, r15
mov rbp, r15
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov rcx, qword [rsp + 0x30]
mov rdx, r12
mov r8d, ebp
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov r14d, eax
test eax, eax
jne 0x180031512
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x180031686
mov r8d, r14d
cmp rbp, r8
jne 0x180031470
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x1800316a5
add rbp, rbp
cmp rbp, rsi
cmovae rbp, rsi
mov r8, rbp
cmp r8, 0x201
jb 0x18003147f
jmp 0x1800314a0
mov rdi, qword [rsp + 0x98]
mov eax, edi
and eax, 3
cmp eax, 1
jne 0x18003158f
lea rsi, [rdi - 1]
mov rcx, qword [rdi - 1]
mov rax, qword [rdi + 7]
call qword [rax]
mov rax, qword [rdi + 7]
cmp qword [rax + 8], 0
je 0x180031582
mov rdx, qword [rax + 0x10]
mov rcx, qword [rsi]
call fcn.180004ff0
mov edx, 8
mov rcx, rsi
call fcn.180004ff0
mov byte [rbx + 0x18], 2
jmp 0x180031671
cmp r13, r8
jb 0x1800316bf
lea rcx, [rsp + 0x60]
mov rdx, r12
call fcn.180018b90
mov rbp, qword [rsp + 0x60]
movups xmm0, xmmword [rsp + 0x68]
movaps xmmword [rsp + 0x80], xmm0
movzx ebx, byte [rsp + 0x78]
mov eax, dword [rsp + 0x79]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x7c]
mov dword [rsp + 0x2b], eax
test rdi, rdi
je 0x1800315e9
mov edx, 2
mov rcx, qword [rsp + 0x20]
call fcn.180004ff0
cmp bl, 2
jne 0x180031635
mov rax, qword [rsp + 0x38]
mov byte [rax + 0x18], 2
mov eax, ebp
and eax, 3
cmp eax, 1
jne 0x18003165a
lea rdi, [rbp - 1]
mov rcx, qword [rbp - 1]
mov rax, qword [rbp + 7]
call qword [rax]
mov rax, qword [rbp + 7]
cmp qword [rax + 8], 0
je 0x180031626
mov rdx, qword [rax + 0x10]
mov rcx, qword [rdi]
call fcn.180004ff0
mov edx, 8
mov rcx, rdi
call fcn.180004ff0
jmp 0x18003165a
movaps xmm0, xmmword [rsp + 0x80]
mov rdx, qword [rsp + 0x38]
movups xmmword [rdx + 8], xmm0
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x2b]
mov dword [rdx + 0x19], eax
mov dword [rdx + 0x1c], ecx
mov qword [rdx], rbp
mov byte [rdx + 0x18], bl
cmp qword [rsp + 0x40], 0
je 0x180031671
mov edx, 2
mov rcx, qword [rsp + 0x30]
call fcn.180004ff0
nop
add rsp, 0x498
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call sub.KERNEL32.dll_GetLastError
mov ebp, eax
shl rbp, 0x20
or rbp, 2
mov bl, 2
test rdi, rdi
jne 0x1800315da
jmp 0x1800315e9
lea rcx, str.internal_error:_entered_unreachable_code_t
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.1800085e0
jmp 0x1800316d4
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, r13
mov r8, rax
call fcn.180008150
ud2