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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x150
mov dil, r9b
mov r13, rcx
mov rbp, 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 byte [rsp + 0x30], 3
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
mov byte [rsp + 0x31], 1
call sub.msvcrt.dll_memset
cmp dil, 0x12
jae 0x14000fe8c
movzx r12d, dil
lea rcx, [rsp + 0x34]
mov rdx, rbp
mov r8, r12
mov byte [rsp + 0x33], bl
call sub.msvcrt.dll_memcpy
movzx ecx, dil
xor r11b, r11b
add ecx, 3
xor dl, dl
test ecx, ecx
jle 0x14000fcd8
movzx eax, r11b
inc r11b
xor dl, byte [rsp + rax + 0x31]
movzx eax, r11b
cmp eax, ecx
jl 0x14000fcc5
mov byte [rsp + r12 + 0x34], dl
mov rcx, r13
mov edx, reloc.WLDAP32.dll_Ordinal_12
mov byte [rsp + r12 + 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, [rsp + 0x188]
lea r8d, [rdi - 0x4c]
lea rdx, [rsp + 0x30]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14000fe78
cmp dword [rsp + 0x188], 0x18
jne 0x14000fe78
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ClearCommError]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
and qword [rsp + 0x20], rsi
lea r9, [rsp + 0x188]
lea rdx, [rsp + 0x50]
mov r8d, 0x100
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000fe69
mov edx, dword [rsp + 0x188]
cmp edx, 6
jb 0x14000fe60
mov al, 5
cmp byte [rsp + 0x50], al
jne 0x14000fe52
cmp byte [rsp + 0x51], 1
jne 0x14000fe52
mov cl, byte [rsp + 0x52]
cmp cl, al
jb 0x14000fe49
or bl, 0x80
cmp byte [rsp + 0x53], bl
jne 0x14000fe49
sub cl, al
xor dl, dl
xor r9b, r9b
movzx r8d, cl
add r8d, 3
test r8d, r8d
jle 0x14000fdd8
movzx eax, dl
inc dl
xor r9b, byte [rsp + rax + 0x51]
movzx eax, dl
cmp eax, r8d
jl 0x14000fdc6
movzx ebx, cl
cmp byte [rsp + rbx + 0x54], r9b
jne 0x14000fe40
cmp byte [rsp + rbx + 0x55], 4
jne 0x14000fe40
mov esi, 1
test cl, cl
je 0x14000fe8c
mov rdi, qword [rsp + 0x190]
test rdi, rdi
je 0x14000fe8c
mov rax, qword [rsp + 0x198]
test rax, rax
je 0x14000fe8c
mov byte [rax], cl
lea ecx, [rsi + 0x3f]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rdi], rax
test rax, rax
je 0x14000fe3c
lea rdx, [rsp + 0x54]
mov r8, rbx
mov rcx, rax
call sub.msvcrt.dll_memcpy
jmp 0x14000fe8c
xor esi, esi
jmp 0x14000fe8c
lea rcx, str.ERROR_sr98_send_receive___Bad_CRC_data_n
jmp 0x14000fe59
lea rcx, str.ERROR_sr98_send_receive___Bad_data_size_ctl_code_n
jmp 0x14000fe59
lea rcx, str.ERROR_sr98_send_receive___Bad_header_n
call fcn.14000c020
jmp 0x14000fe8c
lea rcx, str.ERROR_sr98_send_receive___Read_size___u_n
jmp 0x14000fe87
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_sr98_send_receive___ReadFile__0x_08x__n
jmp 0x14000fe85
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_sr98_send_receive___WriteFile__0x_08x__n
mov edx, eax
call fcn.14000c020
lea r11, [rsp + 0x150]
mov eax, esi
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret