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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x511030
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x511483
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x74c]
lea eax, [ebp - 0xc]
mov ecx, 0x51149c
call fcn.00403f60
mov eax, dword [ebp - 0xc]
call fcn.004040d8
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x511090
and eax, 1
cmp eax, 1
jne 0x511090
push 0x80
mov eax, dword [ebp - 0xc]
call fcn.004040d8
push eax
call sub.kernel32.dll_SetFileAttributesA
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x74c]
lea eax, [ebp - 0x1c]
mov ecx, 0x51149c
call fcn.00403f60
mov ecx, dword [ebp - 0x1c]
mov dl, 1
mov eax, dword [0x46d908]
call fcn.0046da58
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
mov edx, dword [eax]
call dword [edx + 0x14]
mov dword [ebp - 8], eax
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.0043116c
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0xc]
call fcn.0040876c
cmp dword [ebp - 0xc], 0
je 0x511265
cmp dword [ebp - 8], 0
jne 0x511115
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x5111d9
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x14], 0xffffffff
mov ebx, dword [ebp - 8]
dec ebx
test ebx, ebx
jl 0x51115d
inc ebx
xor esi, esi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
lea ecx, [ebp - 0x24]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0xc]
call fcn.00404024
jne 0x511159
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x14], esi
jmp 0x51115d
inc esi
dec ebx
jne 0x51112b
cmp byte [ebp - 0xd], 0
jne 0x5111ab
cmp dword [ebp - 8], 0xa
jl 0x511191
mov ebx, dword [ebp - 8]
dec ebx
sub ebx, 9
jl 0x511191
inc ebx
mov esi, 9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
mov edx, esi
mov ecx, dword [eax]
call dword [ecx + 0x44]
inc esi
dec ebx
jne 0x511178
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov ebx, dword [eax]
call dword [ebx + 0x54]
jmp 0x5111d9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
mov edx, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov ebx, dword [eax]
call dword [ebx + 0x54]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
mov edx, dword [ebp - 0xc]
call fcn.0043119c
xor eax, eax
push ebp
push 0x51125e
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 0x5114b0
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
mov edx, dword [eax]
call dword [edx + 0x14]
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x511250
inc ebx
xor esi, esi
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30c]
call fcn.004bb284
lea ecx, [ebp - 0x28]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov ecx, dword [ebp - 0x28]
mov edx, 0x5114b0
mov eax, dword [ebp - 0x18]
mov edi, dword [eax]
call dword [edi + 4]
inc esi
dec ebx
jne 0x511222
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x511265
ret
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
mov edx, dword [eax]
call dword [edx + 0x14]
mov dword [ebp - 8], eax
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.0043116c
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0xc]
call fcn.0040876c
cmp dword [ebp - 0xc], 0
je 0x511412
cmp dword [ebp - 8], 0
jne 0x5112c2
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x511386
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x14], 0xffffffff
mov ebx, dword [ebp - 8]
dec ebx
test ebx, ebx
jl 0x51130a
inc ebx
xor esi, esi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
lea ecx, [ebp - 0x30]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0xc]
call fcn.00404024
jne 0x511306
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x14], esi
jmp 0x51130a
inc esi
dec ebx
jne 0x5112d8
cmp byte [ebp - 0xd], 0
jne 0x511358
cmp dword [ebp - 8], 0xa
jl 0x51133e
mov ebx, dword [ebp - 8]
dec ebx
sub ebx, 9
jl 0x51133e
inc ebx
mov esi, 9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
mov edx, esi
mov ecx, dword [eax]
call dword [ecx + 0x44]
inc esi
dec ebx
jne 0x511325
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov ebx, dword [eax]
call dword [ebx + 0x54]
jmp 0x511386
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
mov edx, dword [ebp - 0x14]
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov ebx, dword [eax]
call dword [ebx + 0x54]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
mov edx, dword [ebp - 0xc]
call fcn.0043119c
xor eax, eax
push ebp
push 0x51140b
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 0x5114c4
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
mov edx, dword [eax]
call dword [edx + 0x14]
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x5113fd
inc ebx
xor esi, esi
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
call fcn.004bb284
lea ecx, [ebp - 0x34]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov ecx, dword [ebp - 0x34]
mov edx, 0x5114c4
mov eax, dword [ebp - 0x18]
mov edi, dword [eax]
call dword [edi + 4]
inc esi
dec ebx
jne 0x5113cf
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x511412
ret
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3f4]
call fcn.004baafc
push eax
mov ecx, 0x5114d8
mov edx, 0x5114e8
mov eax, dword [ebp - 0x18]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x18]
call fcn.00402f48
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51148a
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.00403cb8
lea eax, [ebp - 0x2c]
call fcn.00403c94
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00403cb8
lea eax, [ebp - 0x20]
call fcn.00403c94
lea eax, [ebp - 0x1c]
call fcn.00403c94
lea eax, [ebp - 0xc]
call fcn.00403c94
ret