Function at 0x18001d390
Capabilities:
Get common file path

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4a8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x420], 0xfffffffffffffffe
mov rsi, rcx
lea rdx, str.HOMEUSERPROFILElibrary_std_src_syspalwindowspath.rs
lea rcx, [rbp - 0x60]
mov r8d, 4
call sym.rt_dll.dll_std::env::_var_os::he1931d9c5134ff31
movabs rdi, 0x8000000000000000
cmp qword [rbp - 0x60], rdi
jne 0x18001d422
lea rdx, [0x18008865c]
lea rcx, [rbp + 0x3f0]
mov r8d, listen
call sym.rt_dll.dll_std::env::_var_os::he1931d9c5134ff31
mov rax, qword [rbp + 0x3f0]
cmp rax, rdi
je 0x18001d444
mov rcx, qword [rbp + 0x408]
mov qword [rsi + 0x18], rcx
movups xmm0, xmmword [rbp + 0x3f8]
movups xmmword [rsi + 8], xmm0
mov qword [rsi], rax
jmp 0x18001d6a7
movups xmm0, xmmword [rbp - 0x60]
movups xmm1, xmmword [rbp - 0x50]
movaps xmmword [rbp + 0x400], xmm1
movaps xmmword [rbp + 0x3f0], xmm0
mov rax, qword [rbp + 0x3f0]
cmp rax, rdi
jne 0x18001d404
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbp + 0x3e0], 0
lea r8, [rbp + 0x3e0]
mov rcx, rax
mov edx, 0x20008
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x18001d5fa
mov qword [rbp + 0x3e8], rsi
mov rax, qword [rbp + 0x3e0]
mov qword [rbp + 0x410], rax
mov qword [rbp + 0x3c8], 0
mov qword [rbp + 0x3d0], 2
mov qword [rbp + 0x3d8], 0
mov r8d, 0x200
mov eax, 2
mov qword [rbp + 0x418], rax
xor r14d, r14d
mov r15d, 0xffffffff
xor ebx, ebx
xor r12d, r12d
cmp r8, 0x201
jae 0x18001d500
jmp 0x18001d4ef
jae 0x18001d602
cmp r8, 0x201
jae 0x18001d500
mov esi, 0x200
lea rdi, [rbp - 0x60]
mov r13, r8
jmp 0x18001d553
sub r8, r12
sub rbx, r12
cmp rbx, r8
jae 0x18001d52f
lea rcx, [rbp + 0x3c8]
mov rdx, r12
call fcn.180080670
mov r14, qword [rbp + 0x3c8]
mov rax, qword [rbp + 0x3d0]
mov qword [rbp + 0x418], rax
cmp r14, r15
mov r12d, 0xffffffff
cmovb r12, r14
mov qword [rbp + 0x3d8], r12
mov rbx, r14
mov rsi, r12
mov rdi, qword [rbp + 0x418]
mov r13, r12
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rbp + 0x3f0], r13d
mov rcx, qword [rbp + 0x410]
mov rdx, rdi
lea r8, [rbp + 0x3f0]
call qword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
test eax, eax
je 0x18001d590
mov ecx, dword [rbp + 0x3f0]
dec ecx
test ecx, ecx
jne 0x18001d5c0
jmp 0x18001d5b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x18001d5b0
mov ecx, dword [rbp + 0x3f0]
test ecx, ecx
jne 0x18001d5c0
nop word cs:[rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
test eax, eax
jne 0x18001d6be
mov r8d, ecx
cmp r13, r8
jne 0x18001d4e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x18001d6f2
add r13, r13
cmp r13, r15
cmovae r13, r15
mov r8, r13
cmp r8, 0x201
jb 0x18001d4ef
jmp 0x18001d500
mov qword [rsi], rdi
jmp 0x18001d6a7
cmp rsi, r8
jb 0x18001d70c
lea rcx, [rbp + 0x3f0]
mov rdx, rdi
call sym.rt_dll.dll___std::ffi::os_str::OsString_as_std::os::windows::ffi::OsStringExt_::from_wide::h79c8d52da8dd9416
movups xmm0, xmmword [rbp + 0x3f0]
movups xmm1, xmmword [rbp + 0x400]
movaps xmmword [rbp + 0x3b0], xmm1
movaps xmmword [rbp + 0x3a0], xmm0
movabs rdi, 0x8000000000000000
test r14, r14
je 0x18001d65d
add r14, r14
mov r8d, 2
mov rcx, qword [rbp + 0x418]
mov rdx, r14
call sym.rt_dll.dll___rust_dealloc
cmp qword [rbp + 0x3a0], rdi
jne 0x18001d67e
mov rsi, qword [rbp + 0x3e8]
mov qword [rsi], rdi
lea rcx, [rbp + 0x3a8]
call fcn.180011920
jmp 0x18001d69a
movaps xmm0, xmmword [rbp + 0x3a0]
movaps xmm1, xmmword [rbp + 0x3b0]
mov rsi, qword [rbp + 0x3e8]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
mov rcx, qword [rbp + 0x410]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
add rsp, 0x4a8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp + 0x3a8], rax
movabs rdi, 0x8000000000000000
mov qword [rbp + 0x3a0], rdi
test r14, r14
jne 0x18001d645
jmp 0x18001d65d
lea rcx, str.internal_error:_entered_unreachable_code
lea r8, str.library_std_src_syspalwindowsmod.rs
mov edx, 0x28
call sym.rt_dll.dll_core::panicking::panic::hc78b6d0617c02f64
jmp 0x18001d721
lea rax, str.library_std_src_syspalwindowsmod.rs
mov rcx, r8
mov rdx, rsi
mov r8, rax
call sym.rt_dll.dll_core::slice::index::slice_end_index_len_fail::hb4e1554cec1567f2
ud2