Function at 0x407410
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x854
mov eax, dword [0x425280]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 8], 0
je 0x4076bb
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00413c60
add esp, 0xc
call fcn.00404770
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 0x407497
xor ecx, ecx
push 0x5c
mov word [eax], cx
lea eax, [ebp - 0x210]
push ecx
push eax
call esi
test eax, eax
je 0x407497
xor ecx, ecx
mov word [eax + 2], cx
push 0x421ddc
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x4074bc
call fcn.00404770
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 0x4074e4
xor eax, eax
jmp 0x40752b
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], 0x422588
mov dword [ebp - 0x844], 0x50
mov dword [ebp - 0x840], 0x406ae0
mov dword [ebp - 0x838], 0x80
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov esi, eax
mov dword [ebp - 0x82c], esi
test esi, esi
je 0x407687
lea eax, [ebp - 0x620]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push 0x422598
lea eax, [ebp - 0x620]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x4076cc
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x416]
push eax
call fcn.00413c60
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 0x421ddc
push eax
call esi
mov ecx, dword [0x427368]
call fcn.00404b00
push eax
lea eax, [ebp - 0x418]
push eax
call esi
push 0x421ddc
lea eax, [ebp - 0x418]
push eax
call esi
lea eax, [ebp - 0x418]
push eax
mov eax, dword [0x427368]
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 0x421ddc
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 0x407681
push esi
push dword [edi + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [0x427368]
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 0x4076bb
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.0040fd4e
mov esp, ebp
pop ebp
ret
push 0x10
push 0x422074
push 0x42259c
push dword [edi + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x407687