Function at 0x587250
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b2688
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 0x587513
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 0x5872ec
push str.SHGetKnownFolderIDList
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x5872ec
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push edi
call eax
test eax, eax
je 0x5872e3
push 0x60baf4
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 2
push eax
call fcn.0052d7c1
mov dword [ebp - 4], 0xffffffff
jmp 0x587314
push 0x60baf4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 1
push eax
call fcn.0052d7c1
mov eax, 0x587307
ret
test esi, esi
je 0x58731f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x5874a4
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 0x58738b
add ecx, 4
add edx, 4
sub esi, 4
jae 0x587345
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 0x58737f
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 5
jmp 0x58741c
mov ecx, edi
mov edx, 0x5e74c8
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5873da
add ecx, 4
add edx, 4
sub esi, 4
jae 0x587397
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 0x5873d1
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 0x27
jmp 0x58741c
push 0x5e74b8
push edi
call fcn.004054c0
mov esi, dword [ebp - 0x14]
add esp, 8
mov ebx, 1
test eax, eax
je 0x587424
mov eax, dword [esi - 8]
mov ecx, ebx
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x587415
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.00528e72
add esp, 8
test eax, eax
js 0x58749a
cmp eax, dword [esi - 8]
jg 0x58749a
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 0x587457
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 0x587478
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x5874a9
mov ecx, dword [ebp - 0x20]
push 0x5e9af0
call fcn.00403020
push dword [ebp - 0x18]
call dword [sym.imp.SHELL32.dll_ILFree]
jmp 0x587518
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 0x587508
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 0x587518
mov ebx, 1
cmp dword [ebp + 8], 0
je 0x587686
call fcn.0041505f
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x58753e
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 0x58759d
add ecx, 4
add edx, 4
sub dword [ebp - 0x20], 4
jae 0x587560
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x587591
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 5
jmp 0x58762b
mov ecx, edi
mov dword [ebp - 0x20], 0xc
mov edx, 0x5e74c8
jmp 0x5875b0
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5875ea
add ecx, 4
add edx, 4
sub dword [ebp - 0x20], 4
jae 0x5875b0
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x5875e1
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402c20
mov esi, dword [ebp - 0x14]
push esi
push 0
push 0
push 0x27
jmp 0x58762b
mov ecx, 0x5e74b8
mov edx, 0xc
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x587633
add edi, 4
add ecx, 4
sub edx, 4
jae 0x5875f4
mov eax, dword [esi - 8]
sub ebx, dword [esi - 4]
sub eax, 0x104
or eax, ebx
jge 0x587624
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.00528e72
add esp, 8
test eax, eax
js 0x58749a
cmp eax, dword [esi - 8]
jg 0x58749a
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 0x587686
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