Function at 0x14016ca80
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x2c0]
sub rsp, 0x3c0
mov rax, qword [0x1404af540]
xor rax, rsp
mov qword [rbp + 0x2b0], rax
cmp dword [reloc.SinoSPE.dll_Ordinal_1], 0
mov edi, r9d
mov rsi, r8
mov r15, rdx
mov r14, rcx
je 0x14016cef2
cmp qword [0x1404c48f8], 0
je 0x14016cef2
test r8, r8
je 0x14016cef2
mov qword [rsp + 0x408], rbx
mov rbx, 0xffffffffffffffff
mov rax, rbx
nop word [rax + rax]
inc rax
cmp byte [r8 + rax], 0
jne 0x14016caf0
test rax, rax
je 0x14016ceea
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x12c
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
cmp dword [rbp + 0x318], 0
je 0x14016cc72
movzx eax, word [rsp + 0x5e]
movzx ecx, word [rsp + 0x5c]
movzx edx, word [rsp + 0x5a]
movzx r9d, word [rsp + 0x58]
test r14, r14
je 0x14016cc1c
test r15, r15
je 0x14016cb7c
mov qword [rsp + 0x40], r15
lea r8, str._02d:_02d:_02d._03d____s__s_
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ecx
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x20], edx
mov rdx, rbx
call fcn.1400d02a0
jmp 0x14016cba1
mov qword [rsp + 0x38], r14
lea r8, str._02d:_02d:_02d._03d____s_
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ecx
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x20], edx
mov rdx, rbx
call fcn.1400d02a0
lea rcx, [rsp + 0x70]
mov rax, rbx
nop dword [rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x14016cbb0
cmp rax, 0x27
jbe 0x14016cbc8
lea r8, [0x1404396e4]
jmp 0x14016cbeb
cmp rax, 0x1f
jbe 0x14016cbd7
lea r8, [0x1404396e8]
jmp 0x14016cbeb
lea r8, [0x1404396ec]
cmp rax, 0x17
ja 0x14016cbeb
lea r8, str._t_t_t_t
mov r9, rbx
lea rcx, [rsp + 0x70]
mov edx, 0x12c
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat_s]
sub edi, 1
je 0x14016cd11
cmp edi, 1
jne 0x14016cd2b
lea r8, str.Error
jmp 0x14016cd18
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ecx
lea rcx, [rsp + 0x70]
mov dword [rsp + 0x20], edx
mov rdx, rbx
sub edi, 1
je 0x14016cc61
cmp edi, 1
je 0x14016cc50
lea r8, str._02d:_02d:_02d._03d___t_t_t_t_t_s
call fcn.1400d02a0
jmp 0x14016cd41
lea r8, str._02d:_02d:_02d._03d___t_t_t_t_tError__s
call fcn.1400d02a0
jmp 0x14016cd41
lea r8, str._02d:_02d:_02d._03d___t_t_t_t_tWarning__s
call fcn.1400d02a0
jmp 0x14016cd41
test r14, r14
je 0x14016cbfe
lea rcx, [rsp + 0x70]
mov r9, r14
mov rdx, rbx
test r15, r15
je 0x14016cc9a
lea r8, str.________________s__s_
mov qword [rsp + 0x20], r15
call fcn.1400d02a0
jmp 0x14016cca6
lea r8, str.________________s_
call fcn.1400d02a0
lea rcx, [rsp + 0x70]
mov rax, rbx
nop
inc rax
cmp byte [rcx + rax], 0
jne 0x14016ccb0
cmp rax, 0x27
jbe 0x14016ccc8
lea r8, [0x1404396e4]
jmp 0x14016cceb
cmp rax, 0x1f
jbe 0x14016ccd7
lea r8, [0x1404396e8]
jmp 0x14016cceb
lea r8, [0x1404396ec]
cmp rax, 0x17
ja 0x14016cceb
lea r8, str._t_t_t_t
mov r9, rbx
lea rcx, [rsp + 0x70]
mov edx, 0x12c
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat_s]
sub edi, 1
je 0x14016cd11
cmp edi, 1
jne 0x14016cd2b
lea r8, str.Error
jmp 0x14016cd18
lea r8, str.Warning
mov r9, rbx
lea rcx, [rsp + 0x70]
mov edx, 0x12c
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat_s]
mov r9, rbx
lea rcx, [rsp + 0x70]
mov r8, rsi
mov edx, 0x12c
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat_s]
lea rcx, [rsp + 0x70]
mov rax, rbx
nop dword [rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x14016cd50
test rax, rax
je 0x14016cd65
cmp byte [rsp + rax + 0x6f], 0xa
je 0x14016cd7f
mov r9, rbx
lea r8, [0x140429b2c]
mov edx, 0x12c
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat_s]
xor edx, edx
lea rcx, [rbp + 0xa0]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
movzx ecx, word [rsp + 0x52]
lea r9, [0x1404ba700]
movzx edx, word [rsp + 0x50]
lea r8, str._slogs_4d__02d__02d.txt
movzx eax, word [rsp + 0x56]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ecx
lea rcx, [rbp + 0xa0]
mov dword [rsp + 0x20], edx
mov rdx, rbx
call fcn.1400d0920
mov rcx, qword [0x1404c48f8]
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14016cdf1
cmp eax, 0x80
jne 0x14016ceea
jmp 0x14016cedd
lea rcx, [rbp + 0xa0]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor edi, edi
lea rcx, [rbp + 0xa0]
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
mov r8d, 1
test eax, eax
je 0x14016ce6b
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, rbx
je 0x14016cedd
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rax, [rsp + 0x70]
nop dword [rax]
inc rbx
cmp byte [rax + rbx], dil
jne 0x14016ce60
jmp 0x14016ceb9
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, rbx
je 0x14016cedd
lea r9, [rsp + 0x64]
mov word [rsp + 0x60], 0xbbef
mov r8d, 3
mov byte [rsp + 0x62], 0xbf
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x20], rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rax, [rsp + 0x70]
inc rbx
cmp byte [rax + rbx], dil
jne 0x14016ceb0
lea r9, [rsp + 0x64]
mov qword [rsp + 0x20], rdi
mov r8, rbx
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1404c48f8]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rbx, qword [rsp + 0x408]
mov rcx, qword [rbp + 0x2b0]
xor rcx, rsp
call fcn.1403ca460
add rsp, 0x3c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret