Function at 0x408220
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x854
mov eax, dword [0x429280]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 8], 0
je 0x4084cb
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.004173f0
add esp, 0xc
call fcn.00405430
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
lea eax, [ebp - 0x210]
push eax
call ebx
mov esi, dword [sym.imp.SHLWAPI.dll_StrRChrIW]
lea eax, [ebp - 0x210]
push 0x5c
push 0
push eax
call esi
test eax, eax
je 0x4082a7
xor ecx, ecx
push 0x5c
mov word [eax], cx
lea eax, [ebp - 0x210]
push ecx
push eax
call esi
test eax, eax
je 0x4082a7
xor ecx, ecx
mov word [eax + 2], cx
push 0x425db0
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x4082cc
call fcn.00405430
push eax
lea eax, [ebp - 0x210]
push eax
call ebx
mov eax, dword [edi + 8]
mov dword [ebp - 0x854], eax
lea eax, [ebp - 0x830]
push eax
mov dword [ebp - 0x830], 0
call dword [sym.imp.SHELL32.dll_SHGetDesktopFolder]
test eax, eax
jns 0x4082f4
xor eax, eax
jmp 0x40833b
mov eax, dword [ebp - 0x830]
lea edx, [ebp - 0x82c]
push 0
push edx
push 0
lea edx, [ebp - 0x210]
mov dword [ebp - 0x82c], 0
mov ecx, dword [eax]
push edx
push 0
push 0
push eax
call dword [ecx + 0xc]
mov ecx, dword [ebp - 0x830]
mov esi, eax
push ecx
mov edx, dword [ecx]
call dword [edx + 8]
mov eax, dword [ebp - 0x82c]
xor ecx, ecx
test esi, esi
cmovs eax, ecx
mov dword [ebp - 0x850], eax
lea eax, [ebp - 0x620]
mov dword [ebp - 0x84c], eax
lea eax, [ebp - 0x210]
mov dword [ebp - 0x83c], eax
lea eax, [ebp - 0x854]
push eax
mov dword [ebp - 0x848], 0x426608
mov dword [ebp - 0x844], 0x50
mov dword [ebp - 0x840], 0x4078e0
mov dword [ebp - 0x838], 0x80
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov esi, eax
mov dword [ebp - 0x82c], esi
test esi, esi
je 0x408497
lea eax, [ebp - 0x620]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push 0x426618
lea eax, [ebp - 0x620]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x4084dc
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x416]
push eax
call fcn.004173f0
add esp, 0xc
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x418]
push eax
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x418]
push 0x425db0
push eax
call esi
mov ecx, dword [0x42b470]
call fcn.00405870
push eax
lea eax, [ebp - 0x418]
push eax
call esi
push 0x425db0
lea eax, [ebp - 0x418]
push eax
call esi
lea eax, [ebp - 0x418]
push eax
mov eax, dword [0x42b470]
push dword [eax + 4]
call ebx
push 0
push 2
lea eax, [ebp - 0x828]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x425db0
lea eax, [ebp - 0x828]
push eax
call esi
lea eax, [ebp - 0x828]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [ebp - 0x418]
lea esi, [esi + eax*2]
test esi, esi
je 0x408491
push esi
push dword [edi + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [0x42b470]
push esi
push dword [eax + 8]
call ebx
mov esi, dword [ebp - 0x82c]
lea eax, [ebp - 0x834]
mov dword [ebp - 0x834], 0
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
js 0x4084cb
mov eax, dword [ebp - 0x834]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x834]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410c0e
mov esp, ebp
pop ebp
ret
push 0x10
push 0x426118
push 0x42661c
push dword [edi + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x408497