Function at 0x1400112a3
Capabilities:
Check if file exists
Manipulate console buffer
Write file on windows

Disassembly:
jmp 0x140011a60
push rbp
push rsi
push rdi
sub rsp, 0x3f0
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x8c
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [section..data]
xor rax, rbp
mov qword [rbp + 0x3a8], rax
lea rcx, [0x1400240a2]
call fcn.1400113b1
mov byte [rbp + 4], 0
lea rax, [rbp + 0x88]
mov rdi, rax
xor eax, eax
mov ecx, 0x1c
rep stosb byte [rdi], al
lea rax, [rbp + 0xc8]
mov rdi, rax
xor eax, eax
mov ecx, 0x14
rep stosb byte [rdi], al
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
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 [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0xffffffffffffffff
jne 0x140011b27
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x140011b1b
lea rcx, str.ERROR___COM2_PORT_NOT_FOUND_n
call fcn.1400111b3
lea rcx, str.ERROR___FAIIED_TO_ACCESS_TO_COM2_SUCCESSFULLY_n
call fcn.1400111b3
mov dword [rbp + 0x88], 0x1c
lea rdx, [rbp + 0x88]
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
jne 0x140011b52
lea rcx, str.ERROR___FAIIED_TO_GET_SERIAL_PARAMETERS_n
call fcn.1400111b3
mov dword [rbp + 0x8c], 0xe100
mov byte [rbp + 0x9a], 8
mov byte [rbp + 0x9b], 0
mov byte [rbp + 0x9c], 0
lea rdx, [rbp + 0x88]
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
jne 0x140011b92
lea rcx, str.ERROR__Setting_serial_port_state
call fcn.1400111b3
mov dword [rbp + 0xc8], 0x32
mov dword [rbp + 0xd0], 0x32
mov dword [rbp + 0xcc], 0xa
mov dword [rbp + 0xd8], 0x32
mov dword [rbp + 0xd4], 0xa
lea rax, [rbp + 0x158]
lea rcx, str.DoubleClick___n_r
mov rdi, rax
mov rsi, rcx
mov ecx, 0xf
rep movsb byte [rdi], byte [rsi]
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbp + 0x188], rax
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbp + 0x1a8], rax
mov dword [rbp + 0x214], 0x80
mov edx, dword [rbp + 0x214]
mov rcx, qword [rbp + 0x188]
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
jne 0x140011c30
lea rcx, str.ERROR_at_SetConsoleMode_n
call fcn.1400111b3
mov dword [rbp + 0x214], 0x18
mov edx, dword [rbp + 0x214]
mov rcx, qword [rbp + 0x188]
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
jne 0x140011c5d
lea rcx, str.ERROR_at_SetConsoleMode_n
call fcn.1400111b3
lea rdx, [rbp + 0xc8]
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_SetCommTimeouts]
test eax, eax
jne 0x140011c8d
lea rcx, str.ERROR___Time_Out_n
call fcn.1400111b3
mov eax, 1
jmp 0x140011d85
xor eax, eax
cmp eax, 1
je 0x140011d79
lea r9, [rbp + 0x1f4]
mov r8d, 1
lea rdx, [rbp + 0x1c8]
mov rcx, qword [rbp + 0x188]
call qword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
lea rcx, [rbp + 0xf8]
call qword [sym.imp.USER32.dll_GetCursorPos]
mov r9d, dword [rbp + 0xfc]
mov r8d, dword [rbp + 0xf8]
lea rdx, str.Xpos___d__Ypos___d_n_r
lea rcx, [rbp + 0x118]
call fcn.14001137f
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x44]
mov r8d, 0x19
lea rdx, [rbp + 0x118]
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_WriteFile]
movzx eax, word [rbp + 0x1c8]
cmp eax, 2
jne 0x140011d74
mov eax, dword [rbp + 0x1d0]
and eax, 1
test eax, eax
je 0x140011d74
mov eax, dword [rbp + 0x1d8]
and eax, 2
test eax, eax
je 0x140011d74
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x44]
mov r8d, 0xf
lea rdx, [rbp + 0x158]
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [rbp + 0x1cc]
mov rcx, qword [rbp + 0x1a8]
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
lea rcx, [0x14001b0cc]
call fcn.1400111b3
jmp 0x140011c8d
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x14001af00]
call fcn.140011348
mov rax, rdi
mov rcx, qword [rbp + 0x3a8]
xor rcx, rbp
call fcn.1400111cc
lea rsp, [rbp + 0x3b0]
pop rdi
pop rsi
pop rbp
ret