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 [0x14001ea84], 0
jmp 0x140011925
mov eax, dword [0x14001ea84]
inc eax
mov dword [0x14001ea84], eax
cmp dword [0x14001ea84], 0x2e0
jge 0x14001194b
movsxd rax, dword [0x14001ea84]
lea rcx, [0x14001e1e0]
movzx edx, byte [0x14001ea84]
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..COM2
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, str.COM2
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, str.COM2
lea rcx, str._n_Port__s_Opened_n
call fcn.1400111a9
mov dword [0x14001e1a8], 0x1c
lea rdx, [0x14001e1a8]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_GetCommState]
mov dword [0x14001e1a0], eax
cmp dword [0x14001e1a0], 0
jne 0x140011a3f
lea rcx, str._n_n_Error__in_GetCommState__
call fcn.1400111a9
jmp 0x140011f95
mov dword [0x14001e1ac], 0x3840
mov byte [0x14001e1ba], 8
mov byte [0x14001e1bb], 0
mov byte [0x14001e1bc], 0
mov eax, dword [0x14001e1b0]
or eax, 1
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
and eax, 0xffffffbf
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
btr eax, 8
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
btr eax, 9
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
btr eax, 0xb
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
bts eax, 0xe
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
and eax, 0xfffffffb
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
and eax, 0xfffffff7
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
and eax, 0xffffffcf
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
and eax, 0xffffffbf
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
and eax, 0xffffcfff
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
and eax, 0xfffffffb
mov dword [0x14001e1b0], eax
mov eax, dword [0x14001e1b0]
and eax, 0xfffffffb
mov dword [0x14001e1b0], eax
lea rdx, [0x14001e1a8]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_SetCommState]
mov dword [0x14001e1a0], eax
cmp dword [0x14001e1a0], 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 [0x14001e1ac]
lea rcx, str._n_Baudrate___d
call fcn.1400111a9
movzx eax, byte [0x14001e1ba]
mov edx, eax
lea rcx, str._n_ByteSize___d
call fcn.1400111a9
movzx eax, byte [0x14001e1bc]
mov edx, eax
lea rcx, str._n_StopBits___d
call fcn.1400111a9
movzx eax, byte [0x14001e1bb]
mov edx, eax
lea rcx, str._n_Parity___d
call fcn.1400111a9
mov dword [0x14001e1c8], 0x32
mov dword [0x14001e1d0], 0x32
mov dword [0x14001e1cc], 0xa
mov dword [0x14001e1d8], 0x32
mov dword [0x14001e1d4], 0xa
lea rdx, [0x14001e1c8]
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 [0x14001e1c8]
lea rcx, str._n_ReadIntervalTimeout___d
call fcn.1400111a9
mov edx, dword [0x14001e1d0]
lea rcx, str._n_ReadTotalTimeoutConstant___d
call fcn.1400111a9
mov edx, dword [0x14001e1cc]
lea rcx, str._n_ReadTotalTimeoutMultiplier___d
call fcn.1400111a9
mov edx, dword [0x14001e1d8]
lea rcx, str._n_WriteTotalTimeoutConstant___d
call fcn.1400111a9
mov edx, dword [0x14001e1d4]
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 [0x14001ea8c], 1
mov edx, dword [0x14001ea8c]
lea rcx, str._n_n__d_pass.__n
call fcn.1400111a9
mov dword [0x14001e1a4], 0x2e0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x14001ea90], eax
mov qword [rsp + 0x20], 0
lea r9, [0x14001e1c4]
mov r8d, dword [0x14001e1a4]
lea rdx, [0x14001e1e0]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [0x14001e1a0], eax
cmp dword [0x14001e1a0], 1
jne 0x140011d20
lea r8, str.COM2
mov edx, dword [0x14001e1c4]
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 [0x14001e1a0], eax
cmp dword [0x14001e1a0], 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, [0x14001e1dc]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_WaitCommEvent]
mov dword [0x14001e1a0], eax
cmp dword [0x14001e1a0], 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 [0x14001ea94], eax
mov eax, dword [0x14001ea90]
mov ecx, dword [0x14001ea94]
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 [0x14001e1a0], eax
cmp dword [0x14001e1a0], 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, [0x14001e1dc]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_WaitCommEvent]
mov dword [0x14001e1a0], eax
cmp dword [0x14001e1a0], 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 [0x14001ea98], eax
mov eax, dword [0x14001ea94]
mov ecx, dword [0x14001ea98]
sub ecx, eax
mov eax, ecx
mov edx, eax
lea rcx, str.__d_miliseconds
call fcn.1400111a9
mov dword [0x14001ea84], 0
mov qword [rsp + 0x20], 0
lea r9, [0x14001ea80]
mov r8d, 1
lea rdx, [0x14001e4c0]
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [0x14001e1a0], eax
cmp dword [0x14001e1a0], 0
je 0x140011f34
mov dword [0x14001ea88], 0
jmp 0x140011ef2
mov eax, dword [0x14001ea88]
inc eax
mov dword [0x14001ea88], eax
mov eax, dword [0x14001ea80]
cmp dword [0x14001ea88], eax
jge 0x140011f34
movsxd rax, dword [0x14001ea88]
lea rcx, [0x14001e4c0]
movsxd rdx, dword [0x14001ea84]
lea r8, [0x14001e7a0]
movzx eax, byte [rcx + rax]
mov byte [r8 + rdx], al
mov eax, dword [0x14001ea84]
inc eax
mov dword [0x14001ea84], eax
jmp 0x140011ee4
cmp dword [0x14001ea80], 0
ja 0x140011e9f
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x14001ea9c], eax
mov eax, dword [0x14001ea90]
mov ecx, dword [0x14001ea9c]
sub ecx, eax
mov eax, ecx
mov r9d, eax
lea r8, str.COM2
mov edx, dword [0x14001ea84]
lea rcx, str._n__d_bytes_Received_from__s._n_nTotal_time_is__d_miliseconds
call fcn.1400111a9
mov eax, dword [0x14001ea8c]
inc eax
mov dword [0x14001ea8c], eax
cmp dword [0x14001ea8c], 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