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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r14
sub rsp, 0x20
movsxd r10, dword [rcx + 0x2e0]
mov rax, rcx
mov esi, dword [rsp + 0x60]
mov rbx, rdx
mov edx, dword [rcx + 0xb90]
mov r14d, r9d
shl r10, 4
and edx, esi
add r10, 0x35ce
mov ecx, edx
add r10, rcx
mov rcx, qword [rax + 0x18]
lea r10, [rax + r10*2]
cmp r8d, 0xffffffff
jne 0x140049d2e
mov qword [rsp + 0x40], rdi
xor ebp, ebp
mov dword [rax + rcx*4 + 0x28], ebp
mov rcx, qword [rax + 0x18]
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r15
mov qword [rax + rcx*8 + 0x110], r10
mov r10d, 8
mov r11, qword [rax + 0x18]
mov edx, dword [rax + 0xb98]
inc r11
mov qword [rax + 0x18], r11
and edx, esi
mov r12, qword [rbx]
mov edi, dword [rbx + 0x18]
mov ecx, edi
sub ecx, dword [rbx + 0x1c]
movzx r15d, byte [rcx + r12]
dec ecx
movzx r8d, byte [rcx + r12]
mov ecx, r10d
sub cl, byte [rax + 0xb94]
shr r8d, cl
mov ecx, dword [rax + 0xb94]
shl edx, cl
add r8d, edx
lea rsi, [r8 + r8*2]
shl rsi, 9
add rsi, 0xb9c
add rsi, rax
cmp dword [rax + 0x2e0], 7
jge 0x140049c7c
lea r9d, [rbp + 1]
nop dword [rax]
nop word [rax + rax]
dec r10d
mov r8d, r15d
movzx ecx, r10b
shr r8d, cl
mov ecx, r9d
and r8d, 1
mov dword [rax + r11*4 + 0x28], r8d
lea rdx, [rsi + rcx*2]
mov rcx, qword [rax + 0x18]
lea r9d, [r8 + r9*2]
mov qword [rax + rcx*8 + 0x110], rdx
inc qword [rax + 0x18]
mov r11, qword [rax + 0x18]
test r10d, r10d
jne 0x140049c40
jmp 0x140049cf1
sub edi, dword [rax + 0x2e4]
lea r8d, [r15 + 0x100]
sub edi, dword [rbx + 0x1c]
mov r10d, 0x100
dec edi
movzx r9d, byte [rdi + r12]
nop dword [rax]
mov ecx, r8d
add r9d, r9d
shr ecx, 7
mov edx, r8d
and ecx, 1
shr edx, 8
mov dword [rax + r11*4 + 0x28], ecx
add r8d, r8d
mov ecx, r10d
and ecx, r9d
add ecx, r10d
add edx, ecx
mov rcx, qword [rax + 0x18]
lea rdx, [rsi + rdx*2]
mov qword [rax + rcx*8 + 0x110], rdx
mov ecx, r9d
inc qword [rax + 0x18]
xor ecx, r8d
mov r11, qword [rax + 0x18]
not ecx
and r10d, ecx
cmp r8d, 0x10000
jb 0x140049ca0
mov ecx, dword [rax + 0x2e0]
mov r15, qword [rsp + 0x50]
mov r12, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x40]
cmp ecx, 3
jle 0x140049d16
lea ebp, [rcx - 3]
cmp ecx, 9
jle 0x140049d16
lea ebp, [rcx - 6]
mov dword [rax + 0x2e0], ebp
sub dword [rbx + 0x1c], r14d
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret
mov r9d, 1
mov dword [rax + rcx*4 + 0x28], r9d
mov rcx, qword [rax + 0x18]
mov qword [rax + rcx*8 + 0x110], r10
mov rcx, qword [rax + 0x18]
inc rcx
mov qword [rax + 0x18], rcx
movsxd r11, dword [rax + 0x2e0]
add r11, 0x368e
lea r10, [rax + rcx*4]
lea r11, [rax + r11*2]
cmp r8d, 4
jae 0x140049d9d
mov dword [r10 + 0x28], r9d
mov r9d, r14d
mov rcx, qword [rax + 0x18]
mov qword [rax + rcx*8 + 0x110], r11
mov rcx, rax
inc qword [rax + 0x18]
call fcn.140049990
sub dword [rbx + 0x1c], r14d
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret
xor ebp, ebp
add r8d, 0xfffffffc
mov dword [r10 + 0x28], ebp
mov r9d, r14d
mov rcx, qword [rax + 0x18]
mov qword [rax + rcx*8 + 0x110], r11
mov rcx, rax
inc qword [rax + 0x18]
call fcn.1400496a0
sub dword [rbx + 0x1c], r14d
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop rsi
pop rbp
ret