Function at 0x40f650
Capabilities:
Delete file
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b1af0
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x504c
call fcn.004963b0
mov eax, dword [0x4d0c20]
xor eax, ebp
mov dword [ebp - 0x40], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
push 0xbb8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0xffffffff
jne 0x40f6a6
jmp 0x40f873
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
add edx, 8
push edx
mov ecx, dword [ebp + 8]
call fcn.0040f4d0
mov dword [ebp - 0x505c], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x24]
shl ecx, 0xa
cmp dword [ebp - 0x505c], ecx
jbe 0x40f6f2
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00402ab0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 0x38], 0
xor edx, edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
lea eax, [ebp - 0x38]
push eax
push 0
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00402ab0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x14], 0
push 0x4c49d0
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00402ab0
push eax
lea ecx, [ebp - 0x14]
push ecx
call fcn.00492ba9
add esp, 0xc
cmp dword [ebp - 0x14], 0
je 0x40f850
cmp dword [ebp - 0x3c], 0
jne 0x40f787
mov byte [ebp - 0x5058], 0xff
mov byte [ebp - 0x5057], 0xfe
mov edx, dword [ebp - 0x14]
push edx
push 2
push 1
lea eax, [ebp - 0x5058]
push eax
call fcn.0049409a
add esp, 0x10
xor ecx, ecx
mov word [ebp - 0x5040], cx
push 0x4ffe
push 0
lea edx, [ebp - 0x503e]
push edx
call fcn.004955c0
add esp, 0xc
lea eax, [ebp + 0x14]
mov dword [ebp - 0x5044], eax
mov ecx, dword [ebp - 0x5044]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0xffffffffffffffff
push 0x2800
lea eax, [ebp - 0x5040]
push eax
call fcn.00494967
add esp, 0x14
mov dword [ebp - 0x5044], 0
lea ecx, [ebp - 0x5054]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea edx, [ebp - 0x5040]
push edx
movzx eax, word [ebp - 0x5048]
push eax
movzx ecx, word [ebp - 0x504a]
push ecx
movzx edx, word [ebp - 0x504c]
push edx
movzx eax, word [ebp - 0x504e]
push eax
movzx ecx, word [ebp - 0x5052]
push ecx
movzx edx, word [ebp - 0x5054]
push edx
push str.__04d__02d__02d__02d:_02d:_02d__s_r_n
mov eax, dword [ebp - 0x14]
push eax
call fcn.00494a92
add esp, 0x24
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00492f30
add esp, 4
movzx edx, byte [ebp + 0xc]
test edx, edx
je 0x40f850
lea eax, [ebp - 0x5040]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x40f85f
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x40]
xor ecx, ebp
call fcn.00492337
mov esp, ebp
pop ebp
ret