Function at 0x40e702
Capabilities:
Check if file exists
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x466750]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 5
pop ecx
push 7
mov esi, str._appdata_
lea edi, [ebp - 0x18]
rep movsd dword es:[edi], dword [esi]
pop ebx
mov ecx, ebx
lea edi, [ebp - 0x38]
mov esi, str._localappdata_
rep movsd dword es:[edi], dword [esi]
push 0x469d24
lea ecx, [ebp - 0x98]
movsw word es:[edi], word [esi]
call fcn.004070f9
xor eax, eax
mov dword [ebp - 0x54], ebx
mov word [ebp - 0x68], ax
lea ecx, [ebp - 0x50]
lea eax, [ebp - 0x18]
xor esi, esi
push eax
mov dword [ebp - 0x58], esi
call fcn.0040276c
push ecx
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0x98]
call fcn.0041f760
pop ecx
xor edi, edi
lea ecx, [ebp - 0x50]
push esi
inc edi
mov bl, al
push edi
call fcn.00402c5d
test bl, bl
je 0x40e844
xor eax, eax
mov dword [ebp - 0x3c], 7
push 0x6c
xor ebx, ebx
mov word [ebp - 0x50], ax
lea edx, [ebp - 0x50]
mov dword [ebp - 0x40], ebx
pop ecx
call fcn.004242d0
test al, al
je 0x40e895
cmp dword [ebp - 0x3c], 8
lea eax, [ebp - 0x50]
lea ecx, [ebp - 0x80]
cmovae eax, dword [ebp - 0x50]
push eax
call fcn.0040276c
lea ecx, [ebp - 0x18]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40e7c6
sub ecx, edx
lea eax, [ebp - 0xc8]
sar ecx, 1
push 0xffffffffffffffff
push ecx
push eax
lea ecx, [ebp - 0x98]
call fcn.00402820
push ecx
push ecx
lea ecx, [ebp - 0x80]
push ecx
push ecx
mov ecx, eax
call fcn.004077d1
push eax
lea ecx, [ebp - 0xb0]
call fcn.0040279d
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x68]
call fcn.004027c2
push ebx
push edi
lea ecx, [ebp - 0xb0]
call fcn.00402c5d
push ebx
push edi
lea ecx, [ebp - 0xc8]
call fcn.00402c5d
lea ecx, [ebp - 0x80]
push ebx
push edi
call fcn.00402c5d
lea ecx, [ebp - 0x50]
call fcn.00422df0
jmp 0x40e92d
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x80]
call fcn.0040276c
push ecx
lea edx, [ebp - 0x80]
lea ecx, [ebp - 0x98]
call fcn.0041f760
pop ecx
push esi
push edi
lea ecx, [ebp - 0x80]
mov bl, al
call fcn.00402c5d
test bl, bl
je 0x40e92b
xor eax, eax
mov dword [ebp - 0x3c], 7
push 0x6e
xor ebx, ebx
mov word [ebp - 0x50], ax
lea edx, [ebp - 0x50]
mov dword [ebp - 0x40], ebx
pop ecx
call fcn.004242d0
test al, al
jne 0x40e8a2
lea ecx, [ebp - 0x50]
call fcn.00422df0
jmp 0x40e9c9
cmp dword [ebp - 0x3c], 8
lea eax, [ebp - 0x50]
lea ecx, [ebp - 0xb0]
cmovae eax, dword [ebp - 0x50]
push eax
call fcn.0040276c
lea ecx, [ebp - 0x38]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40e8bf
sub ecx, edx
lea eax, [ebp - 0xc8]
sar ecx, 1
push 0xffffffffffffffff
push ecx
push eax
lea ecx, [ebp - 0x98]
call fcn.00402820
push ecx
push ecx
lea ecx, [ebp - 0xb0]
push ecx
push ecx
mov ecx, eax
call fcn.004077d1
push eax
lea ecx, [ebp - 0x80]
call fcn.0040279d
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x68]
call fcn.004027c2
push ebx
push edi
lea ecx, [ebp - 0x80]
call fcn.00402c5d
push ebx
push edi
lea ecx, [ebp - 0xc8]
call fcn.00402c5d
lea ecx, [ebp - 0xb0]
jmp 0x40e830
xor ebx, ebx
lea eax, [ebp - 0xc9]
push eax
lea ecx, [ebp - 0x68]
call fcn.0041939a
pop ecx
test al, al
je 0x40e94d
cmp byte [ebp - 0xc9], 0
sete al
jmp 0x40e94f
mov al, bl
test al, al
je 0x40e98b
mov esi, ebx
cmp dword [ebp - 0x54], 8
lea eax, [ebp - 0x68]
cmovae eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40e9c9
mov eax, esi
inc esi
cmp eax, 5
jge 0x40e9c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40e9c9
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e955
lea eax, [ebp - 0xc9]
push eax
lea ecx, [ebp - 0x68]
call fcn.0041939a
neg al
pop ecx
sbb al, al
and al, byte [ebp - 0xc9]
je 0x40e9c9
lea ecx, [ebp - 0x68]
call fcn.00419580
lea ecx, [ebp - 0x68]
call fcn.00419580
cmp dword [ebp - 0x54], 8
lea eax, [ebp - 0x68]
cmovae eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push ebx
push edi
lea ecx, [ebp - 0x68]
call fcn.00402c5d
push ebx
push edi
lea ecx, [ebp - 0x98]
call fcn.00402c5d
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042ee4e
mov esp, ebp
pop ebp
ret