Function at 0x140011285
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 0x1400118d0
push rbp
push rdi
sub rsp, 0x108
lea rbp, [rsp + 0x40]
lea rcx, [0x1400250a2]
call fcn.140011393
mov dword [0x14001ea84], 0
jmp 0x140011905
mov eax, dword [0x14001ea84]
inc eax
mov dword [0x14001ea84], eax
cmp dword [0x14001ea84], 0x2e0
jge 0x14001192b
movsxd rax, dword [0x14001ea84]
lea rcx, [0x14001e1e0]
movzx edx, byte [0x14001ea84]
mov byte [rcx + rax], dl
jmp 0x1400118f7
lea rcx, str._n_n_
call fcn.14001119f
lea rcx, str._n__Serial_Transmission__Win32_API__
call fcn.14001119f
lea rcx, [0x14001ac98]
call fcn.14001119f
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 0x1400119c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1400119b1
lea rdx, str.COM2
lea rcx, str._n_n_Error____Port__s_cant_be_opened
call fcn.14001119f
jmp 0x1400119bd
lea rcx, str._n_n_Error____invalid_handle_value_
call fcn.14001119f
jmp 0x140011f75
lea rdx, str.COM2
lea rcx, str._n_Port__s_Opened_n
call fcn.14001119f
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 0x140011a1f
lea rcx, str._n_n_Error__in_GetCommState__
call fcn.14001119f
jmp 0x140011f75
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 0x140011b42
lea rcx, str._n_n_Error__in_Setting_DCB_Structure
call fcn.14001119f
jmp 0x140011f75
lea rcx, str._n_Setting_DCB_Structure_Successfull_n
call fcn.14001119f
mov edx, dword [0x14001e1ac]
lea rcx, str._n_Baudrate___d
call fcn.14001119f
movzx eax, byte [0x14001e1ba]
mov edx, eax
lea rcx, str._n_ByteSize___d
call fcn.14001119f
movzx eax, byte [0x14001e1bc]
mov edx, eax
lea rcx, str._n_StopBits___d
call fcn.14001119f
movzx eax, byte [0x14001e1bb]
mov edx, eax
lea rcx, str._n_Parity___d
call fcn.14001119f
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 0x140011c01
lea rcx, str._n_n_Error__in_Setting_Time_Outs
call fcn.14001119f
jmp 0x140011f75
lea rcx, str._n_n_Setting_Serial_Port_Timeouts_Successfull_n
call fcn.14001119f
mov edx, dword [0x14001e1c8]
lea rcx, str._n_ReadIntervalTimeout___d
call fcn.14001119f
mov edx, dword [0x14001e1d0]
lea rcx, str._n_ReadTotalTimeoutConstant___d
call fcn.14001119f
mov edx, dword [0x14001e1cc]
lea rcx, str._n_ReadTotalTimeoutMultiplier___d
call fcn.14001119f
mov edx, dword [0x14001e1d8]
lea rcx, str._n_WriteTotalTimeoutConstant___d
call fcn.14001119f
mov edx, dword [0x14001e1d4]
lea rcx, str._n_WriteTotalTimeoutMultiplier___d
call fcn.14001119f
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.14001119f
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 0x140011d00
lea r8, str.COM2
mov edx, dword [0x14001e1c4]
lea rcx, str._n__d_bytes___Written_to__s
call fcn.14001119f
jmp 0x140011d1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._n_n_Error__d_in_Writing_to_Serial_Port
call fcn.14001119f
jmp 0x140011f75
mov edx, 4
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_SetCommMask]
mov dword [0x14001e1a0], eax
cmp dword [0x14001e1a0], 0
jne 0x140011d55
lea rcx, str._n_n_Error__in_Setting_EV_TXEMPTY_CommMask
call fcn.14001119f
jmp 0x140011f75
lea rcx, str._n_Waiting_for_Send_Data
call fcn.14001119f
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 0x140011d9d
lea rcx, str._n_n_Error__in_Setting_WaitCommEvent__
call fcn.14001119f
jmp 0x140011f75
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.14001119f
mov edx, 1
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_SetCommMask]
mov dword [0x14001e1a0], eax
cmp dword [0x14001e1a0], 0
jne 0x140011dfe
lea rcx, str._n_n_Error__in_Setting_EV_RXCHAR_CommMask
call fcn.14001119f
jmp 0x140011f75
lea rcx, str._n_Waiting_for_Data_Reception
call fcn.14001119f
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 0x140011e4b
lea rcx, str._n_n_Error__in_Setting_WaitCommEvent__
call fcn.14001119f
jmp 0x140011f75
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.14001119f
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 0x140011f14
mov dword [0x14001ea88], 0
jmp 0x140011ed2
mov eax, dword [0x14001ea88]
inc eax
mov dword [0x14001ea88], eax
mov eax, dword [0x14001ea80]
cmp dword [0x14001ea88], eax
jge 0x140011f14
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 0x140011ec4
cmp dword [0x14001ea80], 0
ja 0x140011e7f
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.14001119f
mov eax, dword [0x14001ea8c]
inc eax
mov dword [0x14001ea8c], eax
cmp dword [0x14001ea8c], 0xa
jge 0x140011f75
jmp 0x140011c83
cmp qword [section..data], 0xffffffffffffffff
je 0x140011f8c
mov rcx, qword [section..data]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str._n__n
call fcn.14001119f
lea rcx, str.pause
call qword [sym.imp.ucrtbased.dll_system]
xor eax, eax
lea rsp, [rbp + 0xc8]
pop rdi
pop rbp
ret