Function at 0x140039fa0
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 qword [rsp + 0x70], rdx
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], 2
mov qword [rsp + 0x48], 0
mov r8d, 0x200
mov eax, 2
mov qword [rsp + 0x28], rax
xor ebx, ebx
mov r15d, 0xffffffff
xor esi, esi
xor r13d, r13d
cmp r8, 0x201
jae 0x14003a030
jmp 0x14003a00f
jae 0x14003a0d5
cmp r8, 0x201
jae 0x14003a030
mov r14d, 0x200
lea rbp, [rsp + 0x98]
mov r12, r8
jmp 0x14003a077
sub r8, r13
sub rsi, r13
cmp rsi, r8
jae 0x14003a057
lea rcx, [rsp + 0x38]
mov rdx, r13
call sym.alloc::raw_vec::RawVec_T_A_::reserve::do_reserve_and_handle::h51d69f985e1537f9
mov rbx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x28], rax
cmp rbx, r15
mov r13d, 0xffffffff
cmovb r13, rbx
mov qword [rsp + 0x48], r13
mov rsi, rbx
mov r14, r13
mov rbp, qword [rsp + 0x28]
mov r12, r13
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov rcx, rbp
mov edx, r12d
call sub.KERNEL32.dll_GetWindowsDirectoryW
mov edi, eax
test eax, eax
jne 0x14003a09c
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x14003a1b4
mov r8d, edi
cmp r12, r8
jne 0x14003a000
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x14003a1de
add r12, r12
cmp r12, r15
cmovae r12, r15
mov r8, r12
cmp r8, 0x201
jb 0x14003a00f
jmp 0x14003a030
cmp r14, r8
jb 0x14003a1f8
mov rax, qword [rsp + 0x70]
mov rdi, qword [rax]
mov rsi, qword [rax + 8]
lea rcx, [rsp + 0x78]
mov rdx, rbp
call sym.std::sys_common::wtf8::Wtf8Buf::from_wide::h1951e04b76830527
movups xmm0, xmmword [rsp + 0x78]
movups xmm1, xmmword [rsp + 0x88]
movaps xmmword [rsp + 0x60], xmm1
movaps xmmword [rsp + 0x50], xmm0
mov rdx, qword [rdi]
mov r8, qword [rdi + 8]
lea rcx, [rsp + 0x50]
call sym.std::path::PathBuf::_push::hee4595af283eb3af
cmp byte [rsi], 0
jne 0x14003a13b
lea rdx, [0x14010abc8]
lea rcx, [rsp + 0x50]
mov r8d, 3
call sym.std::path::PathBuf::_set_extension::h31e3fba0edcddc86
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x60]
lea rcx, [rsp + 0x78]
call sym.std::sys::pal::windows::process::program_exists::h11e3ebd022fc0de2
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x14003a169
mov rcx, qword [rsp + 0x58]
mov r8d, 1
call sym.__rust_dealloc
mov rax, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x30]
mov qword [rsi + 0x10], rax
movups xmm0, xmmword [rsp + 0x78]
movups xmmword [rsi], xmm0
test rbx, rbx
je 0x14003a19d
add rbx, rbx
mov r8d, 2
mov rcx, qword [rsp + 0x28]
mov rdx, rbx
call sym.__rust_dealloc
mov rax, rsi
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
shl rax, 0x20
or rax, 2
mov rsi, qword [rsp + 0x30]
mov qword [rsi + 8], rax
movabs rax, 0x8000000000000001
mov qword [rsi], rax
test rbx, rbx
jne 0x14003a187
jmp 0x14003a19d
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 0x14003a20d
lea rax, str.library_std_src_syspalwindowsmod.rsstrings_passed_to_WinAPI_cannot_contain_NULs
mov rcx, r8
mov rdx, r14
mov r8, rax
call sym.core::slice::index::slice_end_index_len_fail::h28c5568a35fadd59
ud2