Function at 0x51cf20
Capabilities:
Get common file path
Get file system object information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd28
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x2d8], ebx
mov dword [ebp - 0x2d4], ebx
mov dword [ebp - 0x2d0], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00407248
xor eax, eax
push ebp
push 0x51d299
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 4]
mov edx, dword [0x52b7d0]
mov edx, dword [edx]
call fcn.00407920
je 0x51d255
xor ecx, ecx
push ebp
push 0x51d24e
push dword fs:[ecx]
mov dword fs:[ecx], esp
lea eax, [ebp - 0xc]
call fcn.0040a218
push eax
call sub.shell32.dll_SHGetMalloc
lea eax, [ebp - 0x2d0]
mov edx, dword [ebp - 4]
call fcn.004074c4
mov eax, dword [ebp - 0x2d0]
call fcn.0051b624
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push esi
mov eax, ebx
call fcn.004ab70c
push eax
call sub.shell32.dll_SHGetSpecialFolderLocation
call fcn.0040cc3c
test eax, eax
je 0x51cff9
push 0x108
push 0x2b4
lea eax, [ebp - 0x2c9]
push eax
push 0
mov eax, dword [ebp - 0x14]
push eax
call sub.shell32.dll_SHGetFileInfoW
mov eax, dword [ebp - 0x2c5]
mov dword [ebp - 0x10], eax
jmp 0x51d1f7
mov eax, dword [ebp - 4]
call fcn.00414ff4
test al, al
jne 0x51d032
lea eax, [ebp - 0x2d4]
push eax
mov ecx, 7
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00407988
mov eax, dword [ebp - 0x2d4]
mov edx, 0x51d2b8
call fcn.00414174
test eax, eax
jne 0x51d064
push 0x4011
push 0x2b4
lea eax, [ebp - 0x2c9]
push eax
push 0x80
mov eax, dword [ebp - 4]
call fcn.004072ec
push eax
call sub.shell32.dll_SHGetFileInfoW
mov eax, dword [ebp - 0x2c5]
mov dword [ebp - 0x10], eax
jmp 0x51d1f7
mov eax, dword [ebp - 4]
call fcn.0041503c
test al, al
je 0x51d09f
push 0x4011
push 0x2000
lea eax, [ebp - 0x2c9]
push eax
push 0x10
mov eax, dword [ebp - 4]
call fcn.004072ec
push eax
call sub.shell32.dll_SHGetFileInfoW
mov eax, dword [ebp - 0x2c5]
mov dword [ebp - 0x10], eax
jmp 0x51d1f7
cmp dword [ebp - 4], 0
je 0x51d1f7
lea eax, [ebp - 0x2d8]
mov edx, dword [ebp - 4]
call fcn.004074c4
mov eax, dword [ebp - 0x2d8]
lea edx, [ebp - 8]
call fcn.0051b1bc
mov eax, dword [ebp - 8]
mov edx, 0x51d2d4
call fcn.00407920
jne 0x51d1ca
mov eax, ebx
call fcn.0046e644
test al, al
jne 0x51d125
cmp byte [ebx + 0x3b0], 0
je 0x51d125
mov eax, ebx
call fcn.0051d5ac
inc eax
jle 0x51d125
mov eax, ebx
call fcn.0051d5ac
mov esi, eax
mov dword [ebp - 0x2c5], esi
mov dword [ebp - 0x10], esi
push esi
call sub.user32.dll_DestroyIcon
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
call fcn.00405f44
jmp 0x51d255
cmp byte [ebx + 0x3bc], 0
je 0x51d17b
mov eax, dword [0x52b71c]
mov eax, dword [eax]
mov esi, dword [eax + 0xa0]
cmp word [ebx + 0x372], 0
je 0x51d157
push esi
lea ecx, [ebp - 0x15]
mov edx, ebx
mov eax, dword [ebx + 0x374]
call dword [ebx + 0x370]
cmp byte [ebp - 0x15], 0
jne 0x51d1f7
mov eax, dword [ebx + 0x358]
mov edx, esi
call fcn.004baef0
mov edx, eax
mov dword [ebp - 0x2c5], edx
mov dword [ebp - 0x10], edx
jmp 0x51d1f7
push 0x4011
push 0x2b4
lea eax, [ebp - 0x2c9]
push eax
push 0x80
push 0x51d2e0
call sub.shell32.dll_SHGetFileInfoW
cmp word [ebx + 0x382], 0
je 0x51d1bf
mov eax, dword [ebp - 0x2c9]
push eax
mov ecx, 0x51d2f8
mov edx, ebx
mov eax, dword [ebx + 0x384]
call dword [ebx + 0x380]
mov eax, dword [ebp - 0x2c5]
mov dword [ebp - 0x10], eax
jmp 0x51d1f7
push 0x4011
push 0x2b4
lea eax, [ebp - 0x2c9]
push eax
push 0x80
mov eax, dword [ebp - 8]
call fcn.004072ec
push eax
call sub.shell32.dll_SHGetFileInfoW
mov eax, dword [ebp - 0x2c5]
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d255
xor eax, eax
push ebp
push 0x51d239
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x10], 0xffffffff
je 0x51d226
mov eax, dword [ebp - 0x2c5]
push eax
call sub.user32.dll_DestroyIcon
jmp 0x51d22b
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d240
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51d2a0
lea eax, [ebp - 0x2d8]
call fcn.00406d04
lea eax, [ebp - 0x2d4]
call fcn.00407250
lea eax, [ebp - 0x2d0]
call fcn.00406d04
lea eax, [ebp - 0xc]
call fcn.0040a218
lea eax, [ebp - 8]
mov edx, 2
call fcn.00407258
ret