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

Disassembly:
sub esp, 0x4c0
push edi
mov edi, ecx
mov dword [esp + 4], edi
mov eax, dword [edi + 0x48]
test eax, eax
jne 0x50aa52
push ebx
push ebp
lea eax, [edi + 0x5c]
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetDesktopFolder]
mov ebp, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
lea ebx, [edi + 0x2c]
push ebx
push 6
push 0
call ebp
test eax, eax
jl 0x50a9e4
lea esi, [edi + 0x28]
push esi
push 0
push 0
call ebp
test eax, eax
jl 0x50a9ea
mov ecx, dword [ebx]
mov edx, dword [esi]
push ecx
push edx
call fcn.0050abc0
lea ebx, [edi + 0x3c]
mov dword [esp + 0x20], eax
add esp, 8
mov esi, 0x400
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
lea ebp, [eax - 0xc]
cmp ecx, 1
jg 0x50a8bb
cmp dword [eax - 4], esi
jge 0x50a91d
mov eax, dword [eax - 8]
cmp eax, esi
mov dword [esp + 0x14], eax
jle 0x50a9ab
test eax, eax
mov esi, eax
jne 0x50a9ab
mov ecx, dword [0x546560]
mov dword [ebx], ecx
mov edi, dword [ebx]
lea ecx, [eax + eax + 2]
mov eax, ecx
lea esi, [ebp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x14]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov dword [ecx - 8], edx
mov eax, dword [0x546564]
cmp ebp, eax
je 0x50a919
push ebp
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x50a919
push ebp
call fcn.00531732
add esp, 4
mov edi, dword [esp + 0x10]
mov eax, dword [ebx]
push eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
lea esi, [eax - 0xc]
cmp ecx, 1
jle 0x50a993
mov ecx, dword [0x546564]
add eax, 0xfffffff4
cmp eax, ecx
je 0x50a966
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x50a95e
mov ecx, dword [ebx]
sub ecx, 0xc
push ecx
call fcn.00531732
add esp, 4
mov edx, dword [0x546560]
mov dword [ebx], edx
mov eax, dword [esi + 4]
mov ecx, ebx
push eax
call fcn.00405530
test eax, eax
je 0x50a993
mov ecx, dword [esi + 4]
mov edi, dword [ebx]
add esi, 0xc
lea ecx, [ecx + ecx + 2]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x10]
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebx]
mov dword [ecx - 8], eax
mov edx, dword [ebx]
mov word [edx + eax*2], 0
jmp 0x50a9ea
lea edx, [esi + esi + 0xe]
push edx
call fcn.00531ba5
add esp, 4
test eax, eax
je 0x50a9dd
mov dword [eax], 1
mov word [eax + esi*2 + 0xc], 0
mov dword [eax + 4], esi
mov dword [eax + 8], esi
add eax, 0xc
mov dword [ebx], eax
mov eax, dword [esp + 0x14]
jmp 0x50a8dc
xor eax, eax
jmp 0x50a91f
mov dword [ebx], 0
or eax, 0xffffffff
mov ecx, 0xad
mov dword [edi + 0x40], eax
mov dword [edi + 0x44], eax
xor eax, eax
lea edi, [esp + 0x21c]
rep stosd dword es:[edi], eax
mov eax, dword [0x553d9c]
mov ecx, 0x7f
mov dword [esp + 0x1c], eax
xor eax, eax
lea edi, [esp + 0x20]
push 0xff
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x4001
lea edx, [esp + 0x220]
push 0x2b4
push edx
lea eax, [esp + 0x28]
push 0
push eax
call dword [sym.imp.SHELL32.dll_SHGetFileInfoW]
mov ecx, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
mov dword [ecx + 0x48], eax
pop edi
add esp, 0x4c0
ret