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

Disassembly:
mov eax, 0x49a787
call fcn.00497cb0
mov eax, 0x10d8
call fcn.00497f60
push esi
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x9c]
call fcn.00483361
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x54]
push eax
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 4], esi
push dword [eax + 0x84]
call fcn.00404e9e
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 2
call fcn.004835c3
lea eax, [ebp - 0x54]
push eax
call fcn.00404e6e
test al, al
pop ecx
jne 0x405a38
lea eax, [ebp - 0x54]
call fcn.00404e88
test al, al
jne 0x405a38
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x40586e
lea eax, [ebp - 0x4c]
push 0x800
push eax
lea eax, [ebp - 0x8e4]
push eax
call dword [sym.imp.MSVCR71.dll_strncpy]
push esi
push esi
lea eax, [ebp - 0x8e4]
push 0x5c
push eax
mov byte [ebp - 0xe5], 0
call fcn.00483e53
mov edi, eax
add esp, 0x1c
cmp edi, esi
jne 0x4058a9
or esi, 0xffffffff
jmp 0x405a93
mov byte [edi], 0
inc edi
lea eax, [ebp - 0xe5]
sub eax, edi
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x84]
add eax, 0x98
push eax
lea ecx, [ebp - 0x8e4]
call fcn.004322b1
test al, al
je 0x4058a1
cmp dword [ebp + 0x10], esi
je 0x405a02
lea esi, [ebp - 0x54]
call fcn.00409fbd
call fcn.00409fed
lea eax, [ebp - 0x10e4]
push edi
push eax
call sub.MSVCR71.dll_strcpy
pop ecx
pop ecx
lea esi, [ebp - 0x10e4]
call fcn.00409e50
test al, al
mov eax, esi
lea ecx, [ebp - 0x78]
push eax
je 0x405948
call fcn.00483361
push 0
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0xe4]
push eax
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 3
mov ecx, dword [eax + 0x84]
call fcn.00409156
lea esi, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.004047cd
mov byte [ebp - 4], 3
jmp 0x405980
call fcn.00483361
push 1
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0xe4]
push eax
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 5
mov ecx, dword [eax + 0x84]
call fcn.00409156
lea esi, [ebp - 0x54]
mov byte [ebp - 4], 6
call fcn.004047cd
mov byte [ebp - 4], 5
lea eax, [ebp - 0xe4]
push eax
call fcn.00414041
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 2
call fcn.004835c3
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x4059a4
lea eax, [ebp - 0x4c]
push ebx
push eax
call dword [sym.imp.MSVCR71.dll__stati64]
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x405a93
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x4059c4
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405a93
or word [ebx + 6], 0x180
test al, 1
mov cx, word [ebx + 6]
mov word [ebx + 0xc], ax
je 0x4059ef
and cx, 0xff7f
mov word [ebx + 6], cx
test al, 2
je 0x405a93
and word [ebx + 6], 0xfe7f
jmp 0x405a93
push 2
pop eax
mov dword [ebx], eax
mov dword [ebx + 0x10], eax
mov eax, 0x12cf9510
mov word [ebx + 6], 0x1000
mov word [ebx + 4], si
mov word [ebx + 0xa], si
mov word [ebx + 0xc], si
mov word [ebx + 8], 1
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], esi
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x28], eax
jmp 0x405a93
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x405a44
lea eax, [ebp - 0x4c]
push ebx
push eax
call dword [sym.imp.MSVCR71.dll__stati64]
mov edi, eax
cmp edi, esi
pop ecx
pop ecx
jne 0x405a91
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x405a60
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405a91
or word [ebx + 6], 0x180
test al, 1
mov cx, word [ebx + 6]
mov word [ebx + 0xc], ax
je 0x405a87
and cx, 0xff7f
mov word [ebx + 6], cx
test al, 2
je 0x405a91
and word [ebx + 6], 0xfe7f
mov esi, edi
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x54]
push eax
call fcn.00414041
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret 0xc