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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4462c7
mov eax, dword fs:[0]
push eax
sub esp, 0x8c8
mov eax, dword [0x45a400]
xor eax, esp
mov dword [esp + 0x8c0], eax
push ebx
push esi
push edi
mov eax, dword [0x45a400]
xor eax, esp
push eax
lea eax, [esp + 0x8d8]
mov dword fs:[0], eax
mov edi, ecx
cmp byte [edi + 0x30], 0
jne 0x40443d
mov eax, dword [edi + 0x24]
mov esi, dword [eax]
cmp esi, eax
je 0x404240
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x404239
call fcn.004041d8
mov esi, dword [esi]
cmp esi, dword [edi + 0x24]
jne 0x40422d
mov eax, dword [edi + 0x24]
mov ebx, dword [eax]
cmp ebx, eax
je 0x4042b0
mov esi, dword [ebx + 8]
mov dword [esp + 0x10], esi
test esi, esi
je 0x4042a9
add esi, 4
cmp dword [esi + 0x14], 0x10
jb 0x404261
mov eax, dword [esi]
jmp 0x404263
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4042a9
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x20], 0
je 0x404290
cmp dword [esi + 0x14], 0x10
jb 0x404283
mov eax, dword [esi]
jmp 0x404285
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4042c6
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x20], 0
jne 0x4042a9
cmp dword [esi + 0x14], 0x10
jb 0x4042a2
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ebx, dword [ebx]
cmp ebx, dword [edi + 0x24]
jne 0x404249
push 0x10
lea esi, [edi + 4]
pop ebx
cmp dword [esi + 0x14], ebx
jb 0x40435b
mov eax, dword [esi]
jmp 0x40435d
push 0x3ff
xor edi, edi
lea eax, [esp + 0xd1]
push edi
push eax
mov byte [esp + 0xd8], 0
call fcn.0042a4a0
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x4042ee
mov esi, dword [esi]
push esi
lea eax, [esp + 0xd0]
push str.Cannot_remove_the__s_file.
push eax
call fcn.004040fe
lea eax, [esp + 0xd8]
add esp, 0xc
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], edi
mov byte [esp + 0x14], 0
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40431f
sub eax, ecx
push eax
lea eax, [esp + 0xd0]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040366e
lea eax, [esp + 0x14]
lea esi, [esp + 0x4c]
mov dword [esp + 0x8e0], edi
call fcn.00416a20
push 0x455268
mov eax, esi
push eax
call fcn.0042a64b
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40443d
cmp byte [edi + 0x20], 0
je 0x40442f
cmp dword [esi + 0x14], ebx
jb 0x404380
mov eax, dword [esi]
jmp 0x404382
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404429
push 0x3ff
push eax
mov byte [esp + 0x4d4], al
lea eax, [esp + 0x4d5]
push eax
call fcn.0042a4a0
add esp, 0xc
cmp dword [esi + 0x14], ebx
jb 0x4043b5
mov esi, dword [esi]
push esi
lea eax, [esp + 0x4d0]
push str.Cannot_remove_the__s_file.
push eax
call fcn.004040fe
lea eax, [esp + 0x4d8]
add esp, 0xc
and dword [esp + 0x40], 0
mov dword [esp + 0x44], 0xf
mov byte [esp + 0x30], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4043e7
sub eax, edx
push eax
lea eax, [esp + 0x4d0]
push eax
lea ecx, [esp + 0x38]
call fcn.0040366e
lea eax, [esp + 0x30]
lea esi, [esp + 0x8c]
mov dword [esp + 0x8e0], 1
call fcn.00416a20
push 0x455268
mov eax, esi
jmp 0x404355
cmp byte [edi + 0x20], 0
jne 0x40443d
cmp dword [esi + 0x14], ebx
jb 0x404436
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ecx, dword [esp + 0x8d8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8c0]
xor ecx, esp
call fcn.00428263
mov esp, ebp
pop ebp
ret