Function at 0x140038240
Capabilities:
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x4a8
mov rsi, rcx
movabs rdi, 0x8000000000000000
lea rdx, str.HOMEUSERPROFILE
lea rcx, [rsp + 0xa8]
mov r8d, 4
call sym.std::sys::pal::windows::os::getenv::h0419814351800148
cmp qword [rsp + 0xa8], rdi
jne 0x1400382bf
lea rdx, [0x14010aba4]
lea rcx, [rsp + 0x30]
mov r8d, 0xb
call sym.std::sys::pal::windows::os::getenv::h0419814351800148
mov rax, qword [rsp + 0x30]
cmp rax, rdi
je 0x1400382e3
mov rcx, qword [rsp + 0x48]
mov qword [rsi + 0x18], rcx
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rsi + 8], xmm0
mov qword [rsi], rax
jmp 0x140038505
movups xmm0, xmmword [rsp + 0xa8]
movups xmm1, xmmword [rsp + 0xb8]
movaps xmmword [rsp + 0x40], xmm1
movaps xmmword [rsp + 0x30], xmm0
mov rax, qword [rsp + 0x30]
cmp rax, rdi
jne 0x1400382a5
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 0x140038468
mov qword [rsp + 0x58], rsi
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 2
mov qword [rsp + 0x78], 0
mov r8d, 0x200
mov r15d, 2
xor r12d, r12d
mov esi, 0xffffffff
xor ebx, ebx
xor r13d, r13d
cmp r8, 0x201
jae 0x140038390
jmp 0x14003836f
jae 0x140038470
cmp r8, 0x201
jae 0x140038390
mov edi, 0x200
lea r14, [rsp + 0xa8]
mov rbp, r8
jmp 0x1400383d0
sub r8, r13
sub rbx, r13
cmp rbx, r8
jae 0x1400383b2
lea rcx, [rsp + 0x68]
mov rdx, r13
call sym.alloc::raw_vec::RawVec_T_A_::reserve::do_reserve_and_handle::h51d69f985e1537f9
mov r12, qword [rsp + 0x68]
mov r15, qword [rsp + 0x70]
cmp r12, rsi
mov r13d, 0xffffffff
cmovb r13, r12
mov qword [rsp + 0x78], r13
mov rbx, r12
mov rdi, r13
mov r14, r15
mov rbp, r13
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov dword [rsp + 0x30], ebp
mov rcx, qword [rsp + 0x28]
mov rdx, r14
lea r8, [rsp + 0x30]
call sub.USERENV.dll_GetUserProfileDirectoryW
test eax, eax
je 0x140038400
mov ecx, dword [rsp + 0x30]
dec ecx
test ecx, ecx
jne 0x14003842f
jmp 0x140038420
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x140038420
mov ecx, dword [rsp + 0x30]
test ecx, ecx
jne 0x14003842f
nop word cs:[rax + rax]
call sub.KERNEL32.dll_GetLastError
xor ecx, ecx
test eax, eax
jne 0x14003851c
mov r8d, ecx
cmp rbp, r8
jne 0x140038360
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x140038556
add rbp, rbp
cmp rbp, rsi
cmovae rbp, rsi
mov r8, rbp
cmp r8, 0x201
jb 0x14003836f
jmp 0x140038390
mov qword [rsi], rdi
jmp 0x140038505
cmp rdi, r8
jb 0x140038570
lea rcx, [rsp + 0x30]
mov rdx, r14
call sym.std::sys_common::wtf8::Wtf8Buf::from_wide::h1951e04b76830527
movabs rdi, 0x8000000000000000
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movaps xmmword [rsp + 0x90], xmm1
movaps xmmword [rsp + 0x80], xmm0
mov rsi, qword [rsp + 0x58]
test r12, r12
je 0x1400384c8
add r12, r12
mov r8d, 2
mov rcx, r15
mov rdx, r12
call sym.__rust_dealloc
cmp qword [rsp + 0x80], rdi
jne 0x1400384e4
mov qword [rsi], rdi
lea rcx, [rsp + 0x88]
call sym._ZN4core3ptr42drop_in_place_LT_std..io..error..Error_GT_17h14cde6b578e19753E.llvm.11506732742244318735
jmp 0x1400384fb
movaps xmm0, xmmword [rsp + 0x80]
movaps xmm1, xmmword [rsp + 0x90]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
mov rcx, qword [rsp + 0x28]
call fcn.14009441c
mov rax, rsi
add rsp, 0x4a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x88], rax
movabs rdi, 0x8000000000000000
mov qword [rsp + 0x80], rdi
mov rsi, qword [rsp + 0x58]
test r12, r12
jne 0x1400384b4
jmp 0x1400384c8
lea rcx, str.internal_error:_entered_unreachable_codeA_HandleOrNull_could_not_be_converted_to_a_handle_because_it_was_nullA_HandleOrInvalid_could_not_be_converted_to_a_handle_because_it_was_INVALID_HANDLE_VALUEBorrowedHandlehandle
lea r8, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov edx, 0x28
call sym.core::panicking::panic::hd174330580e7869e
jmp 0x140038585
lea rax, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, rdi
mov r8, rax
call sym.core::slice::index::slice_end_index_len_fail::h28c5568a35fadd59
ud2