Function at 0x411040
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4c
mov eax, dword [0x4422a0]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0xa2c], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xa28], 0
mov dword [ebp - 0x814], str.Please_select_a_Folder
push 0x100
push 0
push 0x454680
call fcn.00402740
add esp, 0xc
push 0x202
push 0
lea eax, [ebp - 0xa20]
push eax
call fcn.00402740
add esp, 0xc
push 0x802
push 0
lea ecx, [ebp - 0x810]
push ecx
call fcn.00402740
add esp, 0xc
lea edx, [ebp - 0xa20]
push edx
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebp + 0x20], 1
jne 0x4110ea
push 0x80
push 0x454680
push 0xffffffffffffffff
mov eax, dword [ebp + 0xc]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [ebp + 0x10]
push ecx
push 0
mov edx, dword [ebp + 0xc]
push edx
call fcn.00402740
add esp, 0xc
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jge 0x411112
jmp 0x4112e8
lea eax, [ebp - 0xa24]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne 0x4112e2
lea ecx, [ebp - 4]
push ecx
push 0x11
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jge 0x411145
jmp 0x41128c
mov eax, dword [ebp + 8]
mov dword [0x454780], eax
mov ecx, dword [ebp + 0x18]
mov dword [0x454788], ecx
mov edx, dword [ebp + 0x1c]
mov dword [0x454784], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0xa4c], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xa48], ecx
lea edx, [ebp - 0x810]
mov dword [ebp - 0xa44], edx
mov eax, dword [ebp - 0x814]
mov dword [ebp - 0xa40], eax
mov dword [ebp - 0xa3c], 1
mov dword [ebp - 0xa38], 0
mov dword [ebp - 0xa34], 0
mov dword [ebp - 0xa30], 0
cmp dword [ebp + 0x24], 1
jne 0x4111c3
mov dword [ebp - 0xa3c], 0x51
jmp 0x4111dd
cmp dword [ebp + 0x24], 2
jne 0x4111dd
mov dword [ebp - 0x814], str.Please_select_a_File_or_Folder
mov dword [ebp - 0xa3c], 0x4001
cmp dword [ebp + 0x14], 0
jne 0x4111e9
cmp dword [ebp + 0x20], 1
jne 0x411221
cmp dword [ebp + 0x14], 0
je 0x41120b
push 0x100
lea ecx, [ebp - 0x810]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp + 0x14]
push edx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0xa38], 0x40dbf0
lea eax, [ebp - 0x810]
mov dword [ebp - 0xa34], eax
lea ecx, [ebp - 0xa4c]
push ecx
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov dword [ebp - 0xa28], eax
cmp dword [ebp - 0xa28], 0
je 0x41128c
mov dword [ebp - 0xa2c], 1
lea edx, [ebp - 0x810]
push edx
mov eax, dword [ebp - 0xa28]
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push 0
push 0
mov ecx, dword [ebp + 0x10]
sub ecx, 1
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 0xffffffffffffffff
lea eax, [ebp - 0x810]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x435c30
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 0xa28], 0
je 0x4112b0
mov edx, dword [ebp - 0xa28]
push edx
mov eax, dword [ebp - 0xa24]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xa24]
push edx
mov eax, dword [ecx + 0x14]
call eax
cmp dword [ebp - 4], 0
je 0x4112ce
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0xa24]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xa24]
push ecx
mov edx, dword [eax + 0x14]
call edx
mov eax, dword [ebp - 0xa24]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xa24]
push edx
mov eax, dword [ecx + 8]
call eax
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [ebp - 0xa20]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [ebp - 0xa2c]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00402730
mov esp, ebp
pop ebp
ret 0x20