Function at 0x140003500
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r15
lea rbp, [rsp - 0x7c0]
sub rsp, 0x8c0
mov rax, qword [0x140085018]
xor rax, rsp
mov qword [rbp + 0x7b0], rax
xor eax, eax
lea r8, str.com4
xorps xmm0, xmm0
mov qword [rbp - 0x60], rax
xor r15d, r15d
mov byte [0x140088030], al
lea rcx, [rbp - 0x80]
mov dword [rsp + 0x44], r15d
lea edx, [rax + 0x14]
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
call fcn.1400016f0
lea rdx, [rbp - 0x80]
lea rcx, str.Port_Number_:__s
call fcn.140001690
mov qword [rsp + 0x30], r15
lea rcx, [rbp - 0x80]
mov dword [rsp + 0x28], r15d
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400035ac
lea rcx, str._n_Port_cant_be_opened_n_n
call fcn.1400017b0
jmp 0x1400036d2
xorps xmm0, xmm0
mov qword [rsp + 0x74], r15
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x60], 0x1c
mov rcx, rsi
movdqu xmmword [rsp + 0x64], xmm0
call qword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x1400035e5
lea rcx, str._nError_to_Get_the_Com_state_n_n
call fcn.1400017b0
jmp 0x1400036d2
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x64], 0x2580
mov rcx, rsi
mov word [rsp + 0x72], 8
mov byte [rsp + 0x74], r15b
call qword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x14000361c
lea rcx, str._nError_to_Setting_DCB_Structure_n_n
call fcn.1400017b0
jmp 0x1400036d2
xorps xmm0, xmm0
lea rdx, [rsp + 0x48]
xor eax, eax
mov rcx, rsi
movups xmmword [rsp + 0x48], xmm0
mov dword [rsp + 0x58], eax
call qword [sym.imp.KERNEL32.dll_GetCommTimeouts]
test eax, eax
jne 0x140003668
call fcn.140003930
mov dl, 0xa
mov rbx, rax
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call fcn.140003fd0
movzx edx, al
mov rcx, rbx
call fcn.140003e20
mov rcx, rbx
call fcn.140003cc0
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x48], r15
mov rcx, rsi
mov qword [rsp + 0x50], 0x96
mov dword [rsp + 0x58], r15d
call qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x14000369b
lea rcx, str._nError_to_Setting_Time_outs
call fcn.1400017b0
jmp 0x1400036d2
mov edx, 1
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetCommMask]
test eax, eax
jne 0x1400036bb
lea rcx, str._nError_to_in_Setting_CommMask_n_n
call fcn.1400017b0
jmp 0x1400036d2
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
test rsi, rsi
jne 0x1400036e7
lea rdx, [rbp - 0x80]
lea rcx, str.Fail_to_init__s_r_nExit_program._r_nGood_bye.
call fcn.140001690
jmp 0x1400038f4
mov qword [rsp + 0x8e0], rdi
lea rcx, str._r_n_d_r_nWaitCommEvent__r_n
xor edx, edx
mov qword [rsp + 0x8e8], r14
mov qword [0x140088078], rsi
call fcn.140001750
xor r8d, r8d
mov dword [rsp + 0x40], r15d
lea rdx, [rsp + 0x44]
mov rcx, rsi
mov r14d, 1
call qword [sym.imp.KERNEL32.dll_WaitCommEvent]
lea ecx, [r14 + 0x6d]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str.WaitCommEvent___r_n
call fcn.140001750
test ebx, ebx
je 0x140003894
mov eax, dword [rsp + 0x44]
test al, 0x10
je 0x140003760
lea rcx, str.EV_DSR_r_n
call fcn.140001750
mov eax, dword [rsp + 0x44]
test al, 8
je 0x140003770
lea rcx, str.EV_CTS_r_n
call fcn.140001750
mov edx, 1
lea rcx, str.POINT__d_r_n
call fcn.140001750
mov eax, dword [rsp + 0x44]
test al, 1
je 0x14000383b
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r15
mov r8d, 0x78
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400038c3
mov edx, dword [rsp + 0x40]
test edx, edx
je 0x14000384b
lea rcx, str.Readed_bytes_:__d_r_n
call fcn.1400017b0
lea rcx, str.Received_
call fcn.1400017b0
mov edi, r15d
cmp dword [rsp + 0x40], r15d
jbe 0x14000380b
lea rbx, [rbp - 0x50]
nop dword [rax]
nop dword [rax + rax]
movzx edx, byte [rbx]
lea rcx, str._02x
call fcn.1400017b0
inc edi
lea rbx, [rbx + 1]
cmp edi, dword [rsp + 0x40]
jb 0x1400037f0
lea rcx, [0x140080734]
call fcn.1400017b0
mov edi, r15d
cmp dword [rsp + 0x40], r15d
jbe 0x14000384b
lea rbx, [rbp - 0x50]
movzx ecx, byte [rbx]
call fcn.140004510
inc edi
lea rbx, [rbx + 1]
cmp edi, dword [rsp + 0x40]
jb 0x140003825
jmp 0x14000384b
test al, 4
je 0x14000384b
lea rcx, str.TX_EMPTY_r_n
call fcn.140001750
mov edx, r14d
lea rcx, str._r_n_d_r_nWaitCommEvent__r_n
call fcn.140001750
xor r8d, r8d
mov dword [rsp + 0x40], r15d
lea rdx, [rsp + 0x44]
mov rcx, rsi
inc r14d
call qword [sym.imp.KERNEL32.dll_WaitCommEvent]
mov ecx, 0x6e
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str.WaitCommEvent___r_n
call fcn.140001750
test ebx, ebx
jne 0x140003748
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400038af
lea rcx, str.I_O_is_pending..._n
call fcn.140001750
jmp 0x1400038c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Wait_failed_with_error__d._n
call fcn.140001750
lea rcx, [0x140080744]
call fcn.1400017b0
lea rcx, str.Close_com_handle_n_n
call fcn.1400017b0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, qword [rsp + 0x8e8]
mov rdi, qword [rsp + 0x8e0]
xor eax, eax
mov rcx, qword [rbp + 0x7b0]
xor rcx, rsp
call fcn.14000a530
mov rbx, qword [rsp + 0x8f0]
add rsp, 0x8c0
pop r15
pop rsi
pop rbp
ret