Function at 0x4505c0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x4d734c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x57c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
push 0x186a0
call fcn.004c7e90
mov ecx, eax
mov eax, dword [ebp + 0x30]
add esp, 4
mov dword [esp + 0x10], ecx
test eax, eax
je 0x45060f
cmp byte [eax], 0
je 0x45060f
push 0x104
push ecx
push eax
call dword [sym.imp.comdlg32.dll_GetFileTitleA]
jmp 0x450612
mov byte [ecx], 0
mov eax, dword [ebp + 0x10]
mov dword [0x4f0668], eax
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x24]
mov dword [0x4f0670], ecx
mov dword [0x4f0674], edx
mov eax, dword [ebp + 0x14]
mov dword [0x4fc040], eax
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x45065d
cmp byte [eax], 0
je 0x45065d
lea ecx, [esp + 0x37c]
push ecx
push eax
call fcn.00442f10
lea edx, [esp + 0x384]
add esp, 8
mov dword [ebp + 0x2c], edx
jmp 0x45066b
mov eax, dword [ebp + 0x2c]
test eax, eax
jne 0x45066b
mov dword [ebp + 0x2c], 0x4fc044
lea eax, [esp + 0x484]
push eax
push 0x105
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
mov ecx, dword [ebp + 0x2c]
mov ebx, dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push ecx
call ebx
mov ecx, 5
mov esi, 0x4f06c0
lea edi, [esp + 0x174]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, 0x3a
lea edi, [esp + 0x18a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [sym.imp.kernel32.dll_lstrlen]
lea edx, [esp + 0x174]
push edx
call edi
lea esi, [esp + eax + 0x175]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x45070a
push 0x4f06b8
push esi
call dword [sym.imp.kernel32.dll_lstrcat]
push esi
call edi
lea esi, [esi + eax + 1]
push 0x4f06a0
push esi
call dword [sym.imp.kernel32.dll_lstrcpy]
push esi
call edi
lea esi, [esi + eax + 1]
push 0x4f0698
push esi
call dword [sym.imp.kernel32.dll_lstrcpy]
push esi
call edi
lea esi, [esi + eax + 1]
jmp 0x450713
push esi
call edi
add esi, eax
mov byte [esi], 0
inc esi
push 0x4f0688
push esi
call dword [sym.imp.kernel32.dll_lstrcpy]
push esi
call edi
lea esi, [esi + eax + 1]
push 0x4ee818
push esi
call dword [sym.imp.kernel32.dll_lstrcpy]
push esi
call edi
mov byte [eax + esi + 1], 0
mov eax, dword [ebp]
mov dword [0x4fc020], eax
mov ecx, 0x13
xor eax, eax
lea edi, [esp + 0x1c]
mov edx, dword [ebp]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 4]
lea eax, [esp + 0x174]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x38], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x24], edx
mov edx, dword [ebp + 0x2c]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x28]
inc ecx
mov dword [esp + 0x1c], 0x4c
mov dword [esp + 0x48], edx
mov dword [esp + 0x3c], 0x186a0
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], 0x100c
mov dword [esp + 0x34], ecx
call fcn.00443db0
test eax, eax
je 0x4507c8
mov eax, dword [esp + 0x50]
mov dword [esp + 0x5c], ebp
or eax, 0x80060
mov dword [esp + 0x60], 0x450170
mov dword [esp + 0x50], eax
mov dword [esp + 0x64], 0x1f4
mov eax, dword [ebp + 8]
test eax, eax
je 0x4507da
mov eax, dword [esp + 0x50]
or ah, 2
mov dword [esp + 0x50], eax
mov edi, dword [sym.imp.comdlg32.dll_GetOpenFileNameA]
lea edx, [esp + 0x1c]
push edx
call edi
mov esi, eax
test esi, esi
jne 0x45080a
call dword [sym.imp.comdlg32.dll_CommDlgExtendedError]
cmp eax, 0x3002
jne 0x45080a
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
mov byte [eax], 0
call edi
mov esi, eax
lea edx, [esp + 0x484]
push edx
call ebx
test esi, esi
jne 0x450835
mov eax, dword [esp + 0x10]
push eax
call fcn.004c7e56
mov ecx, dword [0x4f0668]
add esp, 4
mov dword [ebp + 0x10], ecx
xor eax, eax
jmp 0x450bd2
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x10]
xor edi, edi
dec edx
push 0x7f02
push edi
mov dword [ebp + 0x18], edx
mov dword [esp + 0x1c], esi
call dword [sym.imp.user32.dll_LoadCursorA]
push eax
call dword [sym.imp.user32.dll_SetCursor]
push 0x9c40
call fcn.004c7e90
add esp, 4
mov dword [ebp + 0x38], eax
call fcn.00443db0
test eax, eax
mov eax, dword [ebp + 8]
je 0x450a25
test eax, eax
je 0x450889
push esi
call dword [sym.imp.kernel32.dll_lstrlen]
lea edi, [eax + esi + 1]
mov ebx, dword [esp + 0x14]
test edi, edi
je 0x4508a7
cmp byte [edi], 0
je 0x4508a7
push edi
lea eax, [esp + 0x70]
push esi
push eax
call fcn.00442e30
add esp, 0xc
jmp 0x4508b3
lea ecx, [esp + 0x6c]
push esi
push ecx
call dword [sym.imp.kernel32.dll_lstrcpy]
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4508cf
lea eax, [esp + 0x6c]
push edi
push eax
call dword [sym.imp.kernel32.dll_lstrcpy]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x450900
lea ecx, [esp + 0x6c]
push 0x2e
push ecx
call fcn.004c82b0
add esp, 8
test eax, eax
je 0x450900
push 0x4efe6c
push eax
call dword [sym.imp.kernel32.dll_lstrcmpi]
test eax, eax
je 0x450900
mov ebx, 1
jmp 0x45095d
test ebx, ebx
jne 0x45095d
push 0x5c
call fcn.004c7e90
add esp, 4
mov dword [esp + 0x14], eax
xor esi, esi
cmp eax, esi
mov dword [esp + 0x594], esi
je 0x45092d
lea edx, [esp + 0x6c]
mov ecx, eax
push edx
call fcn.004537e0
mov esi, eax
mov ecx, esi
mov dword [esp + 0x594], 0xffffffff
call fcn.004544a0
test esi, esi
mov ebx, eax
je 0x450955
mov ecx, esi
call fcn.00453a10
push esi
call fcn.004c7e56
add esp, 4
test ebx, ebx
je 0x45099c
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x274]
push eax
push ecx
lea edx, [esp + 0x74]
push 0x105
push edx
call dword [sym.imp.kernel32.dll_GetFullPathNameA]
lea eax, [esp + 0x274]
push eax
call fcn.00442c90
mov ecx, dword [ebp + 0x34]
mov edx, dword [ebp + 0x38]
add esp, 4
mov dword [edx + ecx*4], eax
mov eax, dword [ebp + 0x34]
inc eax
mov dword [ebp + 0x34], eax
jmp 0x4509a7
mov esi, dword [esp + 0x10]
mov dword [ebp + 0x3c], 1
test edi, edi
je 0x4509d1
cmp byte [edi], 0
je 0x4509bb
push edi
call dword [sym.imp.kernel32.dll_lstrlen]
lea edi, [edi + eax + 1]
test edi, edi
je 0x4509d1
cmp byte [edi], 0
je 0x4509d1
cmp dword [ebp + 0x34], 0x2710
jl 0x45088d
mov eax, dword [ebp + 0x34]
shl eax, 2
push eax
call fcn.004c7e90
mov edx, dword [ebp + 0x34]
add esp, 4
xor ecx, ecx
test edx, edx
jle 0x4509fd
mov edi, dword [ebp + 0x38]
sub edx, ecx
mov edi, dword [edi + ecx*4]
inc ecx
mov dword [eax + edx*4 - 4], edi
mov edx, dword [ebp + 0x34]
cmp ecx, edx
jl 0x4509e9
mov edx, dword [ebp + 0x34]
xor ecx, ecx
test edx, edx
jle 0x450a17
mov edx, dword [ebp + 0x38]
mov edi, dword [eax + ecx*4]
mov dword [edx + ecx*4], edi
mov edx, dword [ebp + 0x34]
inc ecx
cmp ecx, edx
jl 0x450a06
push eax
call fcn.004c7e56
add esp, 4
jmp 0x450b76
test eax, eax
je 0x450a49
push 0x4ee5f0
push esi
call fcn.004c9228
push 0x4ee5f0
push 0
mov dword [esp + 0x24], eax
call fcn.004c9228
add esp, 0x10
mov edi, eax
mov ebx, dword [esp + 0x18]
test edi, edi
je 0x450a66
mov eax, dword [esp + 0x14]
push edi
lea ecx, [esp + 0x70]
push eax
push ecx
call fcn.00442e30
add esp, 0xc
jmp 0x450a72
lea edx, [esp + 0x6c]
push esi
push edx
call dword [sym.imp.kernel32.dll_lstrcpy]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x450aa3
lea eax, [esp + 0x6c]
push 0x2e
push eax
call fcn.004c82b0
add esp, 8
test eax, eax
je 0x450aa3
push 0x4efe6c
push eax
call dword [sym.imp.kernel32.dll_lstrcmpi]
test eax, eax
je 0x450aa3
mov ebx, 1
jmp 0x450b06
test ebx, ebx
jne 0x450b06
push 0x5c
call fcn.004c7e90
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x594], 1
je 0x450ad4
lea ecx, [esp + 0x6c]
push ecx
mov ecx, eax
call fcn.004537e0
mov esi, eax
jmp 0x450ad6
xor esi, esi
mov ecx, esi
mov dword [esp + 0x594], 0xffffffff
call fcn.004544a0
test esi, esi
mov ebx, eax
je 0x450afe
mov ecx, esi
call fcn.00453a10
push esi
call fcn.004c7e56
add esp, 4
test ebx, ebx
je 0x450b45
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x68]
lea eax, [esp + 0x274]
push edx
push eax
lea ecx, [esp + 0x74]
push 0x105
push ecx
call dword [sym.imp.kernel32.dll_GetFullPathNameA]
lea edx, [esp + 0x274]
push edx
call fcn.00442c90
mov ecx, dword [ebp + 0x34]
mov edx, dword [ebp + 0x38]
add esp, 4
mov dword [edx + ecx*4], eax
mov eax, dword [ebp + 0x34]
inc eax
mov dword [ebp + 0x34], eax
jmp 0x450b50
mov esi, dword [esp + 0x10]
mov dword [ebp + 0x3c], 1
test edi, edi
je 0x450b76
push 0x4ee5f0
push 0
call fcn.004c9228
mov edi, eax
add esp, 8
test edi, edi
je 0x450b76
cmp dword [ebp + 0x34], 0x2710
jl 0x450a4d
push esi
call fcn.004c7e56
mov eax, dword [ebp + 0x34]
add esp, 4
test eax, eax
je 0x450bac
mov ecx, dword [ebp + 0x38]
lea eax, [esp + 0x10]
push eax
push 0x4fc044
mov edx, dword [ecx]
push 0x105
push edx
call dword [sym.imp.kernel32.dll_GetFullPathNameA]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x450bac
mov byte [eax], 0
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
push eax
call dword [sym.imp.user32.dll_SetCursor]
mov eax, dword [0x4f0668]
mov ecx, dword [ebp + 0x34]
mov dword [ebp + 0x10], eax
xor eax, eax
test ecx, ecx
setne al
mov ecx, dword [esp + 0x58c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x588
ret