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

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6b6d0a
call fcn.00651da4
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 0x5082f2
cmp bl, 4
je 0x5082f2
xor bh, bh
jmp 0x5082f4
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.0066c620
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.005041a1
and dword [ebp - 4], 0
lea eax, [ebp + 0x30]
push eax
lea ecx, [ebp + 0x18]
call fcn.0042812e
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.0042812e
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 2
push eax
call fcn.0045ca59
test al, al
jne 0x5083c8
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x508385
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp]
push eax
call fcn.0047014f
push eax
lea ecx, [ebp + 0x18]
call fcn.004281d1
push 0
push 1
lea ecx, [ebp]
call fcn.004284eb
call fcn.0046fcfb
push eax
lea eax, [ebp]
push eax
call fcn.004295d6
push eax
lea ecx, [ebp - 0x24]
call fcn.004281d1
push 0
push 1
lea ecx, [ebp]
call fcn.004284eb
cmp dword [ebp + 0x2c], 8
mov eax, dword [ebp + 0x18]
jae 0x5083d4
lea eax, [ebp + 0x18]
push eax
call fcn.0045f5f9
cmp dword [edi + 0xc], edx
jb 0x5083f4
ja 0x5083e6
cmp dword [edi + 8], eax
jbe 0x5083f4
mov eax, dword [ebp + 0x70]
mov dword [eax], 0xdf
jmp 0x5086c4
and dword [ebp + 0x48], 0
and dword [ebp + 0x4c], 0
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x508408
lea eax, [ebp + 0x30]
lea ecx, [ebp + 0x48]
push ecx
push eax
call fcn.00579aba
test al, al
je 0x508426
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x508426
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x508446
mov dword [ebp + 0x48], esi
mov dword [ebp + 0x4c], esi
test bh, bh
je 0x5084d0
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x508440
lea eax, [ebp + 0x30]
push eax
call fcn.0045e721
test bh, bh
je 0x5084d0
cmp byte [0x7ce714], 0
jne 0x508477
cmp byte [0x7ce713], 0
je 0x50847e
cmp dword [ebp + 0x2c], 8
mov eax, dword [ebp + 0x18]
jae 0x50846c
lea eax, [ebp + 0x18]
push eax
call fcn.00528e84
cmp eax, 1
jne 0x50847e
mov dword [ebp + 0x58], 0xb
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50848a
lea eax, [ebp + 0x30]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, esi
je 0x5084b0
test al, 1
je 0x5084b0
cmp dword [ebp + 0x44], 8
mov ecx, dword [ebp + 0x30]
jae 0x5084a5
lea ecx, [ebp + 0x30]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp byte [0x7ce712], 0
jne 0x5084c3
mov eax, dword [ebp + 0x48]
and eax, dword [ebp + 0x4c]
cmp eax, esi
jne 0x508521
cmp bl, 4
je 0x508521
push 0xa
pop edx
mov dword [ebp + 0x58], edx
jmp 0x508524
cmp bl, 3
jne 0x508521
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x5084e5
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x508521
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x5084f1
lea eax, [ebp + 0x30]
push eax
call fcn.0045e721
push dword [ebp + 0x78]
mov ebx, dword [ebp + 0x70]
push 0
push ebx
push dword [ebp + 0x6c]
push 1
push edi
call fcn.005082c7
mov ecx, eax
mov dword [ebp + 0x50], ecx
cmp ecx, esi
jne 0x508548
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebx], eax
jmp 0x5085fe
mov edx, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x50]
cmp ecx, esi
jne 0x508548
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x508537
lea eax, [ebp + 0x30]
push 0x80
push edx
push eax
call fcn.0045d9b9
mov ecx, eax
mov dword [ebp + 0x50], ecx
mov eax, dword [0x7ce718]
mov dword [ebp + 0x64], eax
cmp ecx, esi
jne 0x50864e
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
je 0x5085f3
call ebx
cmp dword [ebp + 0x58], 0xa
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
jne 0x5085b5
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x508588
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
jne 0x508588
xor ecx, ecx
inc ecx
jmp 0x50858b
push 6
pop ecx
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
mov dword [ebp + 0x58], ecx
jae 0x50859a
lea eax, [ebp + 0x30]
push 0x80
push ecx
push eax
call fcn.0045d9b9
mov dword [ebp + 0x50], eax
call ebx
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
mov ecx, dword [ebp + 0x50]
jmp 0x5085e4
cmp eax, 0x20
jne 0x508606
push 0xc8
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x5085d1
lea eax, [ebp + 0x30]
push 0x80
push dword [ebp + 0x58]
push eax
call fcn.0045d9b9
mov ecx, eax
mov dword [ebp + 0x50], ecx
mov eax, dword [ebp + 0x64]
dec eax
mov dword [ebp + 0x64], eax
cmp ecx, esi
je 0x50855e
cmp ecx, esi
jne 0x50864e
call ebx
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
mov esi, dword [ebp + 0x50]
jmp 0x5086c4
cmp byte [ebp + 0x68], 3
je 0x508612
cmp byte [ebp + 0x74], 0
je 0x508623
cmp eax, 0x490
je 0x50863e
cmp eax, 2
je 0x50863e
cmp eax, 3
je 0x50863e
cmp dword [ebp + 0x44], 8
mov ecx, dword [ebp + 0x30]
jae 0x50862f
lea ecx, [ebp + 0x30]
push eax
push ecx
push str.Error_opening___s_:__E
call fcn.0047995d
add esp, 0xc
mov eax, dword [ebp + 0x70]
cmp dword [eax], 0
jne 0x5086c4
mov dword [eax], 2
jmp 0x5086c4
mov bl, byte [ebp + 0x57]
test bl, bl
je 0x5086b8
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x508665
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x50869e
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.0050afe9
test eax, eax
jne 0x50869b
lea eax, [ebp + 0x50]
push eax
call fcn.0045d949
jmp 0x5086c4
mov ecx, dword [ebp + 0x50]
mov eax, dword [ebp + 0x6c]
mov eax, dword [eax]
cmp byte [eax + 0xd0], 0
jne 0x5086b8
lea eax, [ebp + 0x30]
push eax
call fcn.00544b4b
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.004284eb
push ebx
push 1
lea ecx, [ebp + 0x18]
call fcn.004284eb
push ebx
push 1
lea ecx, [ebp + 0x30]
call fcn.004284eb
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