Function at 0x51c610
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x448
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x454]
mov edx, str.HOMEUSERPROFILE_library_std_src_syswindowspath.rs
push 4
call dbg._var_os
add esp, 4
cmp byte [ebp - 0x448], 2
jne 0x51c67f
lea ecx, [ebp - 0x2c]
mov edx, 0x5bbbc8
push 0xb
call dbg._var_os
add esp, 4
movzx eax, byte [ebp - 0x20]
cmp al, 2
je 0x51c6a1
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x18]
movsd xmm0, qword [ebp - 0x2c]
movzx esi, word [ebp - 0x1f]
mov ah, byte [ebp - 0x1d]
mov dword [edx + 8], ecx
movsd qword [edx], xmm0
mov word [edx + 0xd], si
mov byte [edx + 0xf], ah
mov byte [edx + 0xc], al
jmp 0x51c885
movsd xmm0, qword [ebp - 0x454]
movsd xmm1, qword [ebp - 0x44c]
movsd qword [ebp - 0x24], xmm1
movsd qword [ebp - 0x2c], xmm0
movzx eax, byte [ebp - 0x20]
cmp al, 2
jne 0x51c657
call sub.kernel32.dll_GetCurrentProcess
mov dword [ebp - 0x34], 0
lea ecx, [ebp - 0x34]
push ecx
push 0x20008
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
je 0x51c808
mov eax, dword [ebp - 0x34]
mov esi, 0x200
xor edi, edi
mov dword [ebp - 0x40], 2
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x14], 2
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x1c], eax
cmp esi, 0x201
jae 0x51c7d3
jmp 0x51c725
mov edi, dword [ebp - 0x10]
jbe 0x51c811
cmp esi, 0x201
jae 0x51c7d3
lea eax, [ebp - 0x454]
mov dword [ebp - 0x10], edi
mov edi, esi
mov ebx, 0x200
mov esi, eax
push 0
call sub.kernel32.dll_SetLastError
mov dword [ebp - 0x2c], edi
lea eax, [ebp - 0x2c]
push eax
push esi
push dword [ebp - 0x1c]
call sub.userenv.dll_GetUserProfileDirectoryW
test eax, eax
mov dword [ebp - 0x54], esi
je 0x51c770
mov esi, dword [ebp - 0x2c]
dec esi
mov edx, ebx
test esi, esi
jne 0x51c7a1
jmp 0x51c790
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x51c790
mov esi, dword [ebp - 0x2c]
mov edx, ebx
test esi, esi
jne 0x51c7a1
nop word cs:[eax + eax]
nop dword [eax]
call sub.kernel32.dll_GetLastError
xor esi, esi
mov edx, ebx
test eax, eax
jne 0x51c890
cmp esi, edi
jne 0x51c710
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x51c8a9
lea esi, [edi + edi]
test edi, edi
mov edi, dword [ebp - 0x10]
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x51c725
mov eax, dword [ebp - 0x30]
sub esi, edi
sub eax, edi
cmp eax, esi
jae 0x51c7f5
mov edx, edi
lea ecx, [ebp - 0x40]
push esi
call dbg.do_reserve_and_handle<core::mem::maybe_uninit::MaybeUninit<u16>, alloc::alloc::Global>
add esp, 4
mov eax, dword [ebp - 0x40]
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0x14], eax
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], edi
mov ebx, edi
mov dword [ebp - 0x10], edi
jmp 0x51c737
mov eax, dword [ebp - 0x18]
mov byte [eax + 0xc], 2
jmp 0x51c885
cmp esi, edx
ja 0x51c8c2
mov edx, dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
push esi
call dbg.from_wide
add esp, 4
movsd xmm0, qword [ebp - 0x2c]
movsd xmm1, qword [ebp - 0x24]
movsd qword [ebp - 0x48], xmm1
movsd qword [ebp - 0x50], xmm0
test edi, edi
je 0x51c850
push dword [ebp - 0x14]
push 0
push dword [0x5da100]
call sub.kernel32.dll_HeapFree
cmp byte [ebp - 0x44], 2
jne 0x51c867
mov eax, dword [ebp - 0x18]
mov byte [eax + 0xc], 2
lea ecx, [ebp - 0x50]
call dbg.drop_in_place<core::result::Result<std::path::PathBuf, std::io::error::Error>>
jmp 0x51c87d
movsd xmm0, qword [ebp - 0x50]
mov eax, dword [ebp - 0x18]
movsd xmm1, qword [ebp - 0x48]
movsd qword [eax + 8], xmm1
movsd qword [eax], xmm0
push dword [ebp - 0x1c]
call sub.kernel32.dll_CloseHandle
add esp, 0x448
pop esi
pop edi
pop ebx
pop ebp
ret
call sub.kernel32.dll_GetLastError
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x50], 0
mov dword [ebp - 0x4c], eax
mov byte [ebp - 0x44], 2
test edi, edi
jne 0x51c840
jmp 0x51c850
mov edx, 0x28
mov ecx, str.internal_error:_entered_unreachable_codeC:UsersTEST.cargo_registry_srcindex.crates.io_6f17d22bba15001f_rayon_core_1.11.0_srcjob.rs
push 0x5bc2ac
call dbg.panic
add esp, 4
jmp 0x51c8d1
mov ecx, esi
push 0x5bc2bc
call dbg.slice_end_index_len_fail
add esp, 4
ud2