Function at 0x14001128f
Capabilities:
Check for time delay via gettickcount
Check if file exists
Execute command
Read file on windows
Write and execute a file
Write file on windows

Disassembly:
jmp 0x1400118f0
push rbp
push rdi
sub rsp, 0x108
lea rbp, [rsp + 0x40]
lea rcx, [0x1400250a2]
call fcn.1400113a2
mov dword [0x14001f074], 0
jmp 0x140011925
mov eax, dword [0x14001f074]
inc eax
mov dword [0x14001f074], eax
cmp dword [0x14001f074], 0x4e0
jge 0x14001194b
movsxd rax, dword [0x14001f074]
lea rcx, [0x14001e1d0]
movzx edx, byte [0x14001f074]
mov byte [rcx + rax], dl
jmp 0x140011917
lea rcx, str._n_n_
call fcn.1400111a9
lea rcx, str._n__Serial_Transmission__Win32_API__
call fcn.1400111a9
lea rcx, [0x14001ac98]
call fcn.1400111a9
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
lea rcx, str.COM6
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [section..data], rax
cmp qword [section..data], 0xffffffffffffffff
jne 0x1400119e9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1400119d1
lea rdx, [0x14001e008]
lea rcx, str._n_n_Error____Port__s_cant_be_opened
call fcn.1400111a9
jmp 0x1400119dd
lea rcx, str._n_n_Error____invalid_handle_value_
call fcn.1400111a9
jmp 0x140011f95
lea rdx, [0x14001e008]
lea rcx, str._n_Port__s_Opened_n
call fcn.1400111a9
mov dword [0x14001e198], 0x1c
lea rdx, [0x14001e198]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_GetCommState]
mov dword [0x14001e190], eax
cmp dword [0x14001e190], 0
jne 0x140011a3f
lea rcx, str._n_n_Error__in_GetCommState__
call fcn.1400111a9
jmp 0x140011f95
mov dword [0x14001e19c], 0x1f400
mov byte [0x14001e1aa], 8
mov byte [0x14001e1ab], 0
mov byte [0x14001e1ac], 0
mov eax, dword [0x14001e1a0]
or eax, 1
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
and eax, 0xffffffbf
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
btr eax, 8
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
btr eax, 9
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
btr eax, 0xb
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
bts eax, 0xe
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
and eax, 0xfffffffb
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
and eax, 0xfffffff7
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
and eax, 0xffffffcf
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
and eax, 0xffffffbf
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
and eax, 0xffffcfff
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
and eax, 0xfffffffb
mov dword [0x14001e1a0], eax
mov eax, dword [0x14001e1a0]
and eax, 0xfffffffb
mov dword [0x14001e1a0], eax
lea rdx, [0x14001e198]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_SetCommState]
mov dword [0x14001e190], eax
cmp dword [0x14001e190], 0
jne 0x140011b62
lea rcx, str._n_n_Error__in_Setting_DCB_Structure
call fcn.1400111a9
jmp 0x140011f95
lea rcx, str._n_Setting_DCB_Structure_Successfull_n
call fcn.1400111a9
mov edx, dword [0x14001e19c]
lea rcx, str._n_Baudrate___d
call fcn.1400111a9
movzx eax, byte [0x14001e1aa]
mov edx, eax
lea rcx, str._n_ByteSize___d
call fcn.1400111a9
movzx eax, byte [0x14001e1ac]
mov edx, eax
lea rcx, str._n_StopBits___d
call fcn.1400111a9
movzx eax, byte [0x14001e1ab]
mov edx, eax
lea rcx, str._n_Parity___d
call fcn.1400111a9
mov dword [0x14001e1b8], 0x32
mov dword [0x14001e1c0], 0x32
mov dword [0x14001e1bc], 0xa
mov dword [0x14001e1c8], 0x32
mov dword [0x14001e1c4], 0xa
lea rdx, [0x14001e1b8]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x140011c21
lea rcx, str._n_n_Error__in_Setting_Time_Outs
call fcn.1400111a9
jmp 0x140011f95
lea rcx, str._n_n_Setting_Serial_Port_Timeouts_Successfull_n
call fcn.1400111a9
mov edx, dword [0x14001e1b8]
lea rcx, str._n_ReadIntervalTimeout___d
call fcn.1400111a9
mov edx, dword [0x14001e1c0]
lea rcx, str._n_ReadTotalTimeoutConstant___d
call fcn.1400111a9
mov edx, dword [0x14001e1bc]
lea rcx, str._n_ReadTotalTimeoutMultiplier___d
call fcn.1400111a9
mov edx, dword [0x14001e1c8]
lea rcx, str._n_WriteTotalTimeoutConstant___d
call fcn.1400111a9
mov edx, dword [0x14001e1c4]
lea rcx, str._n_WriteTotalTimeoutMultiplier___d
call fcn.1400111a9
mov edx, 0xc
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_PurgeComm]
mov dword [0x14001f07c], 1
mov edx, dword [0x14001f07c]
lea rcx, str._n_n__d_pass.__n
call fcn.1400111a9
mov dword [0x14001e194], 0x4e0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x14001f080], eax
mov qword [rsp + 0x20], 0
lea r9, [0x14001e1b4]
mov r8d, dword [0x14001e194]
lea rdx, [0x14001e1d0]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [0x14001e190], eax
cmp dword [0x14001e190], 1
jne 0x140011d20
lea r8, [0x14001e008]
mov edx, dword [0x14001e1b4]
lea rcx, str._n__d_bytes___Written_to__s
call fcn.1400111a9
jmp 0x140011d3e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._n_n_Error__d_in_Writing_to_Serial_Port
call fcn.1400111a9
jmp 0x140011f95
mov edx, 4
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_SetCommMask]
mov dword [0x14001e190], eax
cmp dword [0x14001e190], 0
jne 0x140011d75
lea rcx, str._n_n_Error__in_Setting_EV_TXEMPTY_CommMask
call fcn.1400111a9
jmp 0x140011f95
lea rcx, str._n_Waiting_for_Send_Data
call fcn.1400111a9
xor r8d, r8d
lea rdx, [0x14001e1cc]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_WaitCommEvent]
mov dword [0x14001e190], eax
cmp dword [0x14001e190], 0
jne 0x140011dbd
lea rcx, str._n_n_Error__in_Setting_WaitCommEvent__
call fcn.1400111a9
jmp 0x140011f95
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x14001f084], eax
mov eax, dword [0x14001f080]
mov ecx, dword [0x14001f084]
sub ecx, eax
mov eax, ecx
mov edx, eax
lea rcx, str.__d_miliseconds
call fcn.1400111a9
mov edx, 1
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_SetCommMask]
mov dword [0x14001e190], eax
cmp dword [0x14001e190], 0
jne 0x140011e1e
lea rcx, str._n_n_Error__in_Setting_EV_RXCHAR_CommMask
call fcn.1400111a9
jmp 0x140011f95
lea rcx, str._n_Waiting_for_Data_Reception
call fcn.1400111a9
xor r8d, r8d
lea rdx, [0x14001e1cc]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_WaitCommEvent]
mov dword [0x14001e190], eax
cmp dword [0x14001e190], 0
jne 0x140011e6b
lea rcx, str._n_n_Error__in_Setting_WaitCommEvent__
call fcn.1400111a9
jmp 0x140011f95
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x14001f088], eax
mov eax, dword [0x14001f084]
mov ecx, dword [0x14001f088]
sub ecx, eax
mov eax, ecx
mov edx, eax
lea rcx, str.__d_miliseconds
call fcn.1400111a9
mov dword [0x14001f074], 0
mov qword [rsp + 0x20], 0
lea r9, [0x14001f070]
mov r8d, 1
lea rdx, [0x14001e6b0]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [0x14001e190], eax
cmp dword [0x14001e190], 0
je 0x140011f34
mov dword [0x14001f078], 0
jmp 0x140011ef2
mov eax, dword [0x14001f078]
inc eax
mov dword [0x14001f078], eax
mov eax, dword [0x14001f070]
cmp dword [0x14001f078], eax
jge 0x140011f34
movsxd rax, dword [0x14001f078]
lea rcx, [0x14001e6b0]
movsxd rdx, dword [0x14001f074]
lea r8, [0x14001eb90]
movzx eax, byte [rcx + rax]
mov byte [r8 + rdx], al
mov eax, dword [0x14001f074]
inc eax
mov dword [0x14001f074], eax
jmp 0x140011ee4
cmp dword [0x14001f070], 0
ja 0x140011e9f
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x14001f08c], eax
mov eax, dword [0x14001f080]
mov ecx, dword [0x14001f08c]
sub ecx, eax
mov eax, ecx
mov r9d, eax
lea r8, [0x14001e008]
mov edx, dword [0x14001f074]
lea rcx, str._n__d_bytes_Received_from__s._n_nTotal_time_is__d_miliseconds
call fcn.1400111a9
mov eax, dword [0x14001f07c]
inc eax
mov dword [0x14001f07c], eax
cmp dword [0x14001f07c], 0xa
jge 0x140011f95
jmp 0x140011ca3
cmp qword [section..data], 0xffffffffffffffff
je 0x140011fac
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str._n__n
call fcn.1400111a9
lea rcx, str.pause
call qword [sym.imp.ucrtbased.dll_system]
xor eax, eax
lea rsp, [rbp + 0xc8]
pop rdi
pop rbp
ret