Function at 0x586f80
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b22a8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x616040]
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 0x587243
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 0x58701c
push str.SHGetKnownFolderIDList
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x58701c
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push edi
call eax
test eax, eax
je 0x587013
push 0x60bae4
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 2
push eax
call fcn.0052d791
mov dword [ebp - 4], 0xffffffff
jmp 0x587044
push 0x60bae4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 1
push eax
call fcn.0052d791
mov eax, 0x587037
ret
test esi, esi
je 0x58704f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x5871d4
lea ecx, [ebp - 0x14]
call fcn.00402b30
mov dword [ebp - 4], 2
mov ecx, edi
mov edx, 0x5e7498
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5870bb
add ecx, 4
add edx, 4
sub esi, 4
jae 0x587075
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 0x5870af
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 5
jmp 0x58714c
mov ecx, edi
mov edx, 0x5e74c8
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x58710a
add ecx, 4
add edx, 4
sub esi, 4
jae 0x5870c7
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 0x587101
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 0x27
jmp 0x58714c
push 0x5e74b8
push edi
call fcn.004054c0
mov esi, dword [ebp - 0x14]
add esp, 8
mov ebx, 1
test eax, eax
je 0x587154
mov eax, dword [esi - 8]
mov ecx, ebx
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x587145
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 0x5871ca
cmp eax, dword [esi - 8]
jg 0x5871ca
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 0x587187
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 0x5871a8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x5871d9
mov ecx, dword [ebp - 0x20]
push 0x5e9af0
call fcn.00403020
push dword [ebp - 0x18]
call dword [sym.imp.SHELL32.dll_ILFree]
jmp 0x587248
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 0x587238
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 0x587248
mov ebx, 1
cmp dword [ebp + 8], 0
je 0x5873b6
call fcn.00414e1f
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x58726e
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, 0x5e7498
mov dword [ebp - 0x20], 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5872cd
add ecx, 4
add edx, 4
sub dword [ebp - 0x20], 4
jae 0x587290
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x5872c1
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 5
jmp 0x58735b
mov ecx, edi
mov dword [ebp - 0x20], 0xc
mov edx, 0x5e74c8
jmp 0x5872e0
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x58731a
add ecx, 4
add edx, 4
sub dword [ebp - 0x20], 4
jae 0x5872e0
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x587311
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 0x27
jmp 0x58735b
mov ecx, 0x5e74b8
mov edx, 0xc
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x587363
add edi, 4
add ecx, 4
sub edx, 4
jae 0x587324
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x587354
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 0x5871ca
cmp eax, dword [esi - 8]
jg 0x5871ca
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 0x5873b6
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