Function at 0x14000f6d0
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov dil, r9b
mov r15, rcx
mov r12, r8
lea eax, [rdi + 5]
mov bl, dl
lea rcx, [rsp + 0x51]
mov byte [rsp + 0x32], al
xor eax, eax
xor edx, edx
mov r8d, 0xff
xor esi, esi
mov word [rsp + 0x30], 0x103
mov qword [rsp + 0x33], rax
mov qword [rsp + 0x3b], rax
mov dword [rsp + 0x43], eax
mov byte [rsp + 0x47], al
mov byte [rsp + 0x50], al
call fcn.1400c6610
cmp dil, 0x12
jae 0x14000f924
movzx r14d, dil
lea rcx, [rsp + 0x34]
mov rdx, r12
mov r8d, r14d
mov byte [rsp + 0x33], bl
call fcn.1400c3ee0
movzx r8d, dil
xor dl, dl
add r8d, 3
xor cl, cl
test r8d, r8d
jle 0x14000f777
movzx eax, cl
inc cl
xor dl, byte [rsp + rax + 0x31]
movzx eax, cl
cmp eax, r8d
jl 0x14000f766
mov byte [rsp + r14 + 0x34], dl
mov rcx, r15
mov edx, reloc.WLDAP32.dll_Ordinal_12
mov byte [rsp + r14 + 0x35], 4
call qword [sym.imp.KERNEL32.dll_PurgeComm]
mov edi, 0x64
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
and qword [rsp + 0x20], rsi
lea r9, [rbp + 0x98]
lea r8d, [rdi - 0x4c]
lea rdx, [rsp + 0x30]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000f910
cmp dword [rbp + 0x98], 0x18
jne 0x14000f910
xor r8d, r8d
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ClearCommError]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
and qword [rsp + 0x20], rsi
lea r9, [rbp + 0x98]
lea rdx, [rsp + 0x50]
mov r8d, 0x100
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000f901
mov edx, dword [rbp + 0x98]
cmp edx, 6
jb 0x14000f8f8
mov al, 5
cmp byte [rsp + 0x50], al
jne 0x14000f8ea
cmp byte [rsp + 0x51], 1
jne 0x14000f8ea
mov cl, byte [rsp + 0x52]
cmp cl, al
jb 0x14000f8e1
or bl, 0x80
cmp byte [rsp + 0x53], bl
jne 0x14000f8e1
sub cl, al
xor r8b, r8b
xor dl, dl
movzx r9d, cl
add r9d, 3
test r9d, r9d
jle 0x14000f873
movzx eax, dl
inc dl
xor r8b, byte [rsp + rax + 0x51]
movzx eax, dl
cmp eax, r9d
jl 0x14000f861
movzx ebx, cl
cmp byte [rsp + rbx + 0x54], r8b
jne 0x14000f8d8
cmp byte [rsp + rbx + 0x55], 4
jne 0x14000f8d8
mov esi, 1
test cl, cl
je 0x14000f924
mov rdi, qword [rbp + 0xa0]
test rdi, rdi
je 0x14000f924
mov rax, qword [rbp + 0xa8]
test rax, rax
je 0x14000f924
mov byte [rax], cl
lea ecx, [rsi + 0x3f]
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rdi], rax
test rax, rax
je 0x14000f8d4
lea rdx, [rsp + 0x54]
mov r8d, ebx
mov rcx, rax
call fcn.1400c3ee0
jmp 0x14000f924
xor esi, esi
jmp 0x14000f924
lea rcx, str.ERROR_sr98_send_receive___Bad_CRC_data_n
jmp 0x14000f8f1
lea rcx, str.ERROR_sr98_send_receive___Bad_data_size_ctl_code_n
jmp 0x14000f8f1
lea rcx, str.ERROR_sr98_send_receive___Bad_header_n
call fcn.14000bce4
jmp 0x14000f924
lea rcx, str.ERROR_sr98_send_receive___Read_size___u_n
jmp 0x14000f91f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_sr98_send_receive___ReadFile__0x_08x__n
jmp 0x14000f91d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_sr98_send_receive___WriteFile__0x_08x__n
mov edx, eax
call fcn.14000bce4
lea r11, [rsp + 0x150]
mov eax, esi
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret