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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x42e101
push eax
mov eax, 0x74e4
mov dword fs:[0], esp
call fcn.00413140
push ebp
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x7500]
push esi
mov esi, dword [esp + 0x7508]
push edi
sub esi, ecx
lea ecx, [esp + 0x44c]
mov dword [esp + 0x24], esi
call fcn.004017a0
mov al, byte [0x440950]
mov ecx, 0x40
mov byte [esp + 0x3c], al
xor eax, eax
lea edi, [esp + 0x3d]
mov dword [esp + 0x74f8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x28]
stosb byte es:[edi], al
call fcn.00422040
mov ebp, dword [esp + 0x7500]
mov byte [esp + 0x74f8], 1
test ebp, ebp
jbe 0x40659a
mov ecx, dword [esp + 0x7504]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0x14], esi
lea edi, [ecx + 0x104]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], edi
lea edx, [edi - 0x104]
push edi
push edx
lea eax, [esp + 0x48]
push 0x43c300
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x144]
push ecx
push edi
lea ecx, [esp + 0x458]
call fcn.00401f20
mov eax, dword [esp + 0x248]
test eax, eax
jle 0x406553
lea ebp, [esp + eax*4 + 0x2c8]
mov dword [esp + 0x24], eax
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406466
test al, 1
je 0x406466
and al, 0xfe
push eax
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40651f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x406494
cmp eax, 5
je 0x406494
cmp eax, 0x91
jne 0x40651f
mov edx, dword [0x43c990]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x34]
xor esi, esi
test eax, eax
mov byte [esp + 0x74fc], 2
mov edi, eax
jle 0x4064dc
mov eax, dword [esp + 0x30]
lea ecx, [eax + esi*4]
push ecx
lea ecx, [esp + 0x14]
call fcn.00422b44
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x40]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40650a
inc esi
cmp esi, edi
jl 0x4064b2
mov eax, dword [esp + 0x7518]
test eax, eax
je 0x40650a
lea ecx, [esp + 0x40]
push 1
push ecx
mov ecx, dword [esp + 0x28]
call fcn.00406c60
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x40]
push edx
push eax
lea ecx, [esp + 0x34]
call fcn.0042221c
lea ecx, [esp + 0x10]
mov byte [esp + 0x74fc], 1
call fcn.00422a0b
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x40]
push ecx
call ebx
mov edx, dword [ebp]
mov esi, eax
push edx
call ebx
sub esi, eax
mov eax, dword [esp + 0x24]
dec esi
sub ebp, 4
dec eax
mov byte [esp + esi + 0x40], 0
mov dword [esp + 0x24], eax
jne 0x406444
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x7504]
mov eax, dword [esp + 0x14]
xor edx, edx
div ebp
mov ecx, dword [esp + 0x750c]
add eax, ecx
mov ecx, dword [esp + 0x7514]
push ecx
mov ecx, dword [esp + 0x24]
push eax
call fcn.00406120
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add edx, esi
add edi, 0x208
dec eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], eax
jne 0x4063fa
pop ebx
lea ecx, [esp + 0x28]
mov byte [esp + 0x74f8], 0
call fcn.00422073
lea ecx, [esp + 0x44c]
mov dword [esp + 0x74f8], 0xffffffff
call fcn.00401820
mov ecx, dword [esp + 0x74f0]
pop edi
pop esi
xor eax, eax
pop ebp
mov dword fs:[0], ecx
add esp, 0x74f0
ret 0x18