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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x433368]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x4343ea], 1
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x220], edi
jne 0x403e5e
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403e5e
and eax, 0xffffffdc
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push 0
push 0x80000000
push 3
push 0
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
mov dword [ebp - 0x210], esi
cmp esi, 0xffffffff
jne 0x403ef2
cmp byte [0x4343e4], 0
jne 0x40412d
push edi
push str._nError_opening__s_for_delete:
call fcn.004064e2
add esp, 8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push 0
push 0
lea ecx, [ebp - 0x210]
push ecx
push 0x400
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.DLL_FormatMessageW]
push dword [ebp - 0x210]
push str._n_s_n
call fcn.004064e2
add esp, 8
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405d02
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x403f05
test eax, eax
je 0x404030
dec ebx
cmp ebx, 0xffffffff
jne 0x403f13
test eax, eax
je 0x403f13
dec eax
mov dword [ebp + 0xc], eax
push 0
lea eax, [ebp + 0xc]
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push 0
push 0
push 1
push esi
call fcn.00404390
add esp, 0x10
test al, al
jne 0x403f71
cmp byte [0x4343e4], al
jne 0x403f59
push edi
push str._nError_overwriting__s:
call fcn.004064e2
add esp, 8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.004034f0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405d02
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov edx, dword [ebp + 0xc]
xorps xmm0, xmm0
mov dword [ebp - 0x224], edx
movlpd qword [ebp - 0x21c], xmm0
test edx, edx
jb 0x404030
ja 0x403fa4
test ebx, ebx
je 0x404030
mov ecx, dword [ebp - 0x218]
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x218], eax
lea esp, [esp]
mov esi, ebx
mov edi, edx
sub esi, eax
sbb edi, ecx
test edi, edi
ja 0x403fd6
jb 0x403fdd
cmp esi, 0xa00000
jb 0x403fdd
mov esi, 0xa00000
xor edi, edi
push 0
push 0
push esi
push dword [ebp - 0x210]
call fcn.00404390
add esp, 0x10
test al, al
je 0x4040c8
mov eax, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x214]
add eax, esi
mov edx, dword [ebp - 0x224]
adc ecx, edi
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x214], ecx
cmp ecx, edx
jb 0x403fc0
ja 0x404024
cmp eax, ebx
jb 0x403fc0
mov esi, dword [ebp - 0x210]
mov edi, dword [ebp - 0x220]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.00403350
add esp, 8
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x404110
cmp byte [0x4343e4], al
jne 0x404081
push edi
push str._nError_deleting__s:
call fcn.004064e2
add esp, 8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.004034f0
add esp, 4
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
test eax, eax
jne 0x40412c
cmp byte [0x4343e4], al
jne 0x40412c
lea eax, [ebp - 0x20c]
push eax
push str._nError_renaming_file_back_to_original_name._File_is_left_as__s_n
call fcn.004064e2
add esp, 8
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405d02
mov esp, ebp
pop ebp
ret
cmp byte [0x4343e4], 0
jne 0x4040f3
push dword [ebp - 0x220]
push str._nError_overwriting__s:
call fcn.004064e2
add esp, 8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.004034f0
add esp, 4
push dword [ebp - 0x210]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405d02
mov esp, ebp
pop ebp
ret
cmp byte [0x4343e4], 0
jne 0x404126
push str.deleted._n
call fcn.004064e2
add esp, 4
inc dword [0x4343ec]
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00405d02
mov esp, ebp
pop ebp
ret