Function at 0x510960
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x527100
mov eax, dword fs:[0]
push eax
sub esp, 0x650
mov eax, dword [0x56f790]
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 + 0xc]
lea eax, [ebp - 0x630]
push 0x208
push 0
push eax
call fcn.004b17e0
add esp, 0xc
lea eax, [ebp - 0x630]
push 0
push dword [ebp + 8]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x510d1d
mov dword [ebp - 0x640], 0
mov dword [ebp - 4], 1
mov dword [ebp - 0x63c], 0
mov byte [ebp - 4], 3
mov dword [ebp - 0x650], 0
mov byte [ebp - 4], 5
mov dword [ebp - 0x64c], 0
mov byte [ebp - 4], 7
lea eax, [ebp - 0x640]
push eax
call dword [sym.imp.SHELL32.dll_SHGetDesktopFolder]
test eax, eax
js 0x510cc6
lea eax, [ebp - 0x63c]
push eax
push 0x536404
push 1
push 0
push 0x54ece0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x510cc6
mov eax, dword [ebp - 0x63c]
lea edx, [ebp - 0x650]
push edx
push 0x54c320
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x510cc6
mov eax, dword [ebp - 0x640]
lea edx, [ebp - 0x64c]
push edx
push 0x40
push 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
js 0x510cc6
mov edi, dword [sym.imp.ole32.dll_CoTaskMemFree]
xor ebx, ebx
mov dword [ebp - 0x634], ebx
mov eax, dword [ebp - 0x634]
test eax, eax
je 0x510a99
push eax
call edi
mov dword [ebp - 0x634], 0
mov eax, dword [ebp - 0x64c]
lea edx, [ebp - 0x634]
push 0
push edx
push 1
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x510cad
mov eax, dword [ebp - 0x640]
lea edx, [ebp - 0x654]
push edx
lea edx, [ebp - 0x634]
mov dword [ebp - 0x654], 0x10000
push edx
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x24]
test dword [ebp - 0x654], 0x10000
je 0x510a82
push 0x20a
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.004b17e0
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x634]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x510a82
test esi, esi
je 0x510bd4
cmp word [esi], 0
je 0x510bd4
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x648]
call fcn.004093d0
mov byte [ebp - 4], 0x18
lea ecx, [ebp - 0x658]
push esi
call fcn.004093d0
mov byte [ebp - 4], 0x19
push str..lnk
push eax
lea eax, [ebp - 0x644]
push eax
call fcn.00410610
add esp, 0xc
mov byte [ebp - 4], 0x1b
lea ecx, [ebp - 0x658]
call fcn.00408250
push dword [ebp - 0x644]
lea ecx, [ebp - 0x648]
call fcn.0047f150
test eax, eax
je 0x510bb6
mov byte [ebp - 4], 0x18
lea ecx, [ebp - 0x644]
call fcn.00408250
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x648]
call fcn.00408250
jmp 0x510a82
mov byte [ebp - 4], 0x18
lea ecx, [ebp - 0x644]
call fcn.00408250
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x648]
call fcn.00408250
mov eax, dword [ebp - 0x650]
lea edx, [ebp - 0x21c]
push 2
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
test eax, eax
js 0x510a82
push 0x20a
lea eax, [ebp - 0x428]
push 0
push eax
call fcn.004b17e0
mov eax, dword [ebp - 0x63c]
lea edx, [ebp - 0x428]
add esp, 0xc
mov ecx, dword [eax]
push 2
push 0
push 0x104
push edx
push eax
call dword [ecx + 0xc]
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x638]
call fcn.004093d0
mov byte [ebp - 4], 0x1c
push str.LDSGameCenter.exe
push dword [ebp - 0x638]
call fcn.004ce4af
add esp, 8
test eax, eax
je 0x510c99
push str.pgstation.exe
push dword [ebp - 0x638]
call fcn.004ce4af
add esp, 8
test eax, eax
je 0x510c99
push 0x54fe28
push dword [ebp - 0x638]
call fcn.004ce4af
add esp, 8
test eax, eax
je 0x510c99
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x638]
call fcn.00408250
jmp 0x510a82
mov ebx, 1
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x638]
call fcn.00408250
mov eax, dword [ebp - 0x634]
test eax, eax
je 0x510cc8
push eax
call edi
mov dword [ebp - 0x634], 0
jmp 0x510cc8
xor ebx, ebx
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x64c]
test eax, eax
je 0x510cdc
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x650]
test eax, eax
je 0x510cf0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x63c]
test eax, eax
je 0x510d04
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x640]
test ecx, ecx
je 0x510d1b
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, ebx
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.004ac4b8
mov esp, ebp
pop ebp
ret 8