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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x330
mov rbp, rcx
mov r14d, r8d
mov rcx, qword [rcx + 0x54860]
mov r12, rdx
xor edi, edi
xor esi, esi
mov rax, qword [rcx]
call qword [rax + 0x20]
add r14d, 3
mov r15, rax
and r14d, 0xfffffffc
movsxd r13, r14d
jle 0x1401304aa
xor ebx, ebx
nop dword [rax + rax]
mov rcx, qword [rbp + 0x54860]
mov rdx, qword [rcx]
call qword [rdx + 0x30]
movzx ecx, al
movzx eax, cl
and al, 0xf
mov byte [rsp + rbx + 0x30], al
cmp al, 0xc
ja 0x14013059a
shr ecx, 4
mov byte [rsp + rbx + 0x31], cl
cmp cl, 0xc
ja 0x14013059a
add rbx, 2
cmp rbx, r13
jl 0x140130470
and r14b, 7
cmp r14b, 4
jne 0x1401304df
mov rcx, qword [rbp + 0x54860]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov rcx, qword [rbp + 0x54860]
shl eax, 8
movsxd rdi, eax
mov rax, qword [rcx]
call qword [rax + 0x30]
movsxd rcx, eax
mov esi, 0x10
add rdi, rcx
test r13, r13
jle 0x140130577
xor r15d, r15d
nop dword [rax + rax]
movzx r14d, byte [rsp + r15 + 0x30]
cmp esi, r14d
jge 0x140130528
xor ebx, ebx
nop dword [rax]
mov rcx, qword [rbp + 0x54860]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov ecx, ebx
movsxd rdx, eax
xor ecx, 8
add ebx, 8
add ecx, esi
shl rdx, cl
add rdi, rdx
cmp ebx, 0x20
jl 0x140130500
add esi, 0x20
mov ecx, 0x10
mov r8d, 0xffff
sub ecx, r14d
sub esi, r14d
sar r8d, cl
mov ecx, r14d
and r8d, edi
sar rdi, cl
lea ecx, [r14 - 1]
movzx eax, cl
bt r8d, eax
jb 0x140130566
mov ecx, r14d
mov edx, 1
shl edx, cl
mov eax, 1
sub eax, edx
add r8d, eax
mov word [r12 + r15*2], r8w
inc r15
cmp r15, r13
jl 0x1401304f0
xor eax, eax
lea r11, [rsp + 0x330]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov rcx, qword [rbp + 0x54860]
xor r8d, r8d
movsxd rdx, r15d
mov rax, qword [rcx]
call qword [rax + 0x18]
dec r13
lea rdi, [r12 + 4]
shr r13, 3
mov esi, 0x1234
inc r13
mov r14d, 0x4949
mov r12d, 0xffffff00
mov r15d, 0xfff
mov rcx, qword [rbp + 0x54860]
lea rdx, [rsp + 0x20]
mov r9d, 6
mov rax, qword [rcx]
lea r8d, [r9 - 4]
call qword [rax + 0x10]
cmp eax, 6
jae 0x1401305fc
mov rcx, rbp
call fcn.1400fa580
mov ecx, esi
call qword [sym.imp.WS2_32.dll_ntohs]
xor ecx, ecx
cmp ax, si
sete cl
xor eax, eax
cmp word [rbp + 0x548d8], r14w
sete al
cmp eax, ecx
jne 0x140130632
mov r8d, ntohs
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x20]
call fcn.14030b41c
movzx r10d, word [rsp + 0x20]
movzx r11d, word [rsp + 0x24]
movzx ecx, r10w
movzx ebx, word [rsp + 0x28]
movzx eax, r11w
movzx edx, word [rsp + 0x22]
and r10w, r15w
movzx r8d, word [rsp + 0x26]
and r11w, r15w
movzx r9d, word [rsp + 0x2a]
shr cx, 4
shr ax, 8
and cx, r12w
and ax, 0xfff0
or cx, ax
movzx eax, bx
shr ax, 0xc
and bx, r15w
or cx, ax
movzx eax, r8w
mov word [rdi - 4], cx
and r8w, r15w
shr ax, 8
movzx ecx, dx
shr cx, 4
and ax, 0xfff0
and cx, r12w
and dx, r15w
or cx, ax
movzx eax, r9w
shr ax, 0xc
and r9w, r15w
or cx, ax
mov word [rdi - 2], cx
mov word [rdi], r10w
mov word [rdi + 2], dx
mov word [rdi + 4], r11w
mov word [rdi + 6], r8w
mov word [rdi + 8], bx
mov word [rdi + 0xa], r9w
add rdi, 0x10
sub r13, 1
jne 0x1401305d3
lea eax, [r13 + 1]
jmp 0x140130579