Function at 0x4bdfe0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov rax, rsp
sub rsp, 0x148
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rdi, rcx
mov rcx, qword [rcx]
cmp word [rcx], 1
mov qword [rax - 0x10], r13
mov rbx, rdx
mov r13d, r8d
je 0x4be29b
mov esi, dword [rcx + 4]
add rsi, qword [rdi + 0x40]
movzx eax, byte [rsi]
cmp eax, r8d
jne 0x4be0bb
movzx ecx, word [rcx + 2]
mov eax, dword [rbx + 8]
movzx r8d, byte [rsi + 1]
xor edx, edx
div ecx
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x4be0aa
nop
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4be067
mov rax, qword [rbx]
shr rax, 0x20
je 0x4be095
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x4be070
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x4be050
mov rcx, rdi
mov qword [rdi + 0x10], rsi
call fcn.004bd7b0
jmp 0x4be6e9
mov dword [rdi + 0x20], 0
movzx r9d, byte [rsi + 1]
mov rdx, rcx
movzx ecx, word [rcx]
dec ecx
nop
movzx eax, byte [rsi + 6]
add rsi, 6
cmp eax, r8d
je 0x4be1ff
movzx eax, byte [rsi + 1]
add r9d, eax
add ecx, 0xffffffff
jne 0x4be0d0
mov rax, qword [rdi + 0x10]
movzx ecx, byte [rax]
movzx eax, byte [rcx + rdi + 0x3ac]
mov dword [rdi + 0x28], eax
xor eax, eax
mov qword [rsp + rax*8 + 0x30], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x38], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x40], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x48], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x50], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x58], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x60], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x68], 0xffffffffffffffff
add rax, 8
cmp rax, 0x20
jb 0x4be101
movzx eax, byte [rsi]
movzx ecx, word [rdx]
mov byte [rsp + rax + 0x30], 0
dec ecx
movzx eax, byte [rsi - 6]
sub rsi, 6
add ecx, 0xffffffff
mov byte [rsp + rax + 0x30], 0
jne 0x4be160
movzx ecx, word [rdx + 2]
mov eax, dword [rbx + 8]
xor edx, edx
div ecx
mov r8d, ecx
mov dword [rbx + 8], eax
sub r8d, r9d
imul eax, r9d
add qword [rbx], rax
mov eax, dword [rbx + 8]
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x4be4c2
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4be1b9
mov rax, qword [rbx]
shr rax, 0x20
je 0x4be1e5
movzx ecx, byte [rbx + 0xc]
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x4be1c0
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x4be1a2
jmp 0x4be4c2
movzx ecx, word [rdx + 2]
mov eax, dword [rbx + 8]
movzx r8d, byte [rsi + 1]
xor edx, edx
div ecx
mov dword [rbx + 8], eax
imul eax, r9d
add qword [rbx], rax
mov eax, dword [rbx + 8]
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x4be28a
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4be247
mov rax, qword [rbx]
shr rax, 0x20
je 0x4be275
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x4be250
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x4be230
mov rcx, rdi
mov qword [rdi + 0x10], rsi
call fcn.004bd700
jmp 0x4be6e9
mov r10, qword [rdi]
mov rax, qword [rdi + 0x10]
movzx ecx, byte [rax]
mov rax, qword [rdi + 0x40]
lea rbp, [r10 + 2]
movzx r9d, byte [rcx + rdi + 0x3ac]
mov dword [rdi + 0x28], r9d
mov ecx, dword [r10 + 8]
movzx ecx, word [rcx + rax]
movzx eax, byte [rbp]
movzx edx, byte [rcx + rdi + 0x2ab]
movzx ecx, byte [rax + rdi + 0x3ac]
mov eax, dword [rdi + 0x2c]
sar eax, 0x1a
lea esi, [rdx + rcx*2]
and eax, 0x20
add esi, eax
movzx eax, byte [r10 + 3]
add esi, dword [rdi + 0x20]
shl rax, 6
add esi, r9d
add rsi, rax
movzx eax, byte [rbp]
cmp eax, r8d
jne 0x4be3a8
mov ecx, dword [rbx + 8]
movzx eax, word [rdi + rsi*2 + 0xa70]
shr ecx, 0xe
imul ecx, eax
cmp ecx, 0x1000000
mov dword [rbx + 8], ecx
jae 0x4be37a
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4be337
mov rax, qword [rbx]
shr rax, 0x20
je 0x4be365
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x4be340
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x4be320
movzx ecx, word [rdi + rsi*2 + 0xa70]
lea eax, [rcx + 0x20]
sar eax, 7
sub cx, ax
sub cx, 0xff80
mov word [rdi + rsi*2 + 0xa70], cx
mov rcx, rdi
mov qword [rdi + 0x10], rbp
call fcn.004bd840
jmp 0x4be6e9
movzx eax, word [rdi + rsi*2 + 0xa70]
mov ecx, dword [rbx + 8]
shr ecx, 0xe
imul ecx, eax
sub dword [rbx + 8], ecx
mov eax, ecx
add qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jae 0x4be42a
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4be3e7
mov rax, qword [rbx]
shr rax, 0x20
je 0x4be415
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x4be3f0
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x4be3d0
movzx ecx, word [rdi + rsi*2 + 0xa70]
lea eax, [rcx + 0x20]
sar eax, 7
sub cx, ax
movzx eax, cx
lea rcx, [0x004d9ce0]
mov word [rdi + rsi*2 + 0xa70], ax
shr rax, 0xa
movzx eax, byte [rax + rcx]
mov dword [rdi + 0x1c], eax
xor eax, eax
nop
nop
mov qword [rsp + rax*8 + 0x30], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x38], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x40], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x48], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x50], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x58], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x60], 0xffffffffffffffff
mov qword [rsp + rax*8 + 0x68], 0xffffffffffffffff
add rax, 8
cmp rax, 0x20
jb 0x4be460
movzx eax, byte [rbp]
mov dword [rdi + 0x20], 0
mov byte [rsp + rax + 0x30], 0
mov qword [rsp + 0x140], r12
nop
nop
mov rax, qword [rdi]
movzx edx, word [rax]
nop
nop
nop
inc dword [rdi + 0x18]
mov rax, qword [rdi]
mov ecx, dword [rax + 8]
test ecx, ecx
je 0x4be6e1
mov r8, rcx
add r8, qword [rdi + 0x40]
mov qword [rdi], r8
movzx eax, word [r8]
cmp eax, edx
je 0x4be4e0
lea r8, [rsp + 0x20]
mov rcx, rdi
call fcn.004bd620
mov rcx, qword [rdi]
mov r8d, dword [rcx + 4]
movzx r9d, word [rcx]
mov r12, rax
add r8, qword [rdi + 0x40]
xor esi, esi
nop
nop
nop
movzx ecx, byte [r8]
cmp ecx, r13d
je 0x4be5fd
mov rdx, rcx
movzx ecx, byte [r8 + 1]
add r8, 6
movsx eax, byte [rsp + rdx + 0x30]
mov byte [rsp + rdx + 0x30], 0
and ecx, eax
add esi, ecx
add r9d, 0xffffffff
jne 0x4be530
mov eax, dword [rbx + 8]
mov r8d, dword [rsp + 0x20]
xor edx, edx
lea ecx, [rsi + r8]
div ecx
mov dword [rbx + 8], eax
imul eax, esi
add qword [rbx], rax
mov eax, dword [rbx + 8]
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x4be5ef
nop
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4be5a7
mov rax, qword [rbx]
shr rax, 0x20
je 0x4be5d5
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x4be5b0
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x4be590
mov r8d, dword [rsp + 0x20]
add r8w, si
add word [r12], r8w
jmp 0x4be4d0
mov r10d, esi
mov rbp, r8
movzx eax, byte [r8]
add r8, 6
movsx ecx, byte [rsp + rax + 0x30]
movzx eax, byte [r8 - 5]
and ecx, eax
add esi, ecx
add r9d, 0xffffffff
jne 0x4be603
mov eax, dword [rsp + 0x20]
movzx r8d, byte [rbp + 1]
xor edx, edx
lea ecx, [rsi + rax]
mov eax, dword [rbx + 8]
div ecx
mov dword [rbx + 8], eax
imul eax, r10d
add qword [rbx], rax
mov eax, dword [rbx + 8]
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x4be6aa
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4be667
mov rax, qword [rbx]
shr rax, 0x20
je 0x4be695
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x4be670
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x4be650
movzx ecx, byte [r12 + 2]
cmp cl, 7
jae 0x4be6d5
add byte [r12 + 3], 0xff
jne 0x4be6d5
shl word [r12], 1
mov eax, 3
shl al, cl
inc cl
mov byte [r12 + 2], cl
mov byte [r12 + 3], al
mov rcx, rdi
mov qword [rdi + 0x10], rbp
call fcn.004bd890
mov r12, qword [rsp + 0x140]
mov r13, qword [rsp + 0x138]
mov rdi, qword [rsp + 0x168]
mov rsi, qword [rsp + 0x160]
mov rbp, qword [rsp + 0x158]
mov rbx, qword [rsp + 0x150]
add rsp, 0x148
ret