Function at 0x140032700
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub rsp, 0x38
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rdi
mov qword [rcx + 0x28], rax
mov rax, qword [rsp + 0x68]
xor edi, edi
cmp byte [rsp + 0x78], dil
mov qword [rcx + 0x30], rax
mov eax, dword [rsp + 0x60]
mov dword [rcx + 0x1c], eax
mov rbx, rcx
mov qword [rcx + 8], r9
mov word [rcx + 0x18], 0
mov qword [rcx + 0x20], rdx
mov dword [rcx + 0x3c], r8d
mov dword [rcx + 0x40], edi
jne 0x14003275a
lea rcx, [rdx + 0x8000]
mov r8d, 0x8000
call fcn.14004c480
mov rcx, rbx
mov word [rbx + 0x44], di
mov dword [rbx + 0x48], edi
call fcn.140031cc0
mov rdx, qword [rbx + 0x20]
mov word [rbx + 0x54], 0x8000
add rdx, 0x8000
mov dword [rbx + 0x4c], 0x8000
mov dword [rbx + 0x38], edi
mov r8d, 2
nop
nop
movzx eax, byte [rdx]
mov ecx, dword [rbx + 0x38]
inc rdx
shl ecx, 5
xor ecx, eax
and ecx, 0x7fff
dec r8
mov dword [rbx + 0x38], ecx
jne 0x140032790
cmp byte [rsp + 0x78], dil
je 0x140032819
mov rcx, rdi
mov r8d, 0x8000
nop
mov rdx, qword [rbx + 0x28]
movzx eax, word [rcx + rdx]
cmp ax, 0x8000
jb 0x1400327d8
movzx eax, ax
sub eax, 0x8000
jmp 0x1400327da
mov eax, edi
mov word [rcx + rdx], ax
add rcx, 2
dec r8
jne 0x1400327c0
mov rcx, rdi
mov r8d, 0x8000
mov rdx, qword [rbx + 0x30]
movzx eax, word [rcx + rdx]
cmp ax, 0x8000
jb 0x140032808
movzx eax, ax
sub eax, 0x8000
jmp 0x14003280a
mov eax, edi
mov word [rcx + rdx], ax
add rcx, 2
dec r8
jne 0x1400327f0
jmp 0x140032834
mov ecx, 0x8000
nop
mov rax, qword [rbx + 0x28]
add rdi, 2
dec rcx
mov word [rdi + rax - 2], 0
jne 0x140032820
mov ecx, dword [rbx + 0x48]
mov rdi, qword [rsp + 0x28]
mov r10d, FDICreate
cmp ecx, 8
jle 0x1400328eb
mov edx, dword [rbx + 0x1c]
mov r8d, 0x43
mov eax, r8d
shl ax, cl
movzx ecx, word [rbx + 0x18]
or word [rbx + 0x44], ax
lea eax, [rdx - 2]
cmp ecx, eax
jae 0x140032890
movzx eax, byte [rbx + 0x44]
mov rdx, rcx
mov rcx, qword [rbx + 8]
mov byte [rdx + rcx], al
inc word [rbx + 0x18]
movzx edx, word [rbx + 0x18]
mov rcx, qword [rbx + 8]
movzx eax, byte [rbx + 0x45]
mov byte [rdx + rcx], al
inc word [rbx + 0x18]
jmp 0x1400328d3
cmp ecx, edx
jb 0x14003289d
mov dword [rbx + 0x40], 1
jmp 0x1400328af
movzx eax, byte [rbx + 0x44]
mov rdx, rcx
mov rcx, qword [rbx + 8]
mov byte [rdx + rcx], al
inc word [rbx + 0x18]
movzx eax, word [rbx + 0x18]
cmp eax, dword [rbx + 0x1c]
jb 0x1400328c1
mov dword [rbx + 0x40], 1
jmp 0x1400328d3
mov rcx, qword [rbx + 8]
mov rdx, rax
movzx eax, byte [rbx + 0x45]
mov byte [rdx + rcx], al
inc word [rbx + 0x18]
mov edx, dword [rbx + 0x48]
mov ecx, r10d
sub ecx, edx
lea eax, [rdx - 8]
sar r8d, cl
mov dword [rbx + 0x48], eax
mov word [rbx + 0x44], r8w
jmp 0x140032900
mov r8d, 0x43
lea eax, [rcx + 8]
shl r8w, cl
mov dword [rbx + 0x48], eax
or word [rbx + 0x44], r8w
mov ecx, dword [rbx + 0x48]
cmp ecx, 8
jle 0x1400329af
mov edx, dword [rbx + 0x1c]
mov r9d, 0x4b
mov eax, r9d
shl ax, cl
movzx ecx, word [rbx + 0x18]
or word [rbx + 0x44], ax
lea eax, [rdx - 2]
cmp ecx, eax
jae 0x140032951
movzx eax, byte [rbx + 0x44]
mov rdx, rcx
mov rcx, qword [rbx + 8]
mov byte [rdx + rcx], al
inc word [rbx + 0x18]
movzx edx, word [rbx + 0x18]
mov rcx, qword [rbx + 8]
movzx eax, byte [rbx + 0x45]
mov byte [rdx + rcx], al
inc word [rbx + 0x18]
jmp 0x140032995
cmp ecx, edx
jb 0x14003295e
mov dword [rbx + 0x40], 1
jmp 0x140032970
movzx eax, byte [rbx + 0x44]
mov rdx, rcx
mov rcx, qword [rbx + 8]
mov byte [rdx + rcx], al
inc word [rbx + 0x18]
movzx eax, word [rbx + 0x18]
cmp eax, dword [rbx + 0x1c]
jb 0x140032982
mov dword [rbx + 0x40], 1
jmp 0x140032995
mov rdx, qword [rbx + 8]
mov r8, rax
movzx eax, byte [rbx + 0x45]
mov byte [r8 + rdx], al
inc word [rbx + 0x18]
mov eax, dword [rbx + 0x48]
sub r10d, eax
movzx ecx, r10b
sar r9d, cl
add eax, 0xfffffff8
mov dword [rbx + 0x48], eax
mov word [rbx + 0x44], r9w
jmp 0x1400329c4
mov r9d, 0x4b
lea eax, [rcx + 8]
shl r9w, cl
mov dword [rbx + 0x48], eax
or word [rbx + 0x44], r9w
mov rcx, rbx
call fcn.1400322f0
add ax, 2
cmp byte [rsp + 0x78], 0
movzx ecx, ax
mov rax, qword [rsp + 0x80]
mov dword [rax], ecx
je 0x1400329fa
mov rcx, qword [rbx + 0x20]
mov r8d, 0x8000
lea rdx, [rcx + 0x8000]
call fcn.14004c480
mov eax, dword [rbx + 0x40]
mov rbx, qword [rsp + 0x30]
neg eax
sbb eax, eax
and eax, 3
add rsp, 0x38
ret