Function at 0x1004a49
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x118
push ebx
push esi
push edi
mov edi, dword [esp + 0x128]
mov eax, edi
lea edx, [eax + 1]
xor ebx, ebx
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1004a60
sub eax, edx
mov esi, 0x104
cmp eax, esi
jbe 0x1004a79
xor eax, eax
jmp 0x1004eb6
lea edx, [esp + 0x20]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x1004a81
lea eax, [esp + 0x20]
push ebp
push eax
call dword [sym.imp.ntdll.dll__strlwr]
test byte [esp + 0x13b], 4
mov edi, dword [esp + 0x134]
pop ecx
jne 0x1004aef
push 0x10015c4
push edi
call fcn.0100774e
push eax
call dword [sym.imp.ntdll.dll__strcmpi]
test eax, eax
pop ecx
pop ecx
jne 0x1004aef
push 0xfffa
mov ebp, 0x10239e0
push ebp
push 0x10015bc
push dword [0x1020828]
call fcn.0100777d
push 0x10204a0
push ebp
call fcn.0100c2b9
test eax, eax
jne 0x1004e77
push 0xf
pop eax
lea ecx, [esp + 0x10]
push ecx
push ebx
push ebx
push eax
push edi
xor ebp, ebp
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
cmp dword [esp + 0x10], ebx
je 0x1004b63
push dword [esp + 0x10]
call dword [sym.imp.msvcrt.dll_malloc]
mov ebp, eax
cmp ebp, ebx
pop ecx
je 0x1004b63
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x14]
push ebp
push dword [esp + 0x20]
push edi
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
cmp eax, ebx
jne 0x1004b63
and dword [esp + 0x14], 0xfffffff7
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x14]
push ebp
push dword [esp + 0x20]
push edi
call dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
cmp eax, ebx
jne 0x1004b63
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor ebp, ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x1004b7b
mov dword [esp + 0x18], 0x80
push 0x10015bc
push edi
call fcn.0100774e
push eax
call dword [sym.imp.ntdll.dll__strcmpi]
test eax, eax
pop ecx
pop ecx
je 0x1004baf
push 0x10015c4
push edi
call fcn.0100774e
push eax
call dword [sym.imp.ntdll.dll__strcmpi]
test eax, eax
pop ecx
pop ecx
jne 0x1004d6b
push 0xfffa
push 0x10239e0
push 0x10015bc
push dword [0x1020828]
call fcn.0100777d
push 0x10204a0
push 0x10239e0
call fcn.0100c2b9
test eax, eax
jne 0x1004e77
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x102049c
push edi
push dword [esp + 0x134]
call fcn.010084d8
test eax, eax
je 0x1004c1a
push edi
call fcn.01007ad0
test eax, eax
je 0x1004c1a
push edi
call fcn.01007f35
test eax, eax
jne 0x1004ecc
push dword [0x100f2c8]
lea eax, [esp + 0x28]
push esi
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push dword [esp + 0x144]
push 0x10212e0
push dword [esp + 0x15c]
call fcn.010079bb
sub eax, ebx
je 0x1004f72
dec eax
dec eax
je 0x1004f5a
dec eax
dec eax
jne 0x1004bec
lea eax, [esp + 0x24]
mov dword [esp + 0x12c], eax
jmp 0x1004bec
push esi
push 0x1020840
push 0xf004
push ebx
mov byte [0x1020840], bl
mov byte [0x10339e0], bl
call fcn.010046ab
push 0xfffa
push 0x10339e0
push 0xf007
push ebx
call fcn.010046ab
cmp dword [0x100f2e0], ebx
je 0x1004cb2
cmp dword [0x100f2c8], ebx
jne 0x1004df5
mov eax, 0x10339e0
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x1004cba
sub eax, ecx
mov ecx, eax
mov eax, edi
lea edx, [eax + 1]
mov dword [esp + 0x1c], edx
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x1004cce
sub eax, dword [esp + 0x1c]
lea eax, [eax + ecx + 1]
push eax
call dword [sym.imp.msvcrt.dll_malloc]
cmp eax, ebx
pop ecx
mov dword [esp + 0x1c], eax
je 0x1004e4c
push edi
push 0x10339e0
push eax
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
push 0x10012
push 0x1020840
push dword [esp + 0x24]
push dword [esp + 0x148]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
mov dword [esp + 0x20], eax
je 0x1004d2a
cmp eax, 3
jne 0x1004d45
push dword [0x100f2c8]
push 0x1020ca4
push dword [esp + 0x144]
call fcn.01003c50
test eax, eax
je 0x1004d01
push dword [esp + 0x1c]
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [esp + 0x24]
cmp eax, 2
pop ecx
jb 0x1004d6b
cmp eax, 3
jbe 0x1004e5f
cmp eax, 5
je 0x1004dff
push 0x102049c
push dword [0x1020ca8]
push edi
call fcn.0100a705
test eax, eax
je 0x1004c6c
push edi
push dword [esp + 0x130]
call fcn.01003cd3
test eax, eax
je 0x1004da3
push edi
call fcn.01007f35
test eax, eax
jne 0x1004ecc
push dword [0x100f2c8]
lea eax, [esp + 0x28]
push esi
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push dword [esp + 0x144]
push 0x10212e0
push dword [esp + 0x15c]
call fcn.010079bb
sub eax, ebx
je 0x1004ec2
dec eax
dec eax
je 0x1004e6f
dec eax
dec eax
jne 0x1004d84
lea eax, [esp + 0x24]
mov dword [esp + 0x12c], eax
jmp 0x1004d84
push 0x10339e0
call fcn.01008343
push 0x102049c
lea eax, [esp + 0x1c]
push eax
push ebp
lea eax, [esp + 0x20]
push eax
push edi
push dword [esp + 0x140]
call fcn.010083cf
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push esi
mov esi, 0x10439e0
push esi
push 0xf139
push ebx
mov byte [0x10439e0], bl
mov byte [0x1021640], bl
call dword [sym.imp.USER32.dll_LoadStringA]
push dword [esp + 0x12c]
jmp 0x1004e97
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push 8
call fcn.01003bbf
xor eax, eax
jmp 0x1004eb5
push ebp
call dword [sym.imp.msvcrt.dll_free]
mov dword [esp], 0x4c7
jmp 0x1004e56
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push esi
mov esi, 0x10439e0
push esi
push 0xf138
push ebx
mov byte [0x1021640], bl
mov byte [0x10439e0], bl
call dword [sym.imp.USER32.dll_LoadStringA]
push edi
push esi
mov esi, 0x1021640
push 0x100140c
push esi
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0x10
push esi
call fcn.01008343
xor eax, eax
inc eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x118
ret 0x14
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x1004e5b
cmp ebp, ebx
je 0x1004ee4
push ebp
push dword [esp + 0x18]
push edi
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push edi
call ebp
push esi
mov esi, 0x10439e0
push esi
push 0xf137
push ebx
mov byte [0x10439e0], bl
mov byte [0x1021640], bl
call dword [sym.imp.USER32.dll_LoadStringA]
push edi
push esi
push 0x100140c
mov esi, 0x1021640
push esi
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0x10
push esi
call fcn.01008343
test byte [esp + 0x134], 1
je 0x1004eb2
push 0x80
push dword [esp + 0x130]
call ebp
push dword [esp + 0x12c]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x1004eb2
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [esp + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x1004e77
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [esp + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x1004e5b