Function at 0x40f6c0
Capabilities:
Check if file exists
Delete file
Get file size
Move file
Write file on windows

Disassembly:
sub esp, 0xd78
mov eax, dword [0x42c4fc]
xor eax, esp
mov dword [esp + 0xd74], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x410
lea eax, [esp + 0x96e]
push ebx
push eax
mov esi, ecx
mov dword [esp + 0x1c], ebx
mov word [esp + 0x974], bx
call sub.MSVCR80.dll_memset
push 0x7e
lea ecx, [esp + 0x3a]
push ebx
push ecx
mov word [esp + 0x40], bx
call sub.MSVCR80.dll_memset
push 0x7e
lea edx, [esp + 0xc6]
push ebx
push edx
mov word [esp + 0xcc], bx
call sub.MSVCR80.dll_memset
add esp, 0x24
lea eax, [esp + 0x18]
push eax
or edi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
push 0x40
lea ecx, [esp + 0x2c]
push ecx
push ebx
lea edx, [esp + 0x24]
push edx
push 2
push 0x400
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
push 0x40
lea eax, [esp + 0xac]
push eax
push str.hh:mm:ss
lea ecx, [esp + 0x24]
push ecx
push 8
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
mov edx, dword [esp + 0xd8c]
push ebx
push esi
push 0x1002
push 0x53464150
push edx
lea eax, [esp + 0xbc]
push eax
lea ecx, [esp + 0x40]
push ecx
push str._s__s:_HRESULT:_d_ft:_x_func:_x_path:_s__s_r_n
lea edx, [esp + 0x988]
push 0x208
push edx
call dword [sym.imp.MSVCR80.dll_swprintf_s]
push 0x208
lea eax, [esp + 0x575]
push ebx
push eax
mov byte [esp + 0x57c], bl
call sub.MSVCR80.dll_memset
lea eax, [esp + 0x99c]
add esp, 0x34
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f7d1
push ebx
push ebx
push 0x208
sub eax, edx
lea ecx, [esp + 0x554]
push ecx
sar eax, 1
push eax
lea edx, [esp + 0x97c]
push edx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x208
lea eax, [esp + 0x75e]
push ebx
push eax
mov word [esp + 0x764], bx
call sub.MSVCR80.dll_memset
push 0x208
lea ecx, [esp + 0x13a]
push ebx
push ecx
mov word [esp + 0x140], bx
call sub.MSVCR80.dll_memset
add esp, 0x18
lea esi, [esp + 0x758]
call fcn.0040f9e0
test eax, eax
je 0x40f9ad
mov ebp, dword [sym.imp.MSVCR80.dll_wcscpy_s]
mov edx, esi
push edx
lea eax, [esp + 0x12c]
push 0x104
push eax
call ebp
add esp, 0xc
push str.QMDellog.dat
lea ecx, [esp + 0x12c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push 0x80
push 4
push ebx
push 3
push 0xc0000000
lea edx, [esp + 0x140]
push edx
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x40f9a9
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x100000
jb 0x40f968
push 0x208
lea eax, [esp + 0x33e]
push ebx
push eax
mov word [esp + 0x344], bx
call sub.MSVCR80.dll_memset
lea ecx, [esp + 0x134]
push ecx
lea edx, [esp + 0x348]
push 0x104
push edx
call ebp
push str..bak
lea eax, [esp + 0x354]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_wcscat_s]
add esp, 0x24
lea ecx, [esp + 0x338]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40f926
lea edx, [esp + 0x338]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x338]
push eax
lea ecx, [esp + 0x12c]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40f9a9
push ebx
push 0x80
push 4
push ebx
push 3
push 0xc0000000
lea edx, [esp + 0x140]
push edx
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x40f9a9
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x548]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40f980
push ebx
lea ecx, [esp + 0x18]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x554]
push edx
push edi
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x10], eax
cmp edi, ebx
je 0x40f9b4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xd84]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00416e92
add esp, 0xd78
ret