Function at 0x4850c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e05b0
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x5203c4]
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]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x250], esi
mov dword [ebp - 0x22c], 0
xor eax, eax
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov dword [ebp - 4], 1
mov word [esi], ax
push 0x400
mov dword [ebp - 0x22c], 1
call fcn.0048aa10
add esp, 4
test eax, eax
je 0x485308
mov dword [ebp - 0x21c], 0
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 2
push eax
push 0x4e75d0
push 0x17
push 0
push 0x4e7578
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x4852eb
mov eax, dword [ebp - 0x21c]
push 0x4e7588
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 - 0x220], 0
push str.SHCreateItemFromParsingName
push str.shell32.dll
mov byte [ebp - 4], 3
call fcn.00484200
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
mov eax, dword [ebp + 0x10]
cmp dword [eax - 0xc], 0
je 0x4851f3
test edi, edi
je 0x485251
lea ecx, [ebp - 0x220]
push ecx
push 0x4e5bfc
push 0
push eax
call edi
test eax, eax
js 0x485251
mov eax, dword [ebp - 0x21c]
push dword [ebp - 0x220]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
jmp 0x485251
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004ad7b0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 8
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x485251
test edi, edi
je 0x485251
lea eax, [ebp - 0x220]
push eax
push 0x4e5bfc
push 0
lea eax, [ebp - 0x218]
push eax
call edi
test eax, eax
js 0x485251
mov eax, dword [ebp - 0x21c]
push dword [ebp - 0x220]
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 - 0x228], 0
mov eax, dword [ebp - 0x21c]
lea edx, [ebp - 0x228]
push edx
push eax
mov byte [ebp - 4], 4
mov ecx, dword [eax]
call dword [ecx + 0x50]
test eax, eax
js 0x4852c3
mov eax, dword [ebp - 0x228]
lea edx, [ebp - 0x224]
push edx
mov dword [ebp - 0x224], 0
push 0x80058000
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x4852c3
push eax
mov ecx, esi
call fcn.00408e20
push dword [ebp - 0x224]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x228]
mov byte [ebp - 4], 3
test eax, eax
je 0x4852d7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 2
test eax, eax
je 0x4852eb
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x21c]
mov byte [ebp - 4], 1
test eax, eax
je 0x4853ae
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x4853ae
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004ad7b0
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 0x485386
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x485386
push edi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x485390
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00408d10
mov eax, dword [ebp + 0x10]
or ecx, 0xffffffff
mov byte [ebp - 4], 0
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4853cd
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
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.004a8e4e
mov esp, ebp
pop ebp
ret