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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4925f8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4c51d0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f741
test al, 0x10
je 0x40f759
mov eax, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
mov ebx, 1
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [esp + 0x28]
call fcn.00401c30
mov dword [esp + 0x40], 0
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
push 0
mov byte [esp + 0x44], bl
call fcn.0046f566
mov ecx, dword [esp + 0x28]
push ecx
push edx
push eax
lea edx, [esp + 0x28]
push str.Tmp_I64d__s
push edx
call fcn.0040c9d0
lea esi, [esp + 0x40]
call fcn.0040d880
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
mov ebx, eax
mov byte [esp + 0x60], 2
call fcn.00407850
add esp, 0x20
mov byte [esp + 0x40], 4
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f7fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x40fa0b
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
cmp dword [edx - 0xc], 0
jne 0x40f91a
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004015d0
lea esi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x1c], esi
mov byte [esp + 0x40], 5
cmp dword [esi - 4], 1
jle 0x40f853
mov eax, dword [esi - 0xc]
push eax
lea ecx, [esp + 0x20]
call fcn.00401970
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0047054b
add esp, 8
test eax, eax
js 0x40f910
cmp eax, dword [esi - 8]
jg 0x40f910
mov dword [esi - 0xc], eax
xor ecx, ecx
lea edx, [esp + 0x1c]
mov word [esi + eax*2], cx
push edx
lea eax, [esp + 0x34]
push eax
mov ebx, 0x4a53e4
call fcn.004066f0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x38]
push edx
mov ebx, eax
mov byte [esp + 0x50], 6
call fcn.00407850
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x40], 7
call fcn.00404ed0
mov byte [esp + 0x40], 6
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f8e1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 5
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f906
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 4
lea eax, [esi - 0x10]
jmp 0x40f982
push 0x80070057
call fcn.00401ae0
push eax
lea ecx, [esp + 0x30]
push ecx
mov ebx, 0x4a53e4
call fcn.004066f0
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x3c]
push ecx
mov ebx, eax
mov byte [esp + 0x50], 8
call fcn.00407850
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x40], 9
call fcn.00404ed0
mov byte [esp + 0x40], 8
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f976
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 4
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f99b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x14]
mov eax, dword [ecx]
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x40f9b6
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
jle 0x40f9d1
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x18]
call fcn.00401970
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0047054b
add esp, 8
test eax, eax
js 0x40f910
mov ecx, dword [esp + 0x14]
cmp eax, dword [ecx - 8]
jg 0x40f910
mov dword [ecx - 0xc], eax
mov edx, dword [esp + 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
mov eax, dword [esp + 0x14]
push 4
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x40fa23
mov dword [esp + 0x20], ebx
mov byte [esp + 0x40], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa6c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa94
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret