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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x600c
call fcn.00405a40
mov eax, dword [0x40f070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x600c], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, 0x2000
push edi
mov dword [ebp - 0x6008], eax
lea eax, [ebp - 0x4004]
push 0
push eax
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x2004]
push 0
push eax
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x6004]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x6008]
xor ecx, ecx
mov dword [esi], ecx
mov edx, dword [eax + 8]
mov dword [esi + 8], edx
mov eax, dword [eax + 0xc]
push edi
mov dword [esi + 0xc], eax
lea eax, [esi + 0x24]
push ecx
push eax
mov dword [esi + 0x10], 5
mov dword [esi + 0x14], 0x6018
mov dword [esi + 0x18], ecx
call sub.msvcrt.dll_memset
and dword [esi + 0x20], 0
add esp, 0x30
cmp dword [ebx + 0xc], 1
jne 0x404cd3
lea eax, [ebp - 0x4004]
push eax
push dword [ebp - 0x6008]
push ebx
call fcn.00403bf7
test eax, eax
je 0x404f79
cmp dword [ebx + 0xc], 3
jne 0x404cf4
lea eax, [ebp - 0x4004]
push eax
push dword [ebp - 0x6008]
push ebx
call fcn.00403c20
test eax, eax
je 0x404f79
cmp dword [ebx + 0xc], 4
jne 0x404d15
lea eax, [ebp - 0x4004]
push eax
push dword [ebp - 0x6008]
push ebx
call fcn.00403bce
test eax, eax
je 0x404f79
push dword [ebx + 0x10]
lea eax, [ebx + 0x14]
push eax
lea eax, [ebp - 0x4004]
push eax
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 0x4004]
push eax
call dword [sym.imp.msvcrt.dll__wcslwr]
push str.DeviceGWDiskGWDisk
call dword [sym.imp.msvcrt.dll__wcslwr]
add esp, 0x14
cmp dword [ebx + 8], 0
jne 0x404dbe
and dword [ebp - 0x600c], 0
lea eax, [ebp - 0x2004]
push eax
lea eax, [ebp - 0x4004]
push eax
call fcn.004031c0
test eax, eax
je 0x404ed7
push 1
lea eax, [ebp - 0x6004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00403260
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
je 0x404d93
lea eax, [ebp - 0x6004]
push eax
call ebx
push 0
lea eax, [ebp - 0x6004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00403260
test eax, eax
je 0x404ed7
lea eax, [ebp - 0x6004]
push eax
call ebx
jmp 0x404ed7
lea eax, [ebp - 0x4004]
push str.DeviceGWDiskGWDisk
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
test eax, eax
pop ecx
lea eax, [ebp - 0x2004]
push eax
lea eax, [ebp - 0x4004]
push eax
je 0x404e6a
and dword [ebp - 0x600c], 0
call fcn.0040301c
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x2004]
push eax
call ebx
cmp eax, 0xffffffff
je 0x404ed7
lea eax, [ebp - 0x2004]
push eax
call ebx
and eax, 0x10
push eax
lea eax, [ebp - 0x6004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00403260
test eax, eax
je 0x404ed7
lea eax, [ebp - 0x6004]
push eax
call fcn.00403904
push 0
push 2
push 2
push 0
push 1
push 0xc0000000
lea eax, [ebp - 0x6004]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x404ed7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404ed7
call fcn.004031c0
test eax, eax
je 0x404ed7
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
and eax, 0x10
push eax
lea eax, [ebp - 0x6004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00403260
test eax, eax
je 0x404ed7
lea eax, [ebp - 0x6004]
push eax
call fcn.00403904
push 0
push 2
push 2
push 0
xor ebx, ebx
inc ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x6004]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x404ed1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x600c], ebx
mov eax, dword [ebp - 0x6008]
xor ecx, ecx
cmp dword [ebp - 0x600c], ecx
mov dword [esi], ecx
mov edx, dword [eax + 8]
mov dword [esi + 8], edx
mov eax, dword [eax + 0xc]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 5
mov dword [esi + 0x14], 0x6018
mov dword [esi + 0x18], ecx
je 0x404f0d
mov dword [esi + 0x18], 1
push edi
push ecx
lea edi, [esi + 0x24]
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x4019ac
mov ebx, 0x1f9c
push ebx
push edi
call fcn.00402300
lea eax, [ebp - 0x4004]
push eax
push ebx
push edi
call fcn.00402fdb
mov eax, edi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x404f3f
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
mov dword [esi + 0x20], eax
cmp dword [0x446a10], 0
je 0x404f79
lea eax, [esi + 0x24]
push eax
push dword [esi + 0x18]
push dword [0x446a0c]
push 0x401a7c
push 5
call fcn.00402ca2
add esp, 0x14
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405a18
leave
ret 0xc