Function at 0x457844
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 4
push 0
push 0
dec ecx
jne 0x45784d
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
push ebp
push 0x457a81
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
mov edx, edi
call fcn.00404570
xor esi, esi
mov ebx, 1
mov eax, edi
call fcn.004047dc
cmp eax, ebx
jl 0x4578a1
cmp byte [edi + ebx - 1], 0x25
jne 0x45789c
test esi, esi
jne 0x457894
mov esi, ebx
test esi, esi
jle 0x45789c
cmp esi, ebx
jl 0x4578a1
inc ebx
cmp eax, ebx
jge 0x457887
test esi, esi
jle 0x457a59
cmp eax, ebx
jl 0x457a59
lea eax, [ebp - 4]
push eax
mov edi, ebx
sub edi, esi
mov ecx, edi
dec ecx
lea edx, [esi + 1]
mov eax, dword [ebp + 8]
mov eax, dword [eax]
call fcn.00404a3c
mov ecx, edi
inc ecx
mov eax, dword [ebp + 8]
mov edx, esi
call fcn.00404a7c
lea edx, [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00408230
mov eax, dword [ebp - 8]
mov edx, 0x457a9c
call fcn.00404928
jne 0x457917
lea edx, [ebp - 0x10]
xor eax, eax
call fcn.00402e64
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0xc]
call fcn.00408ae4
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov ecx, esi
call fcn.00404ac4
jmp 0x457a59
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 4]
call fcn.00408230
mov eax, dword [ebp - 0x14]
mov edx, 0x457aa8
call fcn.00404928
jne 0x457a41
mov ebx, 0x43
lea eax, [ebp - 4]
mov edx, dword [ebp + 8]
mov edx, dword [edx]
call fcn.004045b4
lea eax, [ebp - 0x1c]
mov edx, ebx
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x20]
call fcn.00403008
mov edx, 0x457ab0
lea eax, [ebp - 0x20]
mov cl, 2
call fcn.00402fd8
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x18]
call fcn.00404780
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 4]
mov ecx, esi
call fcn.00404ac4
cmp dword [ebp - 4], 0
mov eax, dword [ebp - 4]
call fcn.004047dc
test eax, eax
jle 0x4579ae
mov eax, dword [ebp - 4]
cmp byte [eax], 0x22
jne 0x4579ae
lea eax, [ebp - 4]
mov ecx, 1
mov edx, 1
call fcn.00404a7c
mov eax, dword [ebp - 4]
call fcn.004047dc
test eax, eax
jle 0x4579e3
mov eax, dword [ebp - 4]
call fcn.004047dc
mov edx, dword [ebp - 4]
cmp byte [edx + eax - 1], 0x22
jne 0x4579e3
mov eax, dword [ebp - 4]
call fcn.004047dc
mov edx, eax
lea eax, [ebp - 4]
mov ecx, 1
call fcn.00404a7c
mov eax, dword [ebp - 4]
call fcn.004049dc
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x457a35
lea eax, [ebp - 0x1c]
mov edx, ebx
mov byte [eax + 1], dl
mov byte [eax], 1
lea edx, [ebp - 0x1c]
lea eax, [ebp - 0x20]
call fcn.00403008
mov edx, 0x457ab0
lea eax, [ebp - 0x20]
mov cl, 2
call fcn.00402fd8
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x24]
call fcn.00404780
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp + 8]
mov ecx, esi
call fcn.00404ac4
jmp 0x457a59
inc ebx
cmp ebx, 0x5b
jne 0x45793a
jmp 0x457a59
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 4]
call fcn.0040db6c
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + 8]
mov ecx, esi
call fcn.00404ac4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x457a88
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00404540
lea eax, [ebp - 0x18]
mov edx, 6
call fcn.00404540
ret