Function at 0x461580
Capabilities:
Check if file exists
Get file attributes
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x21a8c
call fcn.004cdac0
cmp dword [0x4fb9e4], 4
mov eax, ecx
mov ecx, dword [0x4fd218]
push ebx
push esi
push edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
jl 0x4615c8
push 0x4cfc40
push 0
push str.The_maximum_number_of_File_Dialogs_has_been_reached.
mov ecx, eax
call fcn.0044e880
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp + 0xc]
xor eax, eax
mov ebx, dword [sym.imp.VCRUNTIME140.dll_wcschr]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov word [esp + 0x1a98], ax
test edx, edx
je 0x461729
cmp word [edx], ax
je 0x461729
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4615f7
sub ecx, edi
lea eax, [esp + 0x90]
sar ecx, 1
cmp ecx, 0x104
jb 0x461624
push 0x104
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
jmp 0x46163a
push 0x103
push edx
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0x296], ax
push 3
lea eax, [esp + 0x94]
push 0x4eeeac
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
add esp, 0xc
test eax, eax
sete byte [esp + 0x13]
test eax, eax
lea eax, [esp + 0x90]
jne 0x4616b0
push 0x7d
push eax
call ebx
add esp, 8
test eax, eax
je 0x461733
cmp word [eax + 2], 0
je 0x461733
lea ecx, [esp + 0x90]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461690
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x8e], 0x5c
je 0x461733
jmp 0x4616c0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4616c0
test al, 0x10
jne 0x461733
lea eax, [esp + 0x90]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x4616fe
push 0xfffe
lea ecx, [edi + 2]
push ecx
lea eax, [esp + 0x1aa0]
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a94], ax
mov word [edi], ax
jmp 0x461733
cmp byte [esp + 0x13], 0
jne 0x461733
push 0xfffe
lea eax, [esp + 0x94]
push eax
lea eax, [esp + 0x1aa0]
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0x21a94], ax
xor eax, eax
mov word [esp + 0x90], ax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x46175f
cmp word [eax], 0
je 0x46175f
push 0x3ff
push eax
lea eax, [esp + 0xaa0]
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0x1296], ax
jmp 0x46177f
push dword [0x4fe660]
lea eax, [esp + 0xa9c]
push str.Select_File____s
push 0x400
push eax
call fcn.004b1470
add esp, 0x10
mov edi, dword [ebp + 0x14]
xor eax, eax
mov word [esp + 0x1298], ax
mov word [esp + 0x298], ax
cmp word [edi], ax
je 0x4617f4
push 0x28
push edi
call ebx
add esp, 8
push 0x3ff
test eax, eax
je 0x4618d0
add eax, 2
push eax
lea eax, [esp + 0x2a0]
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0xa96], ax
lea eax, [esp + 0x298]
push 0x29
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x4617ea
xor ecx, ecx
mov word [eax], cx
jmp 0x4618e8
xor eax, eax
mov word [esp + 0x298], ax
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push 0x58
lea eax, [esp + 0x3c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [0x4f90f4]
add esp, 0xc
mov dword [esp + 0x38], 0x58
mov edi, dword [esi + 0x4c]
test edi, edi
je 0x461857
cmp dword [edi + 4], 0
jne 0x461b71
mov ecx, dword [edi]
cmp word [ecx], 0
jne 0x461b34
add dword [edi + 0x20], 0xffffffff
jne 0x461850
push ecx
call ebx
add esp, 4
push 0xd8
push edi
call fcn.004ccae4
add esp, 8
mov dword [esi + 0x4c], 0
mov dword [esp + 0x3c], 0
cmp word [esp + 0x1298], 0
lea eax, [esp + 0xa98]
mov esi, dword [ebp + 8]
mov ecx, str.All_Files__._
mov dword [esp + 0x68], eax
lea eax, [esp + 0x1298]
cmove eax, ecx
mov dword [esp + 0x58], 0xfffe
mov dword [esp + 0x44], eax
xor ecx, ecx
cmp word [esp + 0x90], cx
lea eax, [esp + 0x1a98]
movzx edi, word [esi]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x90]
cmove eax, ecx
mov byte [esp + 0x13], cl
xor bl, bl
mov dword [esp + 0x64], eax
test edi, 0xffffff80
je 0x461b80
xor eax, eax
jmp 0x461b8c
lea eax, [esp + 0x29c]
push edi
push eax
call esi
add esp, 0xc
xor eax, eax
mov word [esp + 0xa96], ax
cmp word [esp + 0x298], 0
je 0x4617f4
lea esi, [esp + 0x298]
or ebx, 0xffffffff
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x461904
sub esi, ecx
mov dword [esp + 0x14], 0
xor edi, edi
sar esi, 1
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], edi
cmp esi, 0x1388
jb 0x461aaf
lea eax, [esp + 0x298]
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], eax
push 0x4ed10c
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
add esp, 8
mov dword [esp + 0x34], eax
test eax, eax
je 0x4619fe
mov edx, dword [esp + 0x1c]
mov edi, eax
mov ecx, dword [esp + 0x18]
sub edi, edx
inc dword [esp + 0x20]
dec ebx
sar edi, 1
add ecx, edi
mov dword [esp + 0x30], ecx
cmp ecx, dword [esp + 0x24]
jb 0x4619be
lea edx, [esp + 0x298]
sub eax, edx
mov edx, dword [esp + 0x20]
sar eax, 1
push eax
push ecx
push esi
push ebx
or ecx, 0xffffffff
call fcn.004b2060
mov dword [esp + 0x34], eax
lea ecx, [eax + eax]
push ecx
push dword [esp + 0x28]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 0x18
test eax, eax
je 0x461a5d
mov edx, dword [esp + 0x1c]
mov ecx, eax
mov dword [esp + 0x14], ecx
jmp 0x4619c2
mov ecx, dword [esp + 0x14]
test edi, edi
je 0x4619e5
lea eax, [edi + edi]
push eax
mov eax, dword [esp + 0x1c]
push edx
lea eax, [ecx + eax*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov edi, dword [esp + 0x3c]
add esp, 0xc
mov dword [esp + 0x18], edi
jmp 0x4619e9
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x34]
add eax, 2
mov dword [esp + 0x1c], eax
test ebx, ebx
jne 0x461940
jmp 0x461a02
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x20], 0
je 0x461afc
lea ecx, [esp + 0x298]
sub eax, ecx
sar eax, 1
sub esi, eax
je 0x461a7a
lea ebx, [esi + edi]
mov edi, dword [esp + 0x14]
cmp ebx, dword [esp + 0x24]
jb 0x461a41
lea eax, [ebx*2 + 2]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
je 0x461a61
mov edi, eax
lea eax, [esi + esi]
push eax
mov eax, dword [esp + 0x1c]
push dword [esp + 0x20]
lea eax, [edi + eax*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, ebx
jmp 0x461a82
mov edi, dword [esp + 0x14]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test edi, edi
je 0x461b02
push edi
call ebx
add esp, 4
jmp 0x461b02
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov word [edi + eax*2], cx
lea eax, [eax*2 + 2]
push eax
lea eax, [esp + 0x29c]
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
push edi
call ebx
add esp, 4
jmp 0x461b02
lea edi, [esp + 0x298]
nop word [eax + eax]
push 0x4ed10c
push edi
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
mov edi, eax
add esp, 8
test edi, edi
je 0x461afc
lea eax, [esp + 0x298]
mov edx, edi
sub edx, eax
mov ecx, esi
sar edx, 1
lea eax, [edi + 2]
sub ecx, edx
add ecx, ecx
push ecx
push eax
push edi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
dec esi
sub ebx, 1
jne 0x461ac0
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push 0
push 0
push 0
lea eax, [esp + 0x2a4]
push eax
push 0
push dword [ebp + 0x14]
lea eax, [esp + 0x12b0]
push str._s_c_s_cAll_Files__.__c._c
push 0x400
push eax
call fcn.004b1470
add esp, 0x24
jmp 0x4617fa
call fcn.00487910
mov edi, eax
test edi, edi
je 0x461857
inc dword [edi + 0x20]
mov ebx, dword [esi + 0x4c]
add dword [ebx + 0x20], 0xffffffff
jne 0x461b68
push dword [ebx]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push 0xd8
push ebx
call fcn.004ccae4
add esp, 8
mov dword [esi + 0x4c], edi
mov esi, dword [0x4f90f4]
mov eax, dword [esi + 0x4c]
mov eax, dword [eax + 4]
mov dword [esp + 0x3c], eax
jmp 0x46185f
push 2
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
add esp, 8
mov ecx, edi
and ecx, 0xffffffdf
test eax, eax
cmove ecx, edi
cmp ecx, 0x4d
je 0x461ba7
cmp ecx, 0x53
jne 0x461bac
mov byte [esp + 0x13], 1
jmp 0x461ba9
mov bl, 1
add esi, 2
mov ecx, esi
call fcn.0041a370
test al, 0x20
mov ecx, 0x80004
mov edx, 0x180004
cmovne ecx, edx
mov dword [esp + 0x6c], ecx
test al, 0x10
je 0x461bd1
or ecx, 2
mov dword [esp + 0x6c], ecx
test al, 8
je 0x461bdf
or ecx, 0x2000
mov dword [esp + 0x6c], ecx
test bl, bl
jne 0x461be7
test al, 4
je 0x461bf1
or ecx, 0x200
mov dword [esp + 0x6c], ecx
test al, 2
je 0x461bff
or ecx, 0x800
mov dword [esp + 0x6c], ecx
test al, 1
je 0x461c0d
or ecx, 0x1000
mov dword [esp + 0x6c], ecx
call fcn.004b8ad0
push 0
push 0x403
push 0x44
push dword [0x4fb9e8]
mov bh, al
call dword [sym.imp.USER32.dll_PostMessageW]
inc dword [0x4fb9e4]
cmp byte [esp + 0x13], 0
jne 0x461c52
mov eax, dword [esp + 0x6c]
test al, 2
je 0x461c45
test eax, 0x2000
je 0x461c52
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
jmp 0x461c5d
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
dec dword [0x4fb9e4]
mov esi, eax
mov ecx, dword [0x4f90f4]
test bh, bh
sete al
mov byte [ecx + 0xee], bh
mov byte [ecx + 0xec], al
mov eax, dword [0x4fab50]
test eax, eax
je 0x461c9e
mov eax, dword [eax]
mov ecx, 0x4cfc40
test eax, eax
cmovne ecx, eax
cmp word [ecx], 0
je 0x461c9e
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 1
push 0
push 0xffffffffffffffff
test esi, esi
jne 0x461d17
mov ecx, dword [esp + 0x38]
push esi
call fcn.004b5b70
cmp eax, 1
je 0x461cc2
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
test eax, eax
je 0x461cf8
mov eax, dword [0x4f90f4]
test byte [eax + 0x100], 1
je 0x461cf8
mov ecx, dword [esp + 0x28]
push 0x4cfc40
push 0
push 0x4e613c
call fcn.0044e3e0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4fb9cc]
push 1
push 0
push 0xffffffffffffffff
push 0x4e613c
call fcn.004b5b70
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [0x4fb9cc]
push 0x4cfd08
call fcn.004b5b70
test dword [esp + 0x6c], 0x200
je 0x461e33
lea ecx, [esp + 0x1a98]
test bl, bl
je 0x461e0c
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461d47
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x1a9a], ax
jne 0x461dde
lea eax, [esp + 0x1a98]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x461e33
mov eax, 0xa
mov ecx, esi
mov word [esi], ax
lea eax, [esp + 0x1a98]
sub ecx, eax
and ecx, 0xfffffffe
cmp ecx, 4
jne 0x461e33
cmp word [esi - 2], 0x3a
jne 0x461e33
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x461db0
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 2]
push esi
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, 0x5c
add esp, 0xc
mov word [esi], ax
jmp 0x461e33
movzx eax, word [esp + 0x1a98]
lea ecx, [esp + 0x1a98]
mov edx, 0xa
test ax, ax
je 0x461e00
add ecx, 2
cmp word [ecx], 0
jne 0x461df7
cmp word [ecx + 2], 0
je 0x461e33
mov word [ecx], dx
jmp 0x461df7
movzx eax, word [esp + 0x1a98]
mov edx, 0xa
test ax, ax
je 0x461e29
nop
add ecx, 2
cmp word [ecx], 0
jne 0x461e20
mov word [ecx], dx
cmp word [ecx + 2], 0
jne 0x461e20
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x1a98]
push 1
push 0
push 0xffffffffffffffff
push eax
call fcn.004b5b70
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10