Function at 0x404b04
Capabilities:
Check for time delay via queryperformancecounter
Check if file exists
Get file attributes
Get file size
Write file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
push rsi
push rdi
push r12
push r13
push r14
mov eax, 0x12a8
call fcn.0040e140
sub rsp, rax
mov qword [rsp + 0x68], 0xfffffffffffffffe
movaps xmmword [rsp + 0x1290], xmm6
mov rax, qword [0x0041c0d8]
xor rax, rsp
mov qword [rsp + 0x1280], rax
mov rbx, rdx
mov esi, ecx
xor r14d, r14d
lea rdi, [0x00471b90]
cmp byte [0x00471b83], r14b
jne 0x404bee
mov byte [0x00471b83], 1
lea r8, str.C:Ti_Logs_
mov r12d, 0x104
mov edx, r12d
mov rcx, rdi
call fcn.00407534
mov word [rsp + 0x70], r14w
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x72]
call fcn.00406400
mov r8d, r12d
lea rdx, [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [r14 + 0x2e]
lea rcx, [rsp + 0x70]
call fcn.004075a0
mov word [rax], r14w
lea edx, [r14 + 0x5c]
lea rcx, [rsp + 0x70]
call fcn.004075a0
add rax, 2
mov r8, rax
mov edx, r12d
mov rcx, rdi
call fcn.00406b10
lea r8, str..log
mov edx, r12d
mov rcx, rdi
call fcn.00406b10
cmp byte [0x00471b82], r14b
jne 0x404f39
cmp byte [0x00471b80], r14b
jne 0x404c31
lea rcx, str.C:Ti_Logs_
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404c1a
mov al, 1
jmp 0x404c22
shr eax, 4
not eax
and eax, 1
mov byte [0x00471b81], al
mov byte [0x00471b80], 1
jmp 0x404c37
mov al, byte [0x00471b81]
test al, al
jne 0x404f39
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
mov rcx, rbx
call fcn.00407238
test rax, rax
cmove rbx, rdi
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 3]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x404f39
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, r12
cmp eax, esi
jbe 0x404cb8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [0x00471b82], 1
jmp 0x404f39
xor r9d, r9d
xor r8d, r8d
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x50], r14d
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rbx, qword [rsp + 0x58]
sub rbx, qword [0x00471da8]
mov byte [rsp + 0x280], r14b
xor edx, edx
mov r8d, 0x3ff
lea rcx, [rsp + 0x281]
call fcn.00406400
cmp byte [0x00471d98], r14b
je 0x404d7c
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
pxor xmm1, xmm1
cvtsi2ss xmm1, rbx
pxor xmm0, xmm0
cvtsi2ss xmm0, qword [0x00471da0]
divss xmm1, xmm0
unpcklps xmm1, xmm1
cvtps2pd xmm3, xmm1
mov rcx, qword [rsp + 0x12f0]
mov qword [rsp + 0x38], rcx
lea rcx, str.4.0.3.0_10695
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], eax
movq r9, xmm3
lea r8, str._f_s__thr____d__prs____d__Revision____S___s
mov ebx, 0x400
mov edx, ebx
lea rcx, [rsp + 0x280]
call fcn.004063c0
jmp 0x404e2f
lea rcx, [0x00471da0]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea rcx, [0x00471da8]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rbx, qword [rsp + 0x58]
sub rbx, qword [0x00471da8]
mov byte [0x00471d98], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
pxor xmm1, xmm1
cvtsi2ss xmm1, rbx
pxor xmm0, xmm0
cvtsi2ss xmm0, qword [0x00471da0]
divss xmm1, xmm0
unpcklps xmm1, xmm1
cvtps2pd xmm6, xmm1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r9d, eax
mov rcx, qword [rsp + 0x12f0]
mov qword [rsp + 0x40], rcx
lea rcx, str.4.0.3.0_10695
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], edi
movsd qword [rsp + 0x20], xmm6
lea r8, str.Tick____d___f_s__thr____d__prs____d__Revision____S___s
mov ebx, 0x400
mov edx, ebx
lea rcx, [rsp + 0x280]
call fcn.004063c0
lea r9, [rsp + 0x12f8]
lea r8, [rsp + 0x280]
mov rdx, rbx
lea rcx, [rsp + 0x680]
call fcn.00406a68
mov qword [rsp + 0x60], r14
mov word [rsp + 0xa80], r14w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rsp + 0xa82]
call fcn.00406400
xor edx, edx
mov r8d, 0x800
lea rcx, [rsp + 0xa80]
call fcn.00406400
lea rcx, [rsp + 0x680]
call fcn.00406700
mov r9, rax
mov dword [rsp + 0x28], ebx
lea rax, [rsp + 0xa80]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x680]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x50]
mov r8d, 6
lea rdx, [0x00417c70]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rcx, [rsp + 0xa80]
call fcn.00407238
lea r8d, [rax + rax]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x50]
lea rdx, [rsp + 0xa80]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x50]
mov r8d, 4
lea rdx, [0x00417c78]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, qword [rsp + 0x1280]
xor rcx, rsp
call fcn.004063a0
movaps xmm6, xmmword [rsp + 0x1290]
add rsp, 0x12a8
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret