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

Disassembly:
push ebp
sub esp, 0x58
mov eax, 0x6aa614
call fcn.006426c4
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 0x50b443
cmp bl, 4
je 0x50b443
xor bh, bh
jmp 0x50b445
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.0065d010
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.005072ed
and dword [ebp - 4], 0
lea eax, [ebp + 0x30]
push eax
lea ecx, [ebp + 0x18]
call fcn.00427fbe
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.00427fbe
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 2
push eax
call fcn.00460edf
test al, al
jne 0x50b519
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50b4d6
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp]
push eax
call fcn.00473f1c
push eax
lea ecx, [ebp + 0x18]
call fcn.00428071
push 0
push 1
lea ecx, [ebp]
call fcn.004285f6
call fcn.00473ac8
push eax
lea eax, [ebp]
push eax
call fcn.00429756
push eax
lea ecx, [ebp - 0x24]
call fcn.00428071
push 0
push 1
lea ecx, [ebp]
call fcn.004285f6
cmp dword [ebp + 0x2c], 8
mov eax, dword [ebp + 0x18]
jae 0x50b525
lea eax, [ebp + 0x18]
push eax
call fcn.00463362
cmp dword [edi + 0xc], edx
jb 0x50b545
ja 0x50b537
cmp dword [edi + 8], eax
jbe 0x50b545
mov eax, dword [ebp + 0x70]
mov dword [eax], 0xdf
jmp 0x50b815
and dword [ebp + 0x48], 0
and dword [ebp + 0x4c], 0
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50b559
lea eax, [ebp + 0x30]
lea ecx, [ebp + 0x48]
push ecx
push eax
call fcn.00463a48
test al, al
je 0x50b577
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x50b577
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x50b597
mov dword [ebp + 0x48], esi
mov dword [ebp + 0x4c], esi
test bh, bh
je 0x50b621
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50b591
lea eax, [ebp + 0x30]
push eax
call fcn.004626bc
test bh, bh
je 0x50b621
cmp byte [0x7bd304], 0
jne 0x50b5c8
cmp byte [0x7bd303], 0
je 0x50b5cf
cmp dword [ebp + 0x2c], 8
mov eax, dword [ebp + 0x18]
jae 0x50b5bd
lea eax, [ebp + 0x18]
push eax
call fcn.0052c5d5
cmp eax, 1
jne 0x50b5cf
mov dword [ebp + 0x58], 0xb
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50b5db
lea eax, [ebp + 0x30]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, esi
je 0x50b601
test al, 1
je 0x50b601
cmp dword [ebp + 0x44], 8
mov ecx, dword [ebp + 0x30]
jae 0x50b5f6
lea ecx, [ebp + 0x30]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp byte [0x7bd302], 0
jne 0x50b614
mov eax, dword [ebp + 0x48]
and eax, dword [ebp + 0x4c]
cmp eax, esi
jne 0x50b672
cmp bl, 4
je 0x50b672
push 0xa
pop edx
mov dword [ebp + 0x58], edx
jmp 0x50b675
cmp bl, 3
jne 0x50b672
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x50b636
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x50b672
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50b642
lea eax, [ebp + 0x30]
push eax
call fcn.004626bc
push dword [ebp + 0x78]
mov ebx, dword [ebp + 0x70]
push 0
push ebx
push dword [ebp + 0x6c]
push 1
push edi
call fcn.0050b418
mov ecx, eax
mov dword [ebp + 0x50], ecx
cmp ecx, esi
jne 0x50b699
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebx], eax
jmp 0x50b74f
mov edx, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x50]
cmp ecx, esi
jne 0x50b699
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50b688
lea eax, [ebp + 0x30]
push 0x80
push edx
push eax
call fcn.00461def
mov ecx, eax
mov dword [ebp + 0x50], ecx
mov eax, dword [0x7bd308]
mov dword [ebp + 0x64], eax
cmp ecx, esi
jne 0x50b79f
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
je 0x50b744
call ebx
cmp dword [ebp + 0x58], 0xa
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
jne 0x50b706
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x50b6d9
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
jne 0x50b6d9
xor ecx, ecx
inc ecx
jmp 0x50b6dc
push 6
pop ecx
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
mov dword [ebp + 0x58], ecx
jae 0x50b6eb
lea eax, [ebp + 0x30]
push 0x80
push ecx
push eax
call fcn.00461def
mov dword [ebp + 0x50], eax
call ebx
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
mov ecx, dword [ebp + 0x50]
jmp 0x50b735
cmp eax, 0x20
jne 0x50b757
push 0xc8
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [ebp + 0x44], 8
mov eax, dword [ebp + 0x30]
jae 0x50b722
lea eax, [ebp + 0x30]
push 0x80
push dword [ebp + 0x58]
push eax
call fcn.00461def
mov ecx, eax
mov dword [ebp + 0x50], ecx
mov eax, dword [ebp + 0x64]
dec eax
mov dword [ebp + 0x64], eax
cmp ecx, esi
je 0x50b6af
cmp ecx, esi
jne 0x50b79f
call ebx
mov ecx, dword [ebp + 0x70]
mov dword [ecx], eax
mov esi, dword [ebp + 0x50]
jmp 0x50b815
cmp byte [ebp + 0x68], 3
je 0x50b763
cmp byte [ebp + 0x74], 0
je 0x50b774
cmp eax, 0x490
je 0x50b78f
cmp eax, 2
je 0x50b78f
cmp eax, 3
je 0x50b78f
cmp dword [ebp + 0x44], 8
mov ecx, dword [ebp + 0x30]
jae 0x50b780
lea ecx, [ebp + 0x30]
push eax
push ecx
push str.Error_opening___s_:__E
call fcn.0047d5f0
add esp, 0xc
mov eax, dword [ebp + 0x70]
cmp dword [eax], 0
jne 0x50b815
mov dword [eax], 2
jmp 0x50b815
mov bl, byte [ebp + 0x57]
test bl, bl
je 0x50b809
mov eax, dword [ebp + 0x48]
cmp eax, dword [edi + 8]
jne 0x50b7b6
mov eax, dword [ebp + 0x4c]
cmp eax, dword [edi + 0xc]
je 0x50b7ef
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.0050e120
test eax, eax
jne 0x50b7ec
lea eax, [ebp + 0x50]
push eax
call fcn.00461d7f
jmp 0x50b815
mov ecx, dword [ebp + 0x50]
mov eax, dword [ebp + 0x6c]
mov eax, dword [eax]
cmp byte [eax + 0xd0], 0
jne 0x50b809
lea eax, [ebp + 0x30]
push eax
call fcn.00548616
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.004285f6
push ebx
push 1
lea ecx, [ebp + 0x18]
call fcn.004285f6
push ebx
push 1
lea ecx, [ebp + 0x30]
call fcn.004285f6
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