Function at 0x440356
Capabilities:
Get common file path

Disassembly:
push ebp
xor ecx, ecx
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
test ebx, ebx
jne 0x440378
xor ebx, ebx
jmp 0x440819
mov eax, dword [ebx]
test eax, eax
je 0x440371
cmp dword [ebx + 8], 0
je 0x440371
cmp dword [ebx + 0xc], 0
je 0x440371
inc eax
mov dword [esp + 4], 8
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov edi, eax
test eax, eax
je 0x440371
inc dword [0x5240c0]
mov esi, eax
mov edx, eax
xor ecx, ecx
cmp ecx, dword [ebx]
jae 0x4403e4
mov eax, dword [ebx + 8]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x3c], ecx
mov eax, dword [eax + ecx*4]
call fcn.0043fd20
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
mov dword [edx + 4], eax
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + ecx*4]
call fcn.0043fd20
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
mov dword [edx], eax
inc ecx
add edx, 8
jmp 0x4403ad
mov dword [edx + 4], 0x4a6b88
mov dword [ebp - 0x3c], edx
mov dword [esp], 0xc23
call fcn.00422df0
call fcn.0043fd20
mov edx, dword [ebp - 0x3c]
cmp dword [ebp + 8], 0
mov dword [edx], eax
mov edx, 0x4c073c
mov eax, 0x4c071c
cmovne eax, edx
lea edx, [ebp - 0x34]
mov dword [esp + 0xc], 0x4c4cbc
mov dword [esp + 0x10], edx
xor edx, edx
mov dword [esp + 8], 3
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.ole32.dll_CoCreateInstance]
sub esp, 0x14
test eax, eax
js 0x44044e
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x440472
mov eax, 0xc0033de1
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push eax
call fcn.0043df77
mov dword [esp], str.CoCreateInstance_for_FileOpenDialog_failed:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x4407f9
mov ecx, dword [eax]
mov dword [esp + 8], edi
mov edx, dword [ebx]
mov dword [esp], eax
inc edx
mov dword [esp + 4], edx
call dword [ecx + 0x10]
sub esp, 0xc
cmp dword [ebp + 0xc], 0
jne 0x440520
lea eax, [ebp - 0x30]
mov dword [ebp - 0x28], 0x374de290
mov dword [ebp - 0x24], 0x4565123f
mov dword [ebp - 0x20], 0xc4396491
mov dword [ebp - 0x1c], 0x7b465e92
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sub.SHELL32.dll_SHGetKnownFolderPath
sub esp, 0x10
test eax, eax
js 0x440574
lea eax, [ebp - 0x2c]
mov dword [esp + 8], 0x4c635c
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHCreateItemFromParsingName]
sub esp, 0x10
test eax, eax
js 0x440511
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x2c]
push eax
push eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ecx
jmp 0x440574
mov eax, dword [ebp + 0xc]
call fcn.0043fd20
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x30], eax
mov dword [esp + 0xc], edx
xor edx, edx
mov dword [esp + 8], 0x4c635c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.SHELL32.dll_SHCreateItemFromParsingName]
sub esp, 0x10
test eax, eax
js 0x440564
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x30]
push eax
push eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_free
xor eax, eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebx + 4]
test eax, eax
jne 0x440580
mov eax, 0x4a6b86
call fcn.0043fd20
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x4405a0
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x3c]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x3c]
push eax
push eax
mov edx, dword [ebx + 8]
mov eax, 0x4a6b86
test edx, edx
je 0x4405ae
mov eax, dword [edx]
call fcn.0043fd20
mov dword [ebp - 0x40], eax
test eax, eax
je 0x4405ce
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x40]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x58]
push ecx
push ecx
mov eax, dword [ebp - 0x34]
mov edx, dword [eax]
mov ecx, dword [edx + 0x14]
xor edx, edx
cmp dword [ebp + 0x14], 0
je 0x4405e3
mov edx, dword [ebp + 0x14]
mov edx, dword [edx]
mov dword [esp + 4], edx
mov dword [esp], eax
call ecx
push eax
push eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [0x5241b4]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0xc]
push edx
push edx
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x44], eax
je 0x440622
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp + 0x14]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x18]
push eax
push eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.msvcrt.dll_free
xor eax, eax
cmp eax, dword [ebx]
jae 0x44066a
mov edx, dword [esi + 4]
mov dword [ebp - 0x3c], eax
add esi, 8
mov dword [esp], edx
call sub.msvcrt.dll_free
mov edx, dword [esi - 8]
xor eax, eax
mov dword [esi - 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_free
xor eax, eax
mov dword [esi - 8], eax
mov eax, dword [ebp - 0x3c]
inc eax
jmp 0x44063a
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_free
xor ecx, ecx
mov dword [esi], ecx
mov dword [esp], edi
call sub.msvcrt.dll_free
cmp dword [ebp - 0x44], 0
js 0x4407cd
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x28]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x50]
push edx
push edx
test eax, eax
js 0x4407f7
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x30]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x80058000
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0xc
test eax, eax
js 0x44079c
mov ecx, dword [ebp - 0x30]
cmp word [ecx], 0
jne 0x4406ef
mov dword [esp + 4], 1
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov ebx, eax
jmp 0x44078d
xor eax, eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 8], ecx
mov dword [ebp - 0x40], ecx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.KERNEL32.DLL_WideCharToMultiByte]
mov dword [esp], 0xfde9
mov dword [ebp - 0x3c], eax
call eax
sub esp, 0x20
mov edi, eax
cmp eax, 1
jle 0x44078b
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov esi, eax
mov ebx, eax
test eax, eax
je 0x44078b
xor eax, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0xffffffff
mov ecx, dword [ebp - 0x40]
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp], 0xfde9
mov eax, dword [ebp - 0x3c]
call eax
sub esp, 0x20
cmp edi, eax
je 0x44078d
mov dword [esp], esi
call sub.msvcrt.dll_free
xor ebx, ebx
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push esi
jmp 0x4407bd
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push ebx
xor ebx, ebx
call fcn.0043df77
mov dword [esp], str.Unable_to_access_file_path:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
mov eax, dword [ebp - 0x28]
xor edi, edi
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push ecx
jmp 0x4407fb
cmp word [ebp - 0x44], 0x4c7
je 0x4407f7
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push edx
call fcn.0043df77
mov dword [esp], str.Could_not_show_FileOpenDialog:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
xor edi, edi
xor ebx, ebx
mov dword [esp], edi
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x440813
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
push eax
dec dword [0x5240c0]
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret