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

Disassembly:
push 0xffffffffffffffff
push 0x4cb42c
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.004be967
mov ecx, eax
mov eax, dword [ebp + 0x30]
add esp, 4
mov dword [esp + 0x10], ecx
test eax, eax
je 0x4581ee
cmp byte [eax], 0
je 0x4581ee
push 0x104
push ecx
push eax
call sub.comdlg32.dll_GetFileTitleA
jmp 0x4581f1
mov byte [ecx], 0
mov eax, dword [ebp + 0x10]
mov dword [0x4e2778], eax
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp + 0x24]
mov dword [0x4e2780], ecx
mov dword [0x4e2784], edx
mov eax, dword [ebp + 0x14]
mov dword [0x4eba78], eax
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x45823c
cmp byte [eax], 0
je 0x45823c
lea ecx, [esp + 0x37c]
push ecx
push eax
call fcn.0044a3b0
lea edx, [esp + 0x384]
add esp, 8
mov dword [ebp + 0x2c], edx
jmp 0x45824a
mov eax, dword [ebp + 0x2c]
test eax, eax
jne 0x45824a
mov dword [ebp + 0x2c], 0x4eba7c
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, 0x2d
mov esi, str.Image_Files
lea edi, [esp + 0x174]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 0x12
lea edi, [esp + 0x229]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x174]
push edx
call edi
lea esi, [esp + eax + 0x175]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4582e9
push str._.AIS
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call edi
lea esi, [esi + eax + 1]
push str.Image_sequences__.AIS_
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call edi
lea esi, [esi + eax + 1]
push str..AIS
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call edi
lea esi, [esi + eax + 1]
jmp 0x4582f2
push esi
call edi
add esi, eax
mov byte [esi], 0
inc esi
push str.All_Files__._
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call edi
lea esi, [esi + eax + 1]
push 0x4e0930
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call edi
mov byte [eax + esi + 1], 0
mov eax, dword [ebp]
mov dword [0x4eba58], eax
mov edx, dword [ebp]
mov ecx, 0x13
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 4]
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x174]
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp + 0x2c]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x24], edx
mov edx, dword [ebp + 0x28]
inc eax
mov dword [esp + 0x1c], 0x4c
mov dword [esp + 0x38], edi
mov dword [esp + 0x48], ecx
mov dword [esp + 0x3c], 0x186a0
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], 0x100c
mov dword [esp + 0x34], eax
call fcn.0044b410
test eax, eax
je 0x4583a7
mov eax, dword [esp + 0x50]
mov dword [esp + 0x5c], ebp
or eax, 0x80060
mov dword [esp + 0x60], 0x457d50
mov dword [esp + 0x50], eax
mov dword [esp + 0x64], 0x1f4
mov eax, dword [ebp + 8]
test eax, eax
je 0x4583b9
mov eax, dword [esp + 0x50]
or ah, 2
mov dword [esp + 0x50], eax
lea ecx, [esp + 0x1c]
push ecx
call sub.comdlg32.dll_GetOpenFileNameA
mov esi, eax
test esi, esi
jne 0x4583e4
call sub.comdlg32.dll_CommDlgExtendedError
cmp eax, 0x3002
jne 0x4583e4
lea edx, [esp + 0x1c]
mov byte [edi], 0
push edx
call sub.comdlg32.dll_GetOpenFileNameA
mov esi, eax
lea eax, [esp + 0x484]
push eax
call ebx
test esi, esi
jne 0x45840b
push edi
call fcn.004be975
mov ecx, dword [0x4e2778]
add esp, 4
mov dword [ebp + 0x10], ecx
xor eax, eax
jmp 0x4587ab
mov edx, dword [esp + 0x34]
mov dword [esp + 0x14], edi
xor edi, edi
dec edx
push 0x7f02
push edi
mov dword [ebp + 0x18], edx
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push 0x9c40
call fcn.004be967
add esp, 4
mov dword [ebp + 0x38], eax
call fcn.0044b410
test eax, eax
mov eax, dword [ebp + 8]
je 0x4585f9
test eax, eax
je 0x45845f
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + esi + 1]
mov ebx, dword [esp + 0x14]
xor esi, esi
cmp edi, esi
je 0x458483
cmp byte [edi], 0
je 0x458483
mov eax, dword [esp + 0x10]
push edi
lea ecx, [esp + 0x70]
push eax
push ecx
call fcn.0044a2d0
add esp, 0xc
jmp 0x458493
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x6c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x6c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4584af
lea edx, [esp + 0x6c]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [ebp + 0xc], esi
je 0x4584de
lea eax, [esp + 0x6c]
push 0x2e
push eax
call fcn.004bea30
add esp, 8
cmp eax, esi
je 0x4584de
push str..ais
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4584de
mov ebx, 1
jmp 0x458535
cmp ebx, esi
jne 0x458535
push 0x5c
call fcn.004be967
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, esi
mov dword [esp + 0x594], esi
je 0x458509
lea ecx, [esp + 0x6c]
push ecx
mov ecx, eax
call fcn.00459cd0
mov esi, eax
mov ecx, esi
mov dword [esp + 0x594], 0xffffffff
call fcn.0045a9a0
test esi, esi
mov ebx, eax
je 0x458531
mov ecx, esi
call fcn.00459f00
push esi
call fcn.004be975
add esp, 4
test ebx, ebx
je 0x458574
lea edx, [esp + 0x18]
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.0044a200
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 0x45857b
mov dword [ebp + 0x3c], 1
test edi, edi
je 0x4585a5
cmp byte [edi], 0
je 0x45858f
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [edi + eax + 1]
test edi, edi
je 0x4585a5
cmp byte [edi], 0
je 0x4585a5
cmp dword [ebp + 0x34], 0x2710
jl 0x458463
mov eax, dword [ebp + 0x34]
shl eax, 2
push eax
call fcn.004be967
mov edx, dword [ebp + 0x34]
add esp, 4
xor ecx, ecx
test edx, edx
jle 0x4585d1
mov esi, dword [ebp + 0x38]
sub edx, ecx
mov esi, dword [esi + ecx*4]
inc ecx
mov dword [eax + edx*4 - 4], esi
mov edx, dword [ebp + 0x34]
cmp ecx, edx
jl 0x4585bd
mov edx, dword [ebp + 0x34]
xor ecx, ecx
test edx, edx
jle 0x4585eb
mov edx, dword [ebp + 0x38]
mov esi, dword [eax + ecx*4]
mov dword [edx + ecx*4], esi
mov edx, dword [ebp + 0x34]
inc ecx
cmp ecx, edx
jl 0x4585da
push eax
call fcn.004be975
add esp, 4
jmp 0x45874a
test eax, eax
je 0x458621
mov eax, dword [esp + 0x10]
push 0x4e073c
push eax
call fcn.004bf9e5
push 0x4e073c
push 0
mov dword [esp + 0x24], eax
call fcn.004bf9e5
add esp, 0x10
mov edi, eax
mov ebx, dword [esp + 0x18]
test edi, edi
je 0x45863e
mov ecx, dword [esp + 0x14]
push edi
lea edx, [esp + 0x70]
push ecx
push edx
call fcn.0044a2d0
add esp, 0xc
jmp 0x45864e
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x6c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x45867f
lea edx, [esp + 0x6c]
push 0x2e
push edx
call fcn.004bea30
add esp, 8
test eax, eax
je 0x45867f
push str..ais
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x45867f
mov ebx, 1
jmp 0x4586de
test ebx, ebx
jne 0x4586de
push 0x5c
call fcn.004be967
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x594], 1
je 0x4586b0
lea ecx, [esp + 0x6c]
push ecx
mov ecx, eax
call fcn.00459cd0
mov esi, eax
jmp 0x4586b2
xor esi, esi
mov ecx, esi
mov dword [esp + 0x594], 0xffffffff
call fcn.0045a9a0
test esi, esi
mov ebx, eax
je 0x4586da
mov ecx, esi
call fcn.00459f00
push esi
call fcn.004be975
add esp, 4
test ebx, ebx
je 0x45871d
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.0044a200
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 0x458724
mov dword [ebp + 0x3c], 1
test edi, edi
je 0x45874a
push 0x4e073c
push 0
call fcn.004bf9e5
mov edi, eax
add esp, 8
test edi, edi
je 0x45874a
cmp dword [ebp + 0x34], 0x2710
jl 0x458625
mov eax, dword [esp + 0x10]
push eax
call fcn.004be975
mov eax, dword [ebp + 0x34]
add esp, 4
test eax, eax
je 0x458784
mov edx, dword [ebp + 0x38]
lea ecx, [esp + 0x10]
push ecx
push 0x4eba7c
mov eax, dword [edx]
push 0x105
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x458784
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 ecx, dword [0x4e2778]
xor eax, eax
mov dword [ebp + 0x10], ecx
mov ecx, dword [ebp + 0x34]
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