Function at 0x140049820
Capabilities:
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x498
mov rbp, rcx
lea rdx, str.HOMEUSERPROFILE_library_std_src_syswindowspath.rs
lea rcx, [rsp + 0x98]
mov r8d, 4
call dbg._var_os
cmp byte [rsp + 0xb0], 2
jne 0x1400498a2
lea rdx, [0x1400f220c]
lea rcx, [rsp + 0x30]
mov r8d, 0xb
call dbg._var_os
movzx eax, byte [rsp + 0x48]
cmp al, 2
je 0x1400498c5
mov rcx, qword [rsp + 0x40]
mov qword [rbp + 0x10], rcx
movaps xmm0, xmmword [rsp + 0x30]
movups xmmword [rbp], xmm0
mov ecx, dword [rsp + 0x49]
mov edx, dword [rsp + 0x4c]
mov dword [rbp + 0x19], ecx
mov dword [rbp + 0x1c], edx
mov byte [rbp + 0x18], al
jmp 0x140049b1b
movups xmm0, xmmword [rsp + 0x98]
movups xmm1, xmmword [rsp + 0xa8]
movaps xmmword [rsp + 0x40], xmm1
movaps xmmword [rsp + 0x30], xmm0
movzx eax, byte [rsp + 0x48]
cmp al, 2
jne 0x14004987a
call sub.KERNEL32.dll_GetCurrentProcess
mov qword [rsp + 0x60], 0
lea r8, [rsp + 0x60]
mov rcx, rax
mov edx, 0x20008
call sub.ADVAPI32.dll_OpenProcessToken
test eax, eax
je 0x140049a38
mov qword [rsp + 0x58], rbp
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 2
mov qword [rsp + 0x78], 0
mov r8d, 0x200
mov edi, 2
xor r12d, r12d
mov r14d, 0xffffffff
xor ebx, ebx
xor r13d, r13d
cmp r8, 0x201
jae 0x1400499f3
jmp 0x140049953
jae 0x140049a41
cmp r8, 0x201
jae 0x1400499f3
lea r15, [rsp + 0x98]
mov esi, 0x200
mov rbp, r8
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov dword [rsp + 0x30], ebp
mov rcx, qword [rsp + 0x50]
mov rdx, r15
lea r8, [rsp + 0x30]
call sub.USERENV.dll_GetUserProfileDirectoryW
test eax, eax
je 0x140049990
mov ecx, dword [rsp + 0x30]
dec ecx
test ecx, ecx
jne 0x1400499bf
jmp 0x1400499b0
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x1400499b0
mov ecx, dword [rsp + 0x30]
test ecx, ecx
jne 0x1400499bf
nop word cs:[rax + rax]
call sub.KERNEL32.dll_GetLastError
xor ecx, ecx
test eax, eax
jne 0x140049b32
mov r8d, ecx
cmp rbp, r8
jne 0x140049940
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x140049b51
add rbp, rbp
cmp rbp, r14
cmovae rbp, r14
mov r8, rbp
cmp r8, 0x201
jb 0x140049953
sub r8, r13
sub rbx, r13
cmp rbx, r8
jae 0x140049a15
lea rcx, [rsp + 0x68]
mov rdx, r13
call sym.alloc::raw_vec::RawVec_T_A_::reserve::do_reserve_and_handle::h3ffee1938298280a
mov r12, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x70]
cmp r12, r14
mov r13d, 0xffffffff
cmovb r13, r12
mov qword [rsp + 0x78], r13
mov rbx, r12
mov r15, rdi
mov rsi, r13
mov rbp, r13
jmp 0x140049963
mov byte [rbp + 0x18], 2
jmp 0x140049b1b
cmp rsi, r8
jb 0x140049b6b
lea rcx, [rsp + 0x30]
mov rdx, r15
call dbg.from_wide
mov rsi, qword [rsp + 0x30]
movups xmm0, xmmword [rsp + 0x38]
movaps xmmword [rsp + 0x80], xmm0
movzx ebx, byte [rsp + 0x48]
mov eax, dword [rsp + 0x49]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x2b], eax
test r12, r12
je 0x140049a97
add r12, r12
mov r8d, 2
mov rcx, rdi
mov rdx, r12
call sym.__rust_dealloc
cmp bl, 2
jne 0x140049aeb
mov rbp, qword [rsp + 0x58]
mov byte [rbp + 0x18], 2
mov eax, esi
and eax, 3
cmp eax, 1
jne 0x140049b11
lea rdi, [rsi - 1]
mov rcx, qword [rsi - 1]
mov rax, qword [rsi + 7]
call qword [rax]
mov rax, qword [rsi + 7]
mov rdx, qword [rax + 8]
test rdx, rdx
je 0x140049ad6
mov r8, qword [rax + 0x10]
mov rcx, qword [rdi]
call sym.__rust_dealloc
mov edx, 0x18
mov r8d, 8
mov rcx, rdi
call sym.__rust_dealloc
jmp 0x140049b11
movaps xmm0, xmmword [rsp + 0x80]
mov rbp, qword [rsp + 0x58]
movups xmmword [rbp + 8], xmm0
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x2b]
mov dword [rbp + 0x19], eax
mov dword [rbp + 0x1c], ecx
mov qword [rbp], rsi
mov byte [rbp + 0x18], bl
mov rcx, qword [rsp + 0x50]
call fcn.1400e24b4
mov rax, rbp
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 esi, eax
shl rsi, 0x20
or rsi, 2
mov bl, 2
test r12, r12
jne 0x140049a83
jmp 0x140049a97
lea rcx, str.internal_error:_entered_unreachable_code
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call dbg.panic
jmp 0x140049b80
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, rsi
mov r8, rax
call dbg.slice_end_index_len_fail
ud2