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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x30
mov ebp, dword [rcx + 0xb78]
mov rbx, rcx
movsxd rax, dword [rcx + 0x2c8]
mov esi, r9d
mov r14d, dword [rsp + 0x70]
mov rdi, rdx
shl rax, 4
and ebp, r14d
add rax, 0x35c2
mov r9d, ebp
add rax, r9
mov r11d, r8d
lea rcx, [rcx + rax*2]
mov rax, qword [rbx + 0x20]
cmp r8d, 0xffffffff
jne 0x14012ac94
xor r10d, r10d
mov qword [rsp + 0x50], r15
mov dword [rbx + rax*4 + 0x30], r10d
mov r9d, 8
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rcx
mov ecx, r9d
inc qword [rbx + 0x20]
sub cl, byte [rbx + 0xb7c]
mov r11d, dword [rdx + 0x18]
mov eax, r11d
sub eax, dword [rdx + 0x1c]
mov r15, qword [rdx]
mov r8d, eax
dec eax
movzx edx, byte [rax + r15]
mov eax, dword [rbx + 0xb80]
movzx ebp, byte [r8 + r15]
and eax, r14d
shr edx, cl
lea r14, [rbx + 0xb84]
mov ecx, dword [rbx + 0xb7c]
shl eax, cl
add edx, eax
lea rcx, [rdx + rdx*2]
shl rcx, 9
add r14, rcx
cmp dword [rbx + 0x2c8], 7
jge 0x14012abf9
lea r8d, [r10 + 1]
mov rax, qword [rbx + 0x20]
dec r9d
movzx ecx, r9b
mov edx, ebp
shr edx, cl
and edx, 1
mov dword [rbx + rax*4 + 0x30], edx
mov eax, r8d
lea r8d, [rdx + r8*2]
lea rcx, [r14 + rax*2]
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rcx
inc qword [rbx + 0x20]
test r9d, r9d
jne 0x14012abc1
jmp 0x14012ac6b
sub r11d, dword [rbx + 0x2cc]
lea edx, [rbp + 0x100]
sub r11d, dword [rdi + 0x1c]
mov r9d, 0x100
dec r11d
movzx r8d, byte [r11 + r15]
nop dword [rax + rax]
mov rax, qword [rbx + 0x20]
mov ecx, edx
shr ecx, 7
add r8d, r8d
and ecx, 1
mov dword [rbx + rax*4 + 0x30], ecx
mov eax, r9d
and eax, r8d
mov ecx, edx
add eax, r9d
shr ecx, 8
add ecx, eax
add edx, edx
mov rax, qword [rbx + 0x20]
lea rcx, [r14 + rcx*2]
mov qword [rbx + rax*8 + 0x108], rcx
mov eax, r8d
inc qword [rbx + 0x20]
xor eax, edx
not eax
and r9d, eax
cmp edx, 0x10000
jb 0x14012ac20
mov eax, dword [rbx + 0x2c8]
mov r15, qword [rsp + 0x50]
cmp eax, 3
jle 0x14012ac88
lea r10d, [rax - 3]
cmp eax, 9
jle 0x14012ac88
lea r10d, [rax - 6]
mov dword [rbx + 0x2c8], r10d
jmp 0x14012aea7
mov r8d, 1
mov dword [rbx + rax*4 + 0x30], r8d
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rcx
inc qword [rbx + 0x20]
movsxd rdx, dword [rbx + 0x2c8]
mov rax, qword [rbx + 0x20]
add rdx, 0x3682
lea rdx, [rbx + rdx*2]
lea rcx, [rbx + rax*4]
cmp r11d, 4
jae 0x14012ae7f
mov dword [rcx + 0x30], r8d
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rdx
inc qword [rbx + 0x20]
mov rax, qword [rbx + 0x20]
lea rdx, [rbx + rax*4]
movsxd rax, dword [rbx + 0x2c8]
add rax, 0x368e
lea rcx, [rbx + rax*2]
test r11d, r11d
jne 0x14012ad59
xor r10d, r10d
mov dword [rdx + 0x30], r10d
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rcx
inc qword [rbx + 0x20]
movsxd rax, dword [rbx + 0x2c8]
mov rdx, qword [rbx + 0x20]
shl rax, 4
add rax, 0x36b2
add rax, r9
cmp esi, r8d
setne r10b
mov dword [rbx + rdx*4 + 0x30], r10d
lea rcx, [rbx + rax*2]
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rcx
inc qword [rbx + 0x20]
jmp 0x14012ae20
mov r9d, dword [rbx + r11*4 + 0x2cc]
mov dword [rdx + 0x30], r8d
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rcx
inc qword [rbx + 0x20]
movsxd rdx, dword [rbx + 0x2c8]
mov rax, qword [rbx + 0x20]
add rdx, 0x369a
lea rdx, [rbx + rdx*2]
lea rcx, [rbx + rax*4]
cmp r11d, r8d
jne 0x14012adad
xor r10d, r10d
mov dword [rcx + 0x30], r10d
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rdx
inc qword [rbx + 0x20]
jmp 0x14012ae0d
mov dword [rcx + 0x30], r8d
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rdx
lea eax, [r11 - 2]
inc qword [rbx + 0x20]
movsxd rdx, dword [rbx + 0x2c8]
mov rcx, qword [rbx + 0x20]
add rdx, 0x36a6
mov dword [rbx + rcx*4 + 0x30], eax
lea rdx, [rbx + rdx*2]
mov rax, qword [rbx + 0x20]
mov qword [rbx + rax*8 + 0x108], rdx
inc qword [rbx + 0x20]
cmp r11d, 3
jne 0x14012ae01
mov eax, dword [rbx + 0x2d4]
mov dword [rbx + 0x2d8], eax
mov eax, dword [rbx + 0x2d0]
mov dword [rbx + 0x2d4], eax
mov eax, dword [rbx + 0x2cc]
mov dword [rbx + 0x2d0], eax
mov dword [rbx + 0x2cc], r9d
cmp esi, r8d
jne 0x14012ae41
cmp dword [rbx + 0x2c8], 7
mov eax, reloc.WS2_32.dll_inet_addr
mov ecx, 9
cmovl eax, ecx
mov dword [rbx + 0x2c8], eax
jmp 0x14012aea7
movzx eax, byte [rbx + 0xb74]
lea rdx, [rbx + 0xba30]
mov r9d, esi
mov byte [rsp + 0x20], al
mov r8d, ebp
mov rcx, rbx
call fcn.14012aec0
cmp dword [rbx + 0x2c8], 7
mov eax, reloc.WS2_32.dll_inet_addr
mov r9d, 8
cmovl eax, r9d
mov dword [rbx + 0x2c8], eax
jmp 0x14012aea7
xor r10d, r10d
lea r8d, [r11 - 4]
mov dword [rcx + 0x30], r10d
mov r9d, esi
mov rax, qword [rbx + 0x20]
mov rcx, rbx
mov qword [rbx + rax*8 + 0x108], rdx
mov edx, ebp
inc qword [rbx + 0x20]
call fcn.14012c700
sub dword [rdi + 0x1c], esi
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret