Function at 0x408240
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 0x4084eb
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00417440
add esp, 0xc
call fcn.00405410
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 0x4082c7
xor ecx, ecx
push 0x5c
mov word [eax], cx
lea eax, [ebp - 0x210]
push ecx
push eax
call esi
test eax, eax
je 0x4082c7
xor ecx, ecx
mov word [eax + 2], cx
push 0x425e18
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x4082ec
call fcn.00405410
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 0x408314
xor eax, eax
jmp 0x40835b
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], 0x4266a0
mov dword [ebp - 0x844], 0x50
mov dword [ebp - 0x840], 0x407910
mov dword [ebp - 0x838], 0x80
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov esi, eax
mov dword [ebp - 0x82c], esi
test esi, esi
je 0x4084b7
lea eax, [ebp - 0x620]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push 0x4266b0
lea eax, [ebp - 0x620]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x4084fc
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x416]
push eax
call fcn.00417440
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 0x425e18
push eax
call esi
mov ecx, dword [0x42d670]
call fcn.004058a0
push eax
lea eax, [ebp - 0x418]
push eax
call esi
push 0x425e18
lea eax, [ebp - 0x418]
push eax
call esi
lea eax, [ebp - 0x418]
push eax
mov eax, dword [0x42d670]
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 0x425e18
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 0x4084b1
push esi
push dword [edi + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [0x42d670]
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 0x4084eb
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.00410bce
mov esp, ebp
pop ebp
ret
push 0x10
push 0x426184
push 0x4266b4
push dword [edi + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4084b7