Function at 0x405a00
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x539023
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x58d984]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor eax, eax
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x250], esi
mov dword [ebp - 0x22c], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
push 0x400
mov dword [ebp - 4], eax
mov dword [ebp - 0x22c], 1
call fcn.00417fc0
add esp, 4
test eax, eax
je 0x405c3f
mov dword [ebp - 0x21c], 0
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 2
push eax
push 0x545ac0
push 0x17
push 0
push 0x5458c8
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x405c1f
mov eax, dword [ebp - 0x21c]
push 0x5458d8
push eax
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 0x21c]
push 0x20
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov dword [ebp - 0x228], 0
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 4
push 0
push eax
call fcn.0050ce60
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push dword [ebp + 0x10]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x405b85
mov eax, dword fs:[0x2c]
mov ecx, dword [0x59ab48]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x5971bc]
cmp eax, dword [ecx + 0x3c]
jg 0x405ce9
movzx eax, byte [0x5971b8]
neg eax
sbb eax, eax
and eax, 0x800
push eax
push 0
push 0x54571c
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push str.SHCreateItemFromParsingName
push eax
call edi
test eax, eax
je 0x405b85
lea ecx, [ebp - 0x228]
push ecx
push 0x544c0c
push 0
lea ecx, [ebp - 0x218]
push ecx
call eax
test eax, eax
js 0x405b85
mov eax, dword [ebp - 0x21c]
push dword [ebp - 0x228]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x21c]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov dword [ebp - 0x224], 0
mov eax, dword [ebp - 0x21c]
lea edx, [ebp - 0x224]
push edx
push eax
mov byte [ebp - 4], 6
mov ecx, dword [eax]
call dword [ecx + 0x50]
test eax, eax
js 0x405bf7
mov eax, dword [ebp - 0x224]
lea edx, [ebp - 0x220]
push edx
mov dword [ebp - 0x220], 0
push 0x80058000
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x405bf7
push eax
mov ecx, esi
call fcn.00405080
push dword [ebp - 0x220]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x224]
mov byte [ebp - 4], 7
test eax, eax
je 0x405c0b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x228]
mov byte [ebp - 4], 8
test eax, eax
je 0x405c1f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 4], 9
test ecx, ecx
je 0x405ccb
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
jmp 0x405ccb
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0050ce60
xor eax, eax
mov dword [ebp - 0x24c], ebx
mov dword [ebp - 0x248], eax
add esp, 0xc
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x244], eax
lea eax, [ebp - 0x24c]
push eax
mov dword [ebp - 0x23c], 3
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov edi, eax
test edi, edi
je 0x405cbd
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x405cbd
push edi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
call fcn.00405080
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004eda39
mov esp, ebp
pop ebp
ret
push 0x5971bc
call fcn.004ed945
add esp, 4
cmp dword [0x5971bc], 0xffffffff
jne 0x405b2e
push str.AddDllDirectory
push 0x545690
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call edi
test eax, eax
push 0x5971bc
setne byte [0x5971b8]
call fcn.004ed8fb
add esp, 4
jmp 0x405b2e