Function at 0x4122f0
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, 0x4150e0
sub esp, 0x14
jmp 0x412512
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
add 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 0x4124b7
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
inc edi
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 0x412638
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 0x412378
lea eax, [ebp - 0x35c]
mov dword [esp + 4], 0x41ff44
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 0x4125be
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 0x4125d8
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 0x412378
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 0x4123ad
jmp 0x412378
mov eax, dword [ebp - 0x378]
test eax, eax
js 0x412692
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