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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4c
mov eax, dword [0x43e2c4]
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 0x450090
call fcn.00401f00
add esp, 0xc
push 0x202
push 0
lea eax, [ebp - 0xa20]
push eax
call fcn.00401f00
add esp, 0xc
push 0x802
push 0
lea ecx, [ebp - 0x810]
push ecx
call fcn.00401f00
add esp, 0xc
lea edx, [ebp - 0xa20]
push edx
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebp + 0x20], 1
jne 0x413a2a
push 0x80
push 0x450090
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.00401f00
add esp, 0xc
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jge 0x413a52
jmp 0x413c28
lea eax, [ebp - 0xa24]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne 0x413c22
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 0x413a85
jmp 0x413bcc
mov eax, dword [ebp + 8]
mov dword [0x45008c], eax
mov ecx, dword [ebp + 0x18]
mov dword [0x450194], ecx
mov edx, dword [ebp + 0x1c]
mov dword [0x450190], 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 0x413b03
mov dword [ebp - 0xa3c], 0x51
jmp 0x413b1d
cmp dword [ebp + 0x24], 2
jne 0x413b1d
mov dword [ebp - 0x814], str.Please_select_a_File_or_Folder
mov dword [ebp - 0xa3c], 0x4001
cmp dword [ebp + 0x14], 0
jne 0x413b29
cmp dword [ebp + 0x20], 1
jne 0x413b61
cmp dword [ebp + 0x14], 0
je 0x413b4b
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], 0x40e3d0
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 0x413bcc
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 0x434834
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 0xa28], 0
je 0x413bf0
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 0x413c0e
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.00401ee7
mov esp, ebp
pop ebp
ret 0x20