Function at 0x470040
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f8f7
mov eax, dword fs:[0]
push eax
sub esp, 0x654
mov eax, dword [0x597644]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x630]
mov esi, dword [ebp + 0xc]
push 0x208
push 0
push eax
call fcn.004dda00
add esp, 0xc
lea eax, [ebp - 0x630]
push 0
push 0x10
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x47037d
mov dword [ebp - 0x654], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x650], 0
mov dword [ebp - 0x65c], 0
mov dword [ebp - 0x658], 0
lea eax, [ebp - 0x654]
mov byte [ebp - 4], 3
push eax
call dword [sym.imp.SHELL32.dll_SHGetDesktopFolder]
test eax, eax
js 0x470326
lea eax, [ebp - 0x650]
push eax
push 0x572d20
push 1
push 0
push 0x5746b0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x470326
mov eax, dword [ebp - 0x650]
lea edx, [ebp - 0x65c]
push edx
push 0x5737a0
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x470326
mov eax, dword [ebp - 0x654]
lea edx, [ebp - 0x658]
push edx
push 0x40
push 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
js 0x470326
xor eax, eax
mov dword [ebp - 0x64c], eax
test eax, eax
je 0x47016a
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [ebp - 0x64c], 0
mov eax, dword [ebp - 0x658]
lea edx, [ebp - 0x64c]
push 0
push edx
push 1
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
test eax, eax
jne 0x470304
mov eax, dword [ebp - 0x654]
lea edx, [ebp - 0x660]
push edx
lea edx, [ebp - 0x64c]
mov dword [ebp - 0x660], 0x10000
push edx
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x24]
test dword [ebp - 0x660], 0x10000
je 0x470260
push 0x20a
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.004dda00
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x64c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x470260
mov eax, dword [ebp - 0x65c]
lea edx, [ebp - 0x21c]
push 2
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
test eax, eax
js 0x470260
push 0x20a
lea eax, [ebp - 0x428]
push 0
push eax
call fcn.004dda00
mov eax, dword [ebp - 0x650]
lea edx, [ebp - 0x428]
add esp, 0xc
mov ecx, dword [eax]
push 4
push 0
push 0x104
push edx
push eax
call dword [ecx + 0xc]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x470241
mov eax, dword [edi]
push dword [edi + 0x10]
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.005193d1
add esp, 0xc
test eax, eax
je 0x47026b
nop dword [eax + eax]
mov eax, dword [ebp - 0x64c]
jmp 0x470155
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x648]
call fcn.004303b0
mov eax, dword [esi + 4]
mov byte [ebp - 4], 4
cmp dword [esi + 8], eax
je 0x4702db
movups xmm0, xmmword [ebp - 0x648]
lea ecx, [ebp - 0x648]
mov byte [ebp - 4], 3
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x638]
movq qword [eax + 0x10], xmm0
xor eax, eax
add dword [esi + 4], 0x18
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x634], 7
mov word [ebp - 0x648], ax
call fcn.00421740
mov eax, dword [ebp - 0x64c]
jmp 0x470155
lea ecx, [ebp - 0x648]
push ecx
push eax
mov ecx, esi
call fcn.0042fe50
lea ecx, [ebp - 0x648]
mov byte [ebp - 4], 3
call fcn.00421740
mov eax, dword [ebp - 0x64c]
jmp 0x470155
mov eax, dword [ebp - 0x64c]
test eax, eax
je 0x47031f
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [ebp - 0x64c], 0
mov esi, 1
jmp 0x470328
xor esi, esi
mov eax, dword [ebp - 0x658]
mov byte [ebp - 4], 2
test eax, eax
je 0x47033c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x65c]
mov byte [ebp - 4], 1
test eax, eax
je 0x470350
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x650]
mov byte [ebp - 4], 0
test eax, eax
je 0x470364
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0x654]
mov dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x47037b
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004982ff
mov esp, ebp
pop ebp
ret