Function at 0x40e280
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x384
mov esi, dword [sym.imp.user32.dll_SendDlgItemMessageW]
mov dword [ebp - 0x368], eax
mov dword [esp + 0x10], 2
mov dword [ebp - 0x36c], esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x100c
mov dword [esp + 4], 0x582
mov dword [esp], eax
call esi
sub esp, 0x14
mov dword [ebp - 0x378], eax
mov dword [esp], edi
xor edi, edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1009
mov dword [esp + 4], 0x582
call esi
mov esi, 0x417320
sub esp, 0x14
jmp 0x40e4a5
lea eax, [ebp - 0x214]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov eax, dword [esi]
or ah, 0x40
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x368]
mov dword [esp], eax
call dword [sym.imp.shell32.dll_SHGetFolderPathW]
sub esp, 0x14
lea eax, [ebp - 0x214]
mov dword [ebp - 0x354], edi
mov dword [ebp - 0x344], eax
lea eax, [ebp - 0x358]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x368]
mov dword [ebp - 0x358], 5
mov dword [esp], eax
mov eax, dword [ebp - 0x36c]
mov dword [ebp - 0x350], 0
mov dword [ebp - 0x338], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x104d
mov dword [esp + 4], 0x582
call eax
lea ecx, [esi + 4]
mov dword [ebp - 0x354], edi
sub esp, 0x14
mov dword [ebp - 0x374], ecx
mov dword [esp + 8], ecx
mov dword [ebp - 0x358], 1
mov dword [ebp - 0x350], 1
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0xfdf2
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov edx, eax
sub esp, 0x18
lea eax, [eax + eax]
mov dword [ebp - 0x370], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ebx, eax
test eax, eax
je 0x40e448
mov edx, dword [ebp - 0x370]
mov ecx, dword [ebp - 0x374]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x14], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], 0xfdf2
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
sub esp, 0x18
lea eax, [ebp - 0x358]
mov dword [ebp - 0x344], ebx
add edi, 1
add esi, 0x108
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x368]
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x36c]
mov dword [esp + 8], 0x104c
mov dword [esp + 4], 0x582
call eax
mov eax, dword [ebp - 0x344]
sub esp, 0x14
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
cmp edi, 7
je 0x40e5d0
lea eax, [ebp - 0x364]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov eax, dword [esi]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x368]
mov dword [esp], eax
call dword [sym.imp.shell32.dll_SHGetFolderLocation]
sub esp, 0x14
test eax, eax
js 0x40e308
lea eax, [ebp - 0x35c]
mov dword [esp + 4], 0x4212b8
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x360]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x364]
mov dword [esp], eax
call dword [sym.imp.shell32.dll_SHBindToParent]
sub esp, 0x10
test eax, eax
js 0x40e551
mov eax, dword [ebp - 0x360]
mov ecx, dword [ebp - 0x35c]
lea ebx, [ebp - 0x31c]
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4000
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x2c]
sub esp, 0x10
test eax, eax
jns 0x40e570
mov eax, dword [ebp - 0x360]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push edx
mov eax, dword [ebp - 0x364]
mov dword [esp], eax
call dword [sym.imp.shell32.dll_ILFree]
push eax
jmp 0x40e308
lea eax, [ebp - 0x214]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x35c]
mov dword [esp + 0xc], 0x104
mov dword [esp + 4], eax
call dword [sym.imp.shlwapi.dll_StrRetToBufW]
mov ebx, eax
mov eax, dword [ebp - 0x360]
sub esp, 0x10
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [ebp - 0x364]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.shell32.dll_ILFree]
sub esp, 4
test ebx, ebx
jns 0x40e33d
jmp 0x40e308
mov eax, dword [ebp - 0x378]
test eax, eax
js 0x40e62a
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x368]
lea edi, [ebp - 0x358]
mov dword [ebp - 0x358], 8
mov dword [esp], eax
mov eax, dword [ebp - 0x36c]
mov dword [ebp - 0x34c], 2
mov dword [ebp - 0x348], 2
mov dword [esp + 0x10], edi
mov dword [esp + 8], 0x102b
mov dword [esp + 4], 0x582
call eax
sub esp, 0x14
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret