Function at 0x403380
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56be56
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x5cf000]
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
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0
push eax
push 0x11
push dword [0x5d97c0]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x238], 0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [ebp - 0x254], eax
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x250], eax
mov eax, dword [0x5d98d4]
add eax, 0xfffffff0
mov dword [ebp - 0x244], 0x41
push eax
mov dword [ebp - 0x248], 0x5afbec
call fcn.0040a460
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x220], esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x240], 0x403350
cmp dword [esi - 4], 1
jle 0x403452
push dword [esi - 0xc]
lea ecx, [ebp - 0x220]
call fcn.0040a2c0
mov esi, dword [ebp - 0x220]
lea eax, [ebp - 0x254]
mov dword [ebp - 0x23c], esi
push eax
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov ebx, eax
or edi, 0xffffffff
mov dword [ebp - 0x224], ebx
test ebx, ebx
je 0x40355d
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea edx, [ebp - 0x218]
lea ecx, [ebp - 0x234]
call fcn.0040e890
push 0x5d98c4
push eax
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 1
push eax
call fcn.00409470
add esp, 0xc
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov ebx, dword [0x5d98d4]
add ebx, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x403519
mov eax, dword [ebx + 0xc]
shr eax, 0x1f
test al, al
jne 0x40350b
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x40350b
push edx
call fcn.0040a460
add esp, 4
mov dword [ebp - 0x22c], eax
mov ecx, edi
lea edx, [ebx + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403501
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x22c]
add eax, 0x10
mov dword [0x5d98d4], eax
jmp 0x403519
push dword [ecx - 0xc]
push ecx
mov ecx, 0x5d98d4
call fcn.0040a5a0
mov edx, dword [ebp - 0x230]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403536
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x234]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403557
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x224]
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
js 0x403587
mov eax, dword [ebp - 0x228]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x228]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x40359c
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 ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054d63f
mov esp, ebp
pop ebp
ret