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

Disassembly:
mov eax, 0x49a507
call fcn.00497a30
mov eax, 0x10d8
call fcn.00497ce0
push esi
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x9c]
call fcn.00483141
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.00404e2d
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 2
call fcn.004833a3
lea eax, [ebp - 0x54]
push eax
call fcn.00404dfd
test al, al
pop ecx
jne 0x4059c7
lea eax, [ebp - 0x54]
call fcn.00404e17
test al, al
jne 0x4059c7
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x4057fd
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.00483c19
mov edi, eax
add esp, 0x1c
cmp edi, esi
jne 0x405838
or esi, 0xffffffff
jmp 0x405a22
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.00431d6c
test al, al
je 0x405830
cmp dword [ebp + 0x10], esi
je 0x405991
lea esi, [ebp - 0x54]
call fcn.00409f64
call fcn.00409f94
lea eax, [ebp - 0x10e4]
push edi
push eax
call sub.MSVCR71.dll_strcpy
pop ecx
pop ecx
lea esi, [ebp - 0x10e4]
call fcn.00409df7
test al, al
mov eax, esi
lea ecx, [ebp - 0x78]
push eax
je 0x4058d7
call fcn.00483141
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.0040910b
lea esi, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.0040476d
mov byte [ebp - 4], 3
jmp 0x40590f
call fcn.00483141
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.0040910b
lea esi, [ebp - 0x54]
mov byte [ebp - 4], 6
call fcn.0040476d
mov byte [ebp - 4], 5
lea eax, [ebp - 0xe4]
push eax
call fcn.00403e9b
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 2
call fcn.004833a3
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x405933
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 0x405a22
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x405953
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405a22
or word [ebx + 6], 0x180
test al, 1
mov cx, word [ebx + 6]
mov word [ebx + 0xc], ax
je 0x40597e
and cx, 0xff7f
mov word [ebx + 6], cx
test al, 2
je 0x405a22
and word [ebx + 6], 0xfe7f
jmp 0x405a22
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 0x405a22
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x4059d3
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 0x405a20
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x4059ef
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405a20
or word [ebx + 6], 0x180
test al, 1
mov cx, word [ebx + 6]
mov word [ebx + 0xc], ax
je 0x405a16
and cx, 0xff7f
mov word [ebx + 6], cx
test al, 2
je 0x405a20
and word [ebx + 6], 0xfe7f
mov esi, edi
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x54]
push eax
call fcn.00403e9b
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret 0xc