Function at 0x412ea6
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov eax, 0x4c550c
call fcn.004bf97c
sub esp, 0x14
push esi
xor esi, esi
cmp dword [ebx + 0x344], esi
push edi
je 0x412ee9
mov eax, dword [ebx + 0x64]
mov eax, dword [eax + 4]
cmp eax, esi
mov dword [ebp - 0x14], eax
jle 0x412ee9
lea edi, [ebx + 0x310]
mov ecx, dword [ebx + 0x64]
mov eax, esi
call fcn.004ad145
push dword [eax]
call fcn.0040e5af
inc esi
cmp esi, dword [ebp - 0x14]
jl 0x412ed2
cmp dword [ebp + 8], 0
jne 0x41302a
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 4
mov eax, dword [ebx + 0x64]
xor esi, esi
cmp dword [eax + 4], esi
jbe 0x4130fd
mov eax, dword [eax]
mov eax, dword [eax]
push 1
lea ecx, [ebx + 0x148]
push ecx
push eax
call fcn.00488b20
mov eax, dword [ebx + 0x64]
cmp dword [eax + 4], esi
jbe 0x4130fd
mov eax, dword [eax]
push dword [eax]
call fcn.0048a654
cmp eax, esi
mov dword [ebp - 0x14], eax
jge 0x4130e6
mov eax, dword [ebx + 0x64]
cmp dword [eax + 4], esi
jbe 0x4130fd
mov eax, dword [eax]
push dword [eax]
lea eax, [ebp - 0x20]
call fcn.0040405d
mov ecx, eax
lea esi, [ebp - 0x18]
call fcn.00402f86
and dword [ebp - 4], 0
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff4
cmp eax, dword [0x4e4154]
je 0x412f80
push eax
call fcn.00401377
mov eax, dword [ebx + 0x64]
cmp dword [eax + 4], 0
jbe 0x4130fd
mov eax, dword [eax]
push dword [eax]
call fcn.0040d97f
test eax, eax
mov esi, dword [ebp - 0x18]
jne 0x41304d
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x41304d
test al, 1
je 0x41304d
mov eax, dword [0x4e4150]
push 0x814f
push dword [0x4e5994]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
call fcn.00403664
mov edi, dword [ebp - 0x10]
push 0x34
push dword [0x4e5c1c]
push edi
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x41303c
and dword [ebp + 8], 0xfffffffe
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x41303c
lea eax, [edi - 0xc]
cmp eax, dword [0x4e4154]
je 0x413015
push eax
call fcn.00401377
or dword [ebp - 4], 0xffffffff
lea eax, [esi - 0xc]
cmp eax, dword [0x4e4154]
je 0x41302a
push eax
call fcn.00401377
cmp dword [ebx + 0x340], 0
je 0x412f05
jmp 0x412ef3
lea eax, [edi - 0xc]
cmp eax, dword [0x4e4154]
je 0x41304d
push eax
call fcn.00401377
mov eax, dword [0x4e4150]
push 0x814e
push dword [0x4e5994]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
call fcn.00403664
lea eax, [ebp + 0xb]
push eax
xor edi, edi
inc edi
lea eax, [ebp - 0x10]
mov byte [ebp + 0xb], 0xa
call fcn.00403448
mov eax, dword [ebp - 0x14]
lea ecx, [ebp + 8]
and eax, 0xffff
push ecx
call fcn.0049a141
pop ecx
lea ecx, [ebp - 0x10]
push ecx
call fcn.004057ee
mov eax, dword [ebp + 8]
add eax, 0xfffffff4
cmp eax, dword [0x4e4154]
je 0x4130ab
push eax
call fcn.00401377
mov edi, dword [ebp - 0x10]
push 0x10
push dword [0x4e5c1c]
push edi
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_MessageBoxA]
lea eax, [edi - 0xc]
cmp eax, dword [0x4e4154]
je 0x4130d1
push eax
call fcn.00401377
or dword [ebp - 4], 0xffffffff
lea eax, [esi - 0xc]
cmp eax, dword [0x4e4154]
je 0x4130e6
push eax
call fcn.00401377
lea eax, [ebx + 0x300]
cmp dword [eax + 4], 0
jbe 0x4130fd
mov ecx, dword [eax]
mov eax, dword [ebx + 0x64]
cmp dword [eax + 4], 0
ja 0x413107
push 0x80070057
call fcn.004010a4
mov eax, dword [eax]
push ecx
push dword [eax]
call fcn.0040dafb
push dword [ebx + 0x33c]
mov eax, dword [ebx + 0x68]
call fcn.0045f6f0
mov eax, dword [ebp - 0x14]
jmp 0x412ef5