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

Disassembly:
sub esp, 0x460
mov eax, dword [0x48e0ec]
xor eax, esp
mov dword [esp + 0x45c], eax
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
xor edx, edx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], edi
nop word [eax + eax]
xor cl, cl
mov byte [esp + 0x13], cl
cmp byte [edi + 0xc], cl
je 0x402f95
mov eax, 0x1b
jmp 0x4030af
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x4031b4
mov eax, dword [ebx + 8]
test eax, eax
je 0x402fb0
cmp eax, 1
jne 0x4031a9
push dword [ebx + 4]
push dword [edi]
call fcn.004046f0
add esp, 8
mov esi, eax
cmp dword [ebx + 8], 0
jne 0x4030ed
mov eax, dword [ebx]
inc eax
push eax
push dword [edi + 8]
lea eax, [esp + 0x24]
push str.TMP__d__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x2c]
push eax
push dword [edi]
call fcn.004046f0
add esp, 0x18
mov edi, eax
lea eax, [esp + 0x264]
push 0x104
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call ebp
test eax, eax
jne 0x403014
mov byte [esp + 0x12], al
jmp 0x403050
push 0x104
lea eax, [esp + 0x60]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call ebp
test eax, eax
jne 0x403034
mov byte [esp + 0x12], al
jmp 0x403050
push 3
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileExW]
test eax, eax
setne byte [esp + 0x12]
push edi
call fcn.00442387
add esp, 4
cmp byte [esp + 0x12], 0
jne 0x4030dd
push 0x104
lea eax, [esp + 0x268]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call ebp
test eax, eax
je 0x4030e9
lea eax, [esp + 0x264]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
setne al
test al, al
je 0x4030e9
push esi
call fcn.00442387
mov edx, dword [esp + 0x1c]
mov eax, 0x12
mov cl, byte [esp + 0x17]
add esp, 4
mov edi, dword [esp + 0x14]
inc edx
cmp edx, 5
jg 0x403253
xor eax, eax
test cl, cl
cmovne edx, eax
mov eax, 0x64
mov ecx, edx
mov dword [esp + 0x18], edx
shl eax, cl
push eax
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov edx, dword [esp + 0x18]
jmp 0x402f80
mov byte [esp + 0x13], 1
mov dword [ebx + 8], 1
mov edi, dword [esp + 0x14]
push dword [ebx + 4]
push dword [edi]
call fcn.00403530
push dword [ebx]
lea eax, [esp + 0x28]
push dword [edi + 8]
push str.TMP__d__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x34]
push eax
push dword [edi]
call fcn.004046f0
add esp, 0x20
mov edi, eax
lea eax, [esp + 0x5c]
push 0x104
push eax
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call ebp
test eax, eax
jne 0x40313d
mov byte [esp + 0x12], al
jmp 0x40317c
push 0x104
lea eax, [esp + 0x268]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call ebp
test eax, eax
jne 0x403160
mov byte [esp + 0x12], al
jmp 0x40317c
push 3
lea eax, [esp + 0x268]
push eax
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileExW]
test eax, eax
setne byte [esp + 0x12]
push edi
call fcn.00442387
add esp, 4
cmp byte [esp + 0x12], 0
push esi
je 0x403096
mov dword [ebx + 8], 2
mov byte [esp + 0x17], 1
call fcn.00442387
mov edi, dword [esp + 0x18]
add esp, 4
mov ebx, dword [ebx + 0xc]
test ebx, ebx
jne 0x402fa0
mov edi, dword [edi + 0x10]
test edi, edi
je 0x403251
mov ebx, dword [esp + 0x14]
mov eax, dword [edi + 8]
cmp eax, 2
je 0x4031d7
cmp eax, 5
je 0x4031d7
cmp eax, 4
jne 0x403246
jmp 0x40323f
mov eax, dword [edi]
inc eax
push eax
push dword [ebx + 8]
lea eax, [esp + 0x24]
push str.TMP__d__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x2c]
push eax
push dword [ebx]
call fcn.004046f0
add esp, 0x18
mov esi, eax
lea eax, [esp + 0x5c]
push 0x104
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call ebp
test eax, eax
je 0x403236
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x403236
push 4
push eax
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileExW]
push esi
call fcn.00442387
add esp, 4
mov dword [edi + 8], 3
mov edi, dword [edi + 0xc]
test edi, edi
jne 0x4031c3
xor eax, eax
mov ecx, dword [esp + 0x46c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00423c9a
add esp, 0x460
ret