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

Disassembly:
push ebp
sub esp, 0x5c
mov eax, 0x6db6c2
call fcn.006899cc
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 0x520a5b
mov byte [ebp + 0x5f], al
cmp bl, 4
jne 0x520a5f
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.0068ccc0
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.0051c96f
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.00448193
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.00448193
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 2
push eax
call fcn.0046f858
test al, al
jne 0x520b92
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x520b01
mov eax, dword [ebp + 0x34]
push eax
lea eax, [ebp]
push eax
call fcn.004848ce
lea ecx, [ebp + 0x18]
cmp ecx, eax
je 0x520b1e
mov byte [ebp + 0x68], bl
push dword [ebp + 0x68]
push eax
call fcn.00448215
lea ecx, [ebp]
call fcn.0044823e
call fcn.004843b9
mov dword [ebp], ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], 7
test eax, eax
je 0x520b45
push eax
lea ecx, [ebp]
call fcn.004482e2
mov byte [ebp + 0x68], bl
lea eax, [ebp]
push dword [ebp + 0x68]
lea ecx, [ebp - 0x24]
push eax
call fcn.00448215
mov eax, dword [ebp + 0x14]
cmp eax, 8
jb 0x520b92
mov ecx, dword [ebp]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x68], eax
mov dword [ebp + 0x30], ecx
cmp eax, 0x1000
jb 0x520b89
lea eax, [ebp + 0x68]
push eax
lea eax, [ebp + 0x30]
push eax
call fcn.0044810a
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x30]
push eax
push ecx
call fcn.0068976d
pop ecx
pop ecx
cmp dword [ebp + 0x2c], 8
lea eax, [ebp + 0x18]
jb 0x520b9e
mov eax, dword [ebp + 0x18]
push eax
call fcn.00472a45
cmp dword [edi + 0xc], edx
jb 0x520bbd
ja 0x520bb0
cmp dword [edi + 8], eax
jbe 0x520bbd
mov ebx, dword [ebp + 0x74]
mov eax, 0xdf
jmp 0x520c4d
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
mov dword [ebp + 0x4c], ebx
mov dword [ebp + 0x50], ebx
jb 0x520bcf
mov eax, dword [ebp + 0x34]
lea ecx, [ebp + 0x4c]
push ecx
push eax
call fcn.00473137
mov ebx, dword [ebp + 0x74]
test al, al
je 0x520c54
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x520c54
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
jne 0x520c54
cmp byte [ebp + 0x5f], 0
jne 0x520c72
cmp byte [ebp + 0x6c], 3
jne 0x520cf5
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x520c14
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
je 0x520cf5
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x520c20
mov eax, dword [ebp + 0x34]
push eax
call fcn.00471890
push dword [ebp + 0x7c]
push 0
push ebx
push dword [ebp + 0x70]
push 1
push edi
call fcn.00520a2f
mov ecx, eax
mov dword [ebp + 0x54], ecx
cmp ecx, esi
jne 0x520d1c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [ebp + 0x54]
mov dword [ebx], eax
jmp 0x520e90
cmp byte [ebp + 0x5f], 0
mov dword [ebp + 0x4c], esi
mov dword [ebp + 0x50], esi
je 0x520bf6
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x520c6c
mov eax, dword [ebp + 0x34]
push eax
call fcn.00471890
cmp byte [0x7f24ac], 0
jne 0x520c9b
cmp byte [0x7f24ab], 0
je 0x520ca2
cmp dword [ebp + 0x2c], 8
lea eax, [ebp + 0x18]
jb 0x520c90
mov eax, dword [ebp + 0x18]
push eax
call fcn.0053e392
cmp eax, 1
jne 0x520ca2
mov dword [ebp + 0x58], 0xb
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x520cae
mov eax, dword [ebp + 0x34]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, esi
je 0x520cd4
test al, 1
je 0x520cd4
cmp dword [ebp + 0x48], 8
lea ecx, [ebp + 0x34]
jb 0x520cc9
mov ecx, dword [ebp + 0x34]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp byte [0x7f24aa], 0
jne 0x520ce7
mov eax, dword [ebp + 0x4c]
and eax, dword [ebp + 0x50]
cmp eax, esi
jne 0x520cf5
cmp byte [ebp + 0x6c], 4
je 0x520cf5
push 0xa
pop edx
mov dword [ebp + 0x58], edx
jmp 0x520cf8
mov edx, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x54]
cmp ecx, esi
jne 0x520d1c
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x520d0b
mov eax, dword [ebp + 0x34]
push 0x80
push edx
push eax
call fcn.00470c47
mov ecx, eax
mov dword [ebp + 0x54], ecx
mov eax, dword [0x7f24b0]
mov dword [ebp + 0x74], eax
cmp ecx, esi
jne 0x520e1f
test eax, eax
je 0x520dc3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [ebp + 0x58], 0xa
mov dword [ebx], eax
jne 0x520d85
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x520d57
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
jne 0x520d57
xor ecx, ecx
inc ecx
jmp 0x520d5a
push 6
pop ecx
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
mov dword [ebp + 0x58], ecx
jb 0x520d69
mov eax, dword [ebp + 0x34]
push 0x80
push ecx
push eax
call fcn.00470c47
mov dword [ebp + 0x54], eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [ebp + 0x54]
mov dword [ebx], eax
jmp 0x520db4
cmp eax, 0x20
jne 0x520dd7
push 0xc8
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [ebp + 0x48], 8
lea eax, [ebp + 0x34]
jb 0x520da1
mov eax, dword [ebp + 0x34]
push 0x80
push dword [ebp + 0x58]
push eax
call fcn.00470c47
mov ecx, eax
mov dword [ebp + 0x54], ecx
mov eax, dword [ebp + 0x74]
dec eax
mov dword [ebp + 0x74], eax
cmp ecx, esi
je 0x520d2c
cmp ecx, esi
jne 0x520e1f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [ebp + 0x54]
mov dword [ebx], eax
jmp 0x520e90
cmp byte [ebp + 0x6c], 3
je 0x520de3
cmp byte [ebp + 0x78], 0
je 0x520df6
mov ecx, eax
cmp eax, 0x490
je 0x520e13
cmp eax, 2
je 0x520e13
cmp eax, 3
je 0x520e13
cmp dword [ebp + 0x48], 8
lea ecx, [ebp + 0x34]
jb 0x520e02
mov ecx, dword [ebp + 0x34]
push eax
push ecx
push str.Error_opening___s_:__E
call fcn.0048e961
mov ecx, dword [ebx]
add esp, 0xc
test ecx, ecx
jne 0x520e90
mov dword [ebx], 2
jmp 0x520e90
cmp byte [ebp + 0x5f], 0
je 0x520e83
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 8]
jne 0x520e35
mov eax, dword [ebp + 0x50]
cmp eax, dword [edi + 0xc]
je 0x520e69
mov eax, dword [ebp + 0x70]
push dword [ebp + 0x7c]
mov eax, dword [eax]
cmp dword [eax + 0xd8], 0
setne al
push eax
push ebx
push dword [ebp + 0x58]
lea eax, [ebp + 0x34]
push edi
push eax
push ecx
call fcn.00523af2
test eax, eax
jne 0x520e66
lea eax, [ebp + 0x54]
push eax
call fcn.00470bd9
jmp 0x520e90
mov ecx, dword [ebp + 0x54]
mov eax, dword [ebp + 0x70]
mov eax, dword [eax]
cmp byte [eax + 0xd0], 0
jne 0x520e83
lea eax, [ebp + 0x34]
push eax
call fcn.0055abc1
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 0x520ecb
mov ecx, dword [ebp - 0x24]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x6c], eax
mov dword [ebp + 0x78], ecx
cmp eax, 0x1000
jb 0x520ec2
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.0044810a
mov eax, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x78]
push eax
push ecx
call fcn.0068976d
pop ecx
pop ecx
mov eax, dword [ebp + 0x2c]
cmp eax, 8
jb 0x520f06
mov ecx, dword [ebp + 0x18]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x6c], eax
mov dword [ebp + 0x78], ecx
cmp eax, 0x1000
jb 0x520efd
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.0044810a
mov eax, dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x78]
push eax
push ecx
call fcn.0068976d
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.0044823e
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