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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x68]
sub rsp, 0x150
movzx edi, r9b
mov r15, r8
mov bl, dl
mov word [rsp + 0x30], 0x103
mov r14, rcx
xorps xmm0, xmm0
xor edx, edx
lea rcx, [rsp + 0x50]
lea eax, [rdi + 5]
mov r8d, 0x100
mov byte [rsp + 0x32], al
xor esi, esi
xor eax, eax
mov dword [rsp + 0x43], eax
mov byte [rsp + 0x47], al
movups xmmword [rsp + 0x33], xmm0
call fcn.1800c5560
cmp dil, 0x12
jae 0x18000f8c0
mov r8d, edi
mov byte [rsp + 0x33], bl
mov rdx, r15
lea rcx, [rsp + 0x34]
call fcn.1800c59c0
xor dl, dl
lea r8d, [rdi + 3]
xor cl, cl
test r8d, r8d
je 0x18000f713
movzx eax, cl
inc cl
xor dl, byte [rsp + rax + 0x31]
movzx eax, cl
cmp eax, r8d
jb 0x18000f702
mov byte [rsp + rdi + 0x34], dl
mov rcx, r14
mov edx, reloc.WLDAP32.dll_Ordinal_12
mov byte [rsp + rdi + 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 + 0x88]
lea r8d, [rdi - 0x4c]
mov rcx, r14
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18000f8ac
cmp dword [rbp + 0x88], 0x18
jne 0x18000f8ac
xor r8d, r8d
xor edx, edx
mov rcx, r14
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 + 0x88]
mov r8d, 0x100
lea rdx, [rsp + 0x50]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18000f89d
mov edx, dword [rbp + 0x88]
cmp edx, 6
jb 0x18000f894
cmp byte [rsp + 0x50], 5
jne 0x18000f886
cmp byte [rsp + 0x51], 1
jne 0x18000f886
mov cl, byte [rsp + 0x52]
cmp cl, 5
jb 0x18000f87d
or bl, 0x80
cmp byte [rsp + 0x53], bl
jne 0x18000f87d
sub cl, 5
xor r8b, r8b
movzx r9d, cl
xor dl, dl
lea r10d, [r9 + 3]
test r10d, r10d
je 0x18000f80e
movzx eax, dl
inc dl
xor r8b, byte [rsp + rax + 0x51]
movzx eax, dl
cmp eax, r10d
jb 0x18000f7fc
cmp byte [rsp + r9 + 0x54], r8b
jne 0x18000f874
cmp byte [rsp + r9 + 0x55], 4
jne 0x18000f874
mov esi, 1
test cl, cl
je 0x18000f8c0
mov rbx, qword [rbp + 0x90]
test rbx, rbx
je 0x18000f8c0
mov rax, qword [rbp + 0x98]
test rax, rax
je 0x18000f8c0
movzx edi, cl
mov byte [rax], cl
mov edx, edi
lea ecx, [rsi + 0x3f]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbx], rax
test rax, rax
je 0x18000f870
mov r8d, edi
lea rdx, [rsp + 0x54]
mov rcx, rax
call fcn.1800c59c0
jmp 0x18000f8c0
xor esi, esi
jmp 0x18000f8c0
lea rcx, str.ERROR_sr98_send_receive___Bad_CRC_data_n
jmp 0x18000f88d
lea rcx, str.ERROR_sr98_send_receive___Bad_data_size_ctl_code_n
jmp 0x18000f88d
lea rcx, str.ERROR_sr98_send_receive___Bad_header_n
call fcn.18000bda8
jmp 0x18000f8c0
lea rcx, str.ERROR_sr98_send_receive___Read_size___u_n
jmp 0x18000f8bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_sr98_send_receive___ReadFile__0x_08x__n
jmp 0x18000f8b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_sr98_send_receive___WriteFile__0x_08x__n
mov edx, eax
call fcn.18000bda8
lea r11, [rsp + 0x150]
mov eax, esi
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret