Function at 0x4fed87
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebp
sub esp, 0x5c
mov eax, 0x6b3033
call fcn.00664608
sub esp, 0x74
push ebx
mov bl, byte [ebp + 0x6c]
xor eax, eax
push esi
or esi, 0xffffffff
mov dword [ebp + 0x54], esi
push edi
cmp bl, 1
je 0x4fedb3
mov byte [ebp + 0x5f], al
cmp bl, 4
jne 0x4fedb7
mov byte [ebp + 0x5f], 1
push 0x48
push eax
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0x6c]
push eax
mov dword [ebp - 0x7c], 1
mov dword [ebp - 0x78], 2
mov dword [ebp - 0x74], 3
mov dword [ebp - 0x70], 0xb
call fcn.006678b0
mov edi, dword [ebp + 0x68]
add esp, 0xc
movzx eax, bl
mov ebx, dword [ebp + 0x70]
push edi
mov eax, dword [ebp + eax*4 - 0x80]
mov ecx, dword [ebx]
mov dword [ebp + 0x58], eax
lea eax, [ebp + 0x34]
push eax
call fcn.004fac95
xor eax, eax
lea ecx, [ebp + 0x18]
mov dword [ebp - 4], eax
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x28], eax
mov dword [ebp + 0x2c], eax
lea eax, [ebp + 0x34]
push eax
call fcn.00427a37
mov eax, dword [ebx]
lea ecx, [ebp - 0x24]
add eax, 0x40
mov byte [ebp - 4], 1
xor ebx, ebx
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
call fcn.00427a37
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 2
push eax
call fcn.00451a5f
test al, al
jne 0x4feeea
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x4fee59
mov eax, dword [ebp + 0x34]
push eax
lea eax, [ebp]
push eax
call fcn.0046665e
lea ecx, [ebp + 0x18]
cmp ecx, eax
je 0x4fee76
mov byte [ebp + 0x68], bl
push dword [ebp + 0x68]
push eax
call fcn.00427ad3
lea ecx, [ebp]
call fcn.00427afc
call fcn.00466149
mov dword [ebp], ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], 7
test eax, eax
je 0x4fee9d
push eax
lea ecx, [ebp]
call fcn.00427ba3
mov byte [ebp + 0x68], bl
lea eax, [ebp]
push dword [ebp + 0x68]
lea ecx, [ebp - 0x24]
push eax
call fcn.00427ad3
mov eax, dword [ebp + 0x14]
cmp eax, 8
jb 0x4feeea
mov ecx, dword [ebp]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x68], eax
mov dword [ebp + 0x30], ecx
cmp eax, 0x1000
jb 0x4feee1
lea eax, [ebp + 0x68]
push eax
lea eax, [ebp + 0x30]
push eax
call fcn.004279ae
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x30]
push eax
push ecx
call fcn.006643a9
pop ecx
pop ecx
cmp dword [ebp + 0x2c], 8
lea eax, [ebp + 0x18]
jb 0x4feef6
mov eax, dword [ebp + 0x18]
push eax
call fcn.00454c25
cmp dword [edi + 0xc], edx
jb 0x4fef15
ja 0x4fef08
cmp dword [edi + 8], eax
jbe 0x4fef15
mov ebx, dword [ebp + 0x74]
mov eax, 0xdf
jmp 0x4fefa5
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x50], ebx
jb 0x4fef27
mov eax, dword [ebp + 0x34]
lea ecx, [ebp + 0x4c]
push ecx
push eax
call fcn.0045530f
mov ebx, dword [ebp + 0x74]
test al, al
je 0x4fefac
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x4fefac
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
jne 0x4fefac
cmp byte [ebp + 0x5f], 0
jne 0x4fefca
cmp byte [ebp + 0x6c], 3
jne 0x4ff04d
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x4fef6c
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
je 0x4ff04d
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x4fef78
mov eax, dword [ebp + 0x34]
push eax
call fcn.00453a60
push dword [ebp + 0x7c]
push 0
push ebx
push dword [ebp + 0x70]
push 1
push edi
call fcn.004fed87
mov ecx, eax
mov dword [ebp + 0x54], ecx
cmp ecx, esi
jne 0x4ff074
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [ebp + 0x54]
mov dword [ebx], eax
jmp 0x4ff1f9
cmp byte [ebp + 0x5f], 0
mov dword [ebp + 0x4c], esi
mov dword [ebp + 0x50], esi
je 0x4fef4e
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x4fefc4
mov eax, dword [ebp + 0x34]
push eax
call fcn.00453a60
cmp byte [0x7c2a34], 0
jne 0x4feff3
cmp byte [0x7c2a33], 0
je 0x4feffa
cmp dword [ebp + 0x2c], 8
lea eax, [ebp + 0x18]
jb 0x4fefe8
mov eax, dword [ebp + 0x18]
push eax
call fcn.0051c78b
cmp eax, 1
jne 0x4feffa
mov dword [ebp + 0x58], 0xb
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x4ff006
mov eax, dword [ebp + 0x34]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, esi
je 0x4ff02c
test al, 1
je 0x4ff02c
cmp dword [ebp + 0x48], 8
lea ecx, [ebp + 0x34]
jb 0x4ff021
mov ecx, dword [ebp + 0x34]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp byte [0x7c2a32], 0
jne 0x4ff03f
mov eax, dword [ebp + 0x4c]
and eax, dword [ebp + 0x50]
cmp eax, esi
jne 0x4ff04d
cmp byte [ebp + 0x6c], 4
je 0x4ff04d
push 0xa
pop edx
mov dword [ebp + 0x58], edx
jmp 0x4ff050
mov edx, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x54]
cmp ecx, esi
jne 0x4ff074
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x4ff063
mov eax, dword [ebp + 0x34]
push 0x80
push edx
push eax
call fcn.00452e49
mov ecx, eax
mov dword [ebp + 0x54], ecx
mov eax, dword [0x7c2a3c]
mov dword [ebp + 0x68], eax
cmp ecx, esi
jne 0x4ff185
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
je 0x4ff11f
call ebx
cmp dword [ebp + 0x58], 0xa
mov ecx, dword [ebp + 0x74]
mov dword [ecx], eax
jne 0x4ff0e1
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x4ff0b4
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
jne 0x4ff0b4
xor ecx, ecx
inc ecx
jmp 0x4ff0b7
push 6
pop ecx
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
mov dword [ebp + 0x58], ecx
jb 0x4ff0c6
mov eax, dword [ebp + 0x34]
push 0x80
push ecx
push eax
call fcn.00452e49
mov dword [ebp + 0x54], eax
call ebx
mov ecx, dword [ebp + 0x74]
mov dword [ecx], eax
mov ecx, dword [ebp + 0x54]
jmp 0x4ff110
cmp eax, 0x20
jne 0x4ff132
push 0xc8
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x4ff0fd
mov eax, dword [ebp + 0x34]
push 0x80
push dword [ebp + 0x58]
push eax
call fcn.00452e49
mov ecx, eax
mov dword [ebp + 0x54], ecx
mov eax, dword [ebp + 0x68]
dec eax
mov dword [ebp + 0x68], eax
cmp ecx, esi
je 0x4ff08a
cmp ecx, esi
jne 0x4ff182
call ebx
mov ecx, dword [ebp + 0x74]
mov esi, dword [ebp + 0x54]
mov dword [ecx], eax
jmp 0x4ff1f9
cmp byte [ebp + 0x6c], 3
je 0x4ff13e
cmp byte [ebp + 0x78], 0
je 0x4ff151
mov ecx, eax
cmp eax, 0x490
je 0x4ff173
cmp eax, 2
je 0x4ff173
cmp eax, 3
je 0x4ff173
cmp dword [ebp + 0x48], 8
lea ecx, [ebp + 0x34]
jb 0x4ff15d
mov ecx, dword [ebp + 0x34]
push eax
push ecx
push str.Error_opening___s_:__E
call fcn.004704f0
mov eax, dword [ebp + 0x74]
add esp, 0xc
mov ecx, dword [eax]
jmp 0x4ff176
mov eax, dword [ebp + 0x74]
test ecx, ecx
jne 0x4ff1f9
mov dword [eax], 2
jmp 0x4ff1f9
mov ebx, dword [ebp + 0x74]
cmp byte [ebp + 0x5f], 0
je 0x4ff1ec
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x4ff19b
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
je 0x4ff1d2
mov eax, dword [ebp + 0x70]
push dword [ebp + 0x7c]
mov eax, dword [eax]
cmp dword [eax + 0xd8], 0
lea eax, [ebp + 0x34]
setne byte [ebp + 0x6c]
push dword [ebp + 0x6c]
push ebx
push dword [ebp + 0x58]
push edi
push eax
push ecx
call fcn.00501df3
test eax, eax
jne 0x4ff1cf
lea eax, [ebp + 0x54]
push eax
call fcn.00452ddb
jmp 0x4ff1f9
mov ecx, dword [ebp + 0x54]
mov eax, dword [ebp + 0x70]
mov eax, dword [eax]
cmp byte [eax + 0xd0], 0
jne 0x4ff1ec
lea eax, [ebp + 0x34]
push eax
call fcn.00538fc7
mov ecx, dword [ebp + 0x54]
mov al, byte [edi + 0x6a]
mov esi, ecx
and al, 0xfe
or al, byte [ebp + 0x5f]
mov byte [edi + 0x6a], al
mov eax, dword [ebp - 0x10]
cmp eax, 8
jb 0x4ff234
mov ecx, dword [ebp - 0x24]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x6c], eax
mov dword [ebp + 0x78], ecx
cmp eax, 0x1000
jb 0x4ff22b
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.004279ae
mov eax, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x78]
push eax
push ecx
call fcn.006643a9
pop ecx
pop ecx
mov eax, dword [ebp + 0x2c]
cmp eax, 8
jb 0x4ff26f
mov ecx, dword [ebp + 0x18]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x6c], eax
mov dword [ebp + 0x78], ecx
cmp eax, 0x1000
jb 0x4ff266
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.004279ae
mov eax, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x78]
push eax
push ecx
call fcn.006643a9
pop ecx
pop ecx
and dword [ebp + 0x28], 0
lea ecx, [ebp + 0x34]
xor eax, eax
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
call fcn.00427afc
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add ebp, 0x60
leave
ret 0x18