Function at 0x40f140
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x495daa
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
mov eax, dword [0x4bfa48]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xe0], 0
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp + 8]
call fcn.0040b6e0
mov dword [ebp - 0xe4], eax
mov ecx, dword [ebp - 0xe4]
mov dword [ebp - 0xe8], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0xe0]
or edx, 1
mov dword [ebp - 0xe0], edx
mov ecx, dword [ebp - 0xe8]
call fcn.00401eb0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40f1e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40f1e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x40f1e1
mov dword [ebp - 0xec], 0
jmp 0x40f1eb
mov dword [ebp - 0xec], 1
mov al, byte [ebp - 0xec]
mov byte [ebp - 0x2d], al
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xe0]
and ecx, 1
je 0x40f215
and dword [ebp - 0xe0], 0xfffffffe
lea ecx, [ebp - 0x4c]
call fcn.00401100
movzx edx, byte [ebp - 0x2d]
test edx, edx
je 0x40f224
mov al, 1
jmp 0x40f448
push str..removed
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x68]
push ecx
call fcn.00412ee0
add esp, 8
mov dword [ebp - 0xf0], eax
mov edx, dword [ebp - 0xf0]
mov dword [ebp - 0xf4], edx
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0xf4]
push eax
lea ecx, [ebp - 0x84]
push ecx
call fcn.004114b0
add esp, 0xc
mov dword [ebp - 0xf8], eax
mov edx, dword [ebp - 0xf8]
mov dword [ebp - 0xfc], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xfc]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x2c]
push edx
call fcn.00412f10
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x84]
call fcn.00401100
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x68]
call fcn.00401100
lea eax, [ebp - 0x2c]
push eax
call fcn.0040f140
add esp, 4
movzx ecx, al
test ecx, ecx
je 0x40f3b1
lea edx, [ebp - 0xa4]
push edx
lea ecx, [ebp - 0x2c]
call fcn.0040b6e0
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0x100]
mov dword [ebp - 0x104], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0xe0]
or ecx, 2
mov dword [ebp - 0xe0], ecx
mov ecx, dword [ebp - 0x104]
call fcn.00401eb0
push eax
lea edx, [ebp - 0xc0]
push edx
mov ecx, dword [ebp + 8]
call fcn.0040b6e0
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x108]
mov dword [ebp - 0x10c], eax
mov dword [ebp - 4], 7
mov ecx, dword [ebp - 0xe0]
or ecx, 4
mov dword [ebp - 0xe0], ecx
mov ecx, dword [ebp - 0x10c]
call fcn.00401eb0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40f3b1
push 4
push 0
lea edx, [ebp - 0xdc]
push edx
lea ecx, [ebp - 0x2c]
call fcn.0040b6e0
mov dword [ebp - 0x110], eax
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x114], eax
mov dword [ebp - 4], 8
mov ecx, dword [ebp - 0xe0]
or ecx, 8
mov dword [ebp - 0xe0], ecx
mov ecx, dword [ebp - 0x114]
call fcn.00401eb0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x40f3b1
mov dword [ebp - 0x118], 1
jmp 0x40f3bb
mov dword [ebp - 0x118], 0
mov dl, byte [ebp - 0x118]
mov byte [ebp - 0x85], dl
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0xe0]
and eax, 8
je 0x40f3eb
and dword [ebp - 0xe0], 0xfffffff7
lea ecx, [ebp - 0xdc]
call fcn.00401100
mov dword [ebp - 4], 6
mov ecx, dword [ebp - 0xe0]
and ecx, 4
je 0x40f40f
and dword [ebp - 0xe0], 0xfffffffb
lea ecx, [ebp - 0xc0]
call fcn.00401100
mov dword [ebp - 4], 5
mov edx, dword [ebp - 0xe0]
and edx, 2
je 0x40f433
and dword [ebp - 0xe0], 0xfffffffd
lea ecx, [ebp - 0xa4]
call fcn.00401100
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004276d0
mov al, byte [ebp - 0x85]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047beb8
mov esp, ebp
pop ebp
ret