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

Disassembly:
push ebp
sub esp, 0x5c
mov eax, 0x6bcaa6
call fcn.0066bd6c
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 0x50bb6f
mov byte [ebp + 0x5f], al
cmp bl, 4
jne 0x50bb73
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.0066f070
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.00507a71
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.004274a7
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.004274a7
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 2
push eax
call fcn.0045e95a
test al, al
jne 0x50bca6
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x50bc15
mov eax, dword [ebp + 0x34]
push eax
lea eax, [ebp]
push eax
call fcn.0047353d
lea ecx, [ebp + 0x18]
cmp ecx, eax
je 0x50bc32
mov byte [ebp + 0x68], bl
push dword [ebp + 0x68]
push eax
call fcn.00427543
lea ecx, [ebp]
call fcn.0042756c
call fcn.00473028
mov dword [ebp], ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], 7
test eax, eax
je 0x50bc59
push eax
lea ecx, [ebp]
call fcn.00427613
mov byte [ebp + 0x68], bl
lea eax, [ebp]
push dword [ebp + 0x68]
lea ecx, [ebp - 0x24]
push eax
call fcn.00427543
mov eax, dword [ebp + 0x14]
cmp eax, 8
jb 0x50bca6
mov ecx, dword [ebp]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x68], eax
mov dword [ebp + 0x30], ecx
cmp eax, 0x1000
jb 0x50bc9d
lea eax, [ebp + 0x68]
push eax
lea eax, [ebp + 0x30]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x30]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
cmp dword [ebp + 0x2c], 8
lea eax, [ebp + 0x18]
jb 0x50bcb2
mov eax, dword [ebp + 0x18]
push eax
call fcn.00461b04
cmp dword [edi + 0xc], edx
jb 0x50bcd1
ja 0x50bcc4
cmp dword [edi + 8], eax
jbe 0x50bcd1
mov ebx, dword [ebp + 0x74]
mov eax, 0xdf
jmp 0x50bd61
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x50], ebx
jb 0x50bce3
mov eax, dword [ebp + 0x34]
lea ecx, [ebp + 0x4c]
push ecx
push eax
call fcn.004621ee
mov ebx, dword [ebp + 0x74]
test al, al
je 0x50bd68
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x50bd68
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
jne 0x50bd68
cmp byte [ebp + 0x5f], 0
jne 0x50bd86
cmp byte [ebp + 0x6c], 3
jne 0x50be09
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x50bd28
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
je 0x50be09
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x50bd34
mov eax, dword [ebp + 0x34]
push eax
call fcn.0046093f
push dword [ebp + 0x7c]
push 0
push ebx
push dword [ebp + 0x70]
push 1
push edi
call fcn.0050bb43
mov ecx, eax
mov dword [ebp + 0x54], ecx
cmp ecx, esi
jne 0x50be30
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [ebp + 0x54]
mov dword [ebx], eax
jmp 0x50bfb5
cmp byte [ebp + 0x5f], 0
mov dword [ebp + 0x4c], esi
mov dword [ebp + 0x50], esi
je 0x50bd0a
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x50bd80
mov eax, dword [ebp + 0x34]
push eax
call fcn.0046093f
cmp byte [0x7cd704], 0
jne 0x50bdaf
cmp byte [0x7cd703], 0
je 0x50bdb6
cmp dword [ebp + 0x2c], 8
lea eax, [ebp + 0x18]
jb 0x50bda4
mov eax, dword [ebp + 0x18]
push eax
call fcn.0052952d
cmp eax, 1
jne 0x50bdb6
mov dword [ebp + 0x58], 0xb
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x50bdc2
mov eax, dword [ebp + 0x34]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, esi
je 0x50bde8
test al, 1
je 0x50bde8
cmp dword [ebp + 0x48], 8
lea ecx, [ebp + 0x34]
jb 0x50bddd
mov ecx, dword [ebp + 0x34]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp byte [0x7cd702], 0
jne 0x50bdfb
mov eax, dword [ebp + 0x4c]
and eax, dword [ebp + 0x50]
cmp eax, esi
jne 0x50be09
cmp byte [ebp + 0x6c], 4
je 0x50be09
push 0xa
pop edx
mov dword [ebp + 0x58], edx
jmp 0x50be0c
mov edx, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x54]
cmp ecx, esi
jne 0x50be30
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x50be1f
mov eax, dword [ebp + 0x34]
push 0x80
push edx
push eax
call fcn.0045fd28
mov ecx, eax
mov dword [ebp + 0x54], ecx
mov eax, dword [0x7cd70c]
mov dword [ebp + 0x68], eax
cmp ecx, esi
jne 0x50bf41
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
je 0x50bedb
call ebx
cmp dword [ebp + 0x58], 0xa
mov ecx, dword [ebp + 0x74]
mov dword [ecx], eax
jne 0x50be9d
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x50be70
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
jne 0x50be70
xor ecx, ecx
inc ecx
jmp 0x50be73
push 6
pop ecx
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
mov dword [ebp + 0x58], ecx
jb 0x50be82
mov eax, dword [ebp + 0x34]
push 0x80
push ecx
push eax
call fcn.0045fd28
mov dword [ebp + 0x54], eax
call ebx
mov ecx, dword [ebp + 0x74]
mov dword [ecx], eax
mov ecx, dword [ebp + 0x54]
jmp 0x50becc
cmp eax, 0x20
jne 0x50beee
push 0xc8
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x50beb9
mov eax, dword [ebp + 0x34]
push 0x80
push dword [ebp + 0x58]
push eax
call fcn.0045fd28
mov ecx, eax
mov dword [ebp + 0x54], ecx
mov eax, dword [ebp + 0x68]
dec eax
mov dword [ebp + 0x68], eax
cmp ecx, esi
je 0x50be46
cmp ecx, esi
jne 0x50bf3e
call ebx
mov ecx, dword [ebp + 0x74]
mov esi, dword [ebp + 0x54]
mov dword [ecx], eax
jmp 0x50bfb5
cmp byte [ebp + 0x6c], 3
je 0x50befa
cmp byte [ebp + 0x78], 0
je 0x50bf0d
mov ecx, eax
cmp eax, 0x490
je 0x50bf2f
cmp eax, 2
je 0x50bf2f
cmp eax, 3
je 0x50bf2f
cmp dword [ebp + 0x48], 8
lea ecx, [ebp + 0x34]
jb 0x50bf19
mov ecx, dword [ebp + 0x34]
push eax
push ecx
push str.Error_opening___s_:__E
call fcn.0047d3ef
mov eax, dword [ebp + 0x74]
add esp, 0xc
mov ecx, dword [eax]
jmp 0x50bf32
mov eax, dword [ebp + 0x74]
test ecx, ecx
jne 0x50bfb5
mov dword [eax], 2
jmp 0x50bfb5
mov ebx, dword [ebp + 0x74]
cmp byte [ebp + 0x5f], 0
je 0x50bfa8
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x50bf57
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
je 0x50bf8e
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.0050ebaf
test eax, eax
jne 0x50bf8b
lea eax, [ebp + 0x54]
push eax
call fcn.0045fcba
jmp 0x50bfb5
mov ecx, dword [ebp + 0x54]
mov eax, dword [ebp + 0x70]
mov eax, dword [eax]
cmp byte [eax + 0xd0], 0
jne 0x50bfa8
lea eax, [ebp + 0x34]
push eax
call fcn.00545d69
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 0x50bff0
mov ecx, dword [ebp - 0x24]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x6c], eax
mov dword [ebp + 0x78], ecx
cmp eax, 0x1000
jb 0x50bfe7
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x78]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
mov eax, dword [ebp + 0x2c]
cmp eax, 8
jb 0x50c02b
mov ecx, dword [ebp + 0x18]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x6c], eax
mov dword [ebp + 0x78], ecx
cmp eax, 0x1000
jb 0x50c022
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x78]
push eax
push ecx
call fcn.0066bb0a
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.0042756c
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