Function at 0x405a3a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x854
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
cmp dword [edi + 8], esi
je 0x405c8c
xor eax, eax
push 0x206
mov word [ebp - 0x238], ax
lea eax, [ebp - 0x236]
push esi
push eax
call fcn.0040e740
add esp, 0xc
call fcn.00402f5d
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
lea eax, [ebp - 0x238]
push eax
call ebx
push 0x5c
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_StrRChrIW]
lea eax, [ebp - 0x238]
push eax
call esi
test eax, eax
je 0x405ab7
xor ecx, ecx
push 0x5c
mov word [eax], cx
push ecx
lea eax, [ebp - 0x238]
push eax
call esi
test eax, eax
je 0x405ab7
xor ecx, ecx
mov word [eax + 2], cx
push 0x418d78
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x405adc
call fcn.00402f5d
push eax
lea eax, [ebp - 0x238]
push eax
call ebx
mov eax, dword [edi + 8]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0xc]
xor esi, esi
push eax
mov dword [ebp - 0xc], esi
call dword [sym.imp.SHELL32.dll_SHGetDesktopFolder]
test eax, eax
jns 0x405af9
mov eax, esi
jmp 0x405b29
mov eax, dword [ebp - 0xc]
push esi
lea edx, [ebp - 4]
push edx
push esi
lea edx, [ebp - 0x238]
push edx
push esi
mov dword [ebp - 4], esi
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0xc]
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ecx]
mov esi, eax
call dword [edx + 8]
mov eax, dword [ebp - 4]
xor ecx, ecx
test esi, esi
cmovs eax, ecx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x648]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x238]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x20], 0x419540
mov dword [ebp - 0x1c], 0x50
mov dword [ebp - 0x18], 0x4050f1
mov dword [ebp - 0x10], 0x80
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
je 0x405c67
lea eax, [ebp - 0x648]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push 0x419550
lea eax, [ebp - 0x648]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x405c91
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x440], ax
lea eax, [ebp - 0x43e]
push eax
call fcn.0040e740
add esp, 0xc
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x440]
push eax
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x418d78
lea eax, [ebp - 0x440]
push eax
call esi
mov ecx, dword [0x41edd4]
call fcn.004031d9
push eax
lea eax, [ebp - 0x440]
push eax
call esi
push 0x418d78
lea eax, [ebp - 0x440]
push eax
call esi
lea eax, [ebp - 0x440]
push eax
mov eax, dword [0x41edd4]
push dword [eax + 4]
call ebx
push 0
push 2
lea eax, [ebp - 0x850]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x418d78
lea eax, [ebp - 0x850]
push eax
call esi
lea eax, [ebp - 0x850]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [ebp - 0x440]
lea esi, [esi + eax*2]
test esi, esi
je 0x405c64
push esi
push dword [edi + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [0x41edd4]
push esi
push dword [eax + 8]
call ebx
mov esi, dword [ebp - 4]
and dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
js 0x405c8c
mov eax, dword [ebp - 8]
push esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
pop edi
pop esi
pop ebx
leave
ret
push 0x10
push 0x418f68
push 0x419554
push dword [edi + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x405c67