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

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6a833a
call fcn.00640244
sub esp, 0x74
push ebx
mov bl, byte [ebp + 0x68]
push esi
or esi, 0xffffffff
mov dword [ebp + 0x50], esi
push edi
cmp bl, 1
je 0x50a90f
cmp bl, 4
je 0x50a90f
xor bh, bh
jmp 0x50a911
mov bh, 1
and dword [ebp - 0x80], 0
lea eax, [ebp - 0x6c]
push 0x48
push 0
push eax
mov byte [ebp + 0x57], bh
mov dword [ebp - 0x7c], 1
mov dword [ebp - 0x78], 2
mov dword [ebp - 0x74], 3
mov dword [ebp - 0x70], 0xb
call fcn.0065ab80
mov ecx, dword [ebp + 0x6c]
add esp, 0xc
mov edi, dword [ebp + 0x64]
movzx eax, bl
mov ecx, dword [ecx]
push edi
mov eax, dword [ebp + eax*4 - 0x80]
mov dword [ebp + 0x58], eax
lea eax, [ebp + 0x30]
push eax
call fcn.00506795
and dword [ebp - 4], 0
lea eax, [ebp + 0x30]
push eax
lea ecx, [ebp + 0x18]
call fcn.00427b8e
mov eax, dword [ebp + 0x6c]
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
mov eax, dword [eax]
add eax, 0x40
push eax
call fcn.00427b8e
cmp dword [ebp + 0x2c], 8
mov eax, dword [ebp + 0x18]
mov byte [ebp - 4], 2
jae 0x50a995
lea eax, [ebp + 0x18]
push eax
call fcn.004606c8
test al, al
jne 0x50a9ee
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50a9ab
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp]
push eax
call fcn.0047354f
push eax
lea ecx, [ebp + 0x18]
call fcn.00427c6d
push 0
push 1
lea ecx, [ebp]
call fcn.004281f2
call fcn.004730e2
push eax
lea eax, [ebp]
push eax
call fcn.00429352
push eax
lea ecx, [ebp - 0x24]
call fcn.00427c6d
push 0
push 1
lea ecx, [ebp]
call fcn.004281f2
cmp dword [ebp + 0x2c], 8
mov eax, dword [ebp + 0x18]
jae 0x50a9fa
lea eax, [ebp + 0x18]
push eax
call fcn.00462b13
cmp dword [edi + 0xc], edx
jb 0x50aa1a
ja 0x50aa0c
cmp dword [edi + 8], eax
jbe 0x50aa1a
mov eax, dword [ebp + 0x70]
mov dword [eax], 0xdf
jmp 0x50acea
and dword [ebp + 0x48], 0
and dword [ebp + 0x4c], 0
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50aa2e
lea eax, [ebp + 0x30]
lea ecx, [ebp + 0x48]
push ecx
push eax
call fcn.00694cab
test al, al
je 0x50aa4c
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x50aa4c
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x50aa6c
mov dword [ebp + 0x48], esi
mov dword [ebp + 0x4c], esi
test bh, bh
je 0x50aaf6
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50aa66
lea eax, [ebp + 0x30]
push eax
call fcn.00461e6d
test bh, bh
je 0x50aaf6
cmp byte [0x7b90c4], 0
jne 0x50aa9d
cmp byte [0x7b90c3], 0
je 0x50aaa4
cmp dword [ebp + 0x2c], 8
mov eax, dword [ebp + 0x18]
jae 0x50aa92
lea eax, [ebp + 0x18]
push eax
call fcn.0052b382
cmp eax, 1
jne 0x50aaa4
mov dword [ebp + 0x58], 0xb
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50aab0
lea eax, [ebp + 0x30]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, esi
je 0x50aad6
test al, 1
je 0x50aad6
cmp dword [ebp + 0x44], 8
mov ecx, dword [ebp + 0x30]
jae 0x50aacb
lea ecx, [ebp + 0x30]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp byte [0x7b90c2], 0
jne 0x50aae9
mov eax, dword [ebp + 0x48]
and eax, dword [ebp + 0x4c]
cmp eax, esi
jne 0x50ab47
cmp bl, 4
je 0x50ab47
push 0xa
pop edx
mov dword [ebp + 0x58], edx
jmp 0x50ab4a
cmp bl, 3
jne 0x50ab47
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x50ab0b
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x50ab47
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50ab17
lea eax, [ebp + 0x30]
push eax
call fcn.00461e6d
push dword [ebp + 0x78]
mov ebx, dword [ebp + 0x70]
push 0
push ebx
push dword [ebp + 0x6c]
push 1
push edi
call fcn.0050a8e4
mov ecx, eax
mov dword [ebp + 0x50], ecx
cmp ecx, esi
jne 0x50ab6e
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebx], eax
jmp 0x50ac24
mov edx, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x50]
cmp ecx, esi
jne 0x50ab6e
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50ab5d
lea eax, [ebp + 0x30]
push 0x80
push edx
push eax
call fcn.00461598
mov ecx, eax
mov dword [ebp + 0x50], ecx
mov eax, dword [0x7b90c8]
mov dword [ebp + 0x64], eax
cmp ecx, esi
jne 0x50ac74
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
je 0x50ac19
call ebx
cmp dword [ebp + 0x58], 0xa
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
jne 0x50abdb
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x50abae
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
jne 0x50abae
xor ecx, ecx
inc ecx
jmp 0x50abb1
push 6
pop ecx
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
mov dword [ebp + 0x58], ecx
jae 0x50abc0
lea eax, [ebp + 0x30]
push 0x80
push ecx
push eax
call fcn.00461598
mov dword [ebp + 0x50], eax
call ebx
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
mov ecx, dword [ebp + 0x50]
jmp 0x50ac0a
cmp eax, 0x20
jne 0x50ac2c
push 0xc8
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50abf7
lea eax, [ebp + 0x30]
push 0x80
push dword [ebp + 0x58]
push eax
call fcn.00461598
mov ecx, eax
mov dword [ebp + 0x50], ecx
mov eax, dword [ebp + 0x64]
dec eax
mov dword [ebp + 0x64], eax
cmp ecx, esi
je 0x50ab84
cmp ecx, esi
jne 0x50ac74
call ebx
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
mov esi, dword [ebp + 0x50]
jmp 0x50acea
cmp byte [ebp + 0x68], 3
je 0x50ac38
cmp byte [ebp + 0x74], 0
je 0x50ac49
cmp eax, 0x490
je 0x50ac64
cmp eax, 2
je 0x50ac64
cmp eax, 3
je 0x50ac64
cmp dword [ebp + 0x44], 8
mov ecx, dword [ebp + 0x30]
jae 0x50ac55
lea ecx, [ebp + 0x30]
push eax
push ecx
push str.Error_opening___s_:__E
call fcn.0047cc80
add esp, 0xc
mov eax, dword [ebp + 0x70]
cmp dword [eax], 0
jne 0x50acea
mov dword [eax], 2
jmp 0x50acea
mov bl, byte [ebp + 0x57]
test bl, bl
je 0x50acde
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x50ac8b
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x50acc4
mov eax, dword [ebp + 0x6c]
push dword [ebp + 0x78]
mov eax, dword [eax]
cmp dword [eax + 0xd8], 0
lea eax, [ebp + 0x30]
setne byte [ebp + 0x68]
push dword [ebp + 0x68]
push dword [ebp + 0x70]
push dword [ebp + 0x58]
push edi
push eax
push ecx
call fcn.0050d5f5
test eax, eax
jne 0x50acc1
lea eax, [ebp + 0x50]
push eax
call fcn.00461528
jmp 0x50acea
mov ecx, dword [ebp + 0x50]
mov eax, dword [ebp + 0x6c]
mov eax, dword [eax]
cmp byte [eax + 0xd0], 0
jne 0x50acde
lea eax, [ebp + 0x30]
push eax
call fcn.00546d9f
mov ecx, dword [ebp + 0x50]
mov al, byte [edi + 0x66]
mov esi, ecx
and al, 0xfe
or al, bl
mov byte [edi + 0x66], al
xor ebx, ebx
lea ecx, [ebp - 0x24]
push ebx
push 1
call fcn.004281f2
push ebx
push 1
lea ecx, [ebp + 0x18]
call fcn.004281f2
push ebx
push 1
lea ecx, [ebp + 0x30]
call fcn.004281f2
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
lea esp, [ebp + 0x5c]
pop ebp
ret 0x18