Function at 0x5855c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5affd5
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x614040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, edx
mov dword [ebp - 0x20], eax
mov edi, ecx
mov dword [ebp - 0x2c], edi
test eax, eax
je 0x585883
push str.Shell32.dll
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x58565c
push str.SHGetKnownFolderIDList
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x58565c
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push edi
call eax
test eax, eax
je 0x585653
push 0x6098b4
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 2
push eax
call fcn.0052d791
mov dword [ebp - 4], 0xffffffff
jmp 0x585684
push 0x6098b4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 1
push eax
call fcn.0052d791
mov eax, 0x585677
ret
test esi, esi
je 0x58568f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x585814
lea ecx, [ebp - 0x14]
call fcn.00402b30
mov dword [ebp - 4], 2
mov ecx, edi
mov edx, 0x5e5498
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5856fb
add ecx, 4
add edx, 4
sub esi, 4
jae 0x5856b5
mov esi, dword [ebp - 0x14]
mov ebx, 1
mov ecx, ebx
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5856ef
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 5
jmp 0x58578c
mov ecx, edi
mov edx, 0x5e54c8
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x58574a
add ecx, 4
add edx, 4
sub esi, 4
jae 0x585707
mov esi, dword [ebp - 0x14]
mov ebx, 1
mov ecx, ebx
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x585741
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 0x27
jmp 0x58578c
push 0x5e54b8
push edi
call fcn.00405470
mov esi, dword [ebp - 0x14]
add esp, 8
mov ebx, 1
test eax, eax
je 0x585794
mov eax, dword [esi - 8]
mov ecx, ebx
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x585785
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 0x25
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x58580a
cmp eax, dword [esi - 8]
jg 0x58580a
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x5857c7
push esi
call dword [sym.imp.SHELL32.dll_ILCreateFromPathW]
mov dword [ebp - 0x18], eax
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
lea ecx, [esi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x5857e8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x585819
mov ecx, dword [ebp - 0x20]
push 0x5e7af0
call fcn.00403020
push dword [ebp - 0x18]
call dword [sym.imp.SHELL32.dll_ILFree]
jmp 0x585888
push 0x80070057
call fcn.00402740
mov ebx, 1
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push ecx
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHCreateShellItem]
test eax, eax
jne 0x585878
mov dword [ebp - 0x1c], eax
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
push edx
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
call fcn.00402f60
mov ecx, dword [ebp - 0x20]
push eax
mov dword [ebp - 4], 3
call fcn.004032d0
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
call fcn.00402b60
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push dword [ebp - 0x18]
call dword [sym.imp.SHELL32.dll_ILFree]
jmp 0x585888
mov ebx, 1
cmp dword [ebp + 8], 0
je 0x5859f6
call fcn.00414eab
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5858ae
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 4
mov ecx, edi
mov edx, 0x5e5498
mov dword [ebp - 0x20], 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x58590d
add ecx, 4
add edx, 4
sub dword [ebp - 0x20], 4
jae 0x5858d0
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x585901
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 5
jmp 0x58599b
mov ecx, edi
mov dword [ebp - 0x20], 0xc
mov edx, 0x5e54c8
jmp 0x585920
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x58595a
add ecx, 4
add edx, 4
sub dword [ebp - 0x20], 4
jae 0x585920
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x585951
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 0x27
jmp 0x58599b
mov ecx, 0x5e54b8
mov edx, 0xc
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x5859a3
add edi, 4
add ecx, 4
sub edx, 4
jae 0x585964
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x585994
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 0x25
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push dword [esi - 8]
push esi
call fcn.00528e42
add esp, 8
test eax, eax
js 0x58580a
cmp eax, dword [esi - 8]
jg 0x58580a
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea eax, [ebp - 0x14]
mov ecx, dword [ebp + 8]
push eax
call fcn.004032d0
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5859f6
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret