Function at 0x4bfc70
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 0x4bff2b
mov esi, dword [rcx + 4]
add rsi, qword [rdi + 0x40]
movzx eax, byte [rsi]
cmp eax, r8d
jne 0x4bfd4b
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 0x4bfd3a
nop
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4bfcf7
mov rax, qword [rbx]
shr rax, 0x20
je 0x4bfd25
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 0x4bfd00
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 0x4bfce0
mov rcx, rdi
mov qword [rdi + 0x10], rsi
call fcn.004bf440
jmp 0x4c0379
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 0x4bfe8f
movzx eax, byte [rsi + 1]
add r9d, eax
add ecx, 0xffffffff
jne 0x4bfd60
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 0x4bfd91
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 0x4bfdf0
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 0x4c0152
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4bfe49
mov rax, qword [rbx]
shr rax, 0x20
je 0x4bfe75
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 0x4bfe50
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 0x4bfe32
jmp 0x4c0152
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 0x4bff1a
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4bfed7
mov rax, qword [rbx]
shr rax, 0x20
je 0x4bff05
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 0x4bfee0
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 0x4bfec0
mov rcx, rdi
mov qword [rdi + 0x10], rsi
call fcn.004bf390
jmp 0x4c0379
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 0x4c0038
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 0x4c000a
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4bffc7
mov rax, qword [rbx]
shr rax, 0x20
je 0x4bfff5
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 0x4bffd0
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 0x4bffb0
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.004bf4d0
jmp 0x4c0379
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 0x4c00ba
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4c0077
mov rax, qword [rbx]
shr rax, 0x20
je 0x4c00a5
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 0x4c0080
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 0x4c0060
movzx ecx, word [rdi + rsi*2 + 0xa70]
lea eax, [rcx + 0x20]
sar eax, 7
sub cx, ax
movzx eax, cx
lea rcx, [0x004dee38]
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 0x4c00f0
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 0x4c0371
mov r8, rcx
add r8, qword [rdi + 0x40]
mov qword [rdi], r8
movzx eax, word [r8]
cmp eax, edx
je 0x4c0170
lea r8, [rsp + 0x20]
mov rcx, rdi
call fcn.004bf2b0
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 0x4c028d
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 0x4c01c0
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 0x4c027f
nop
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4c0237
mov rax, qword [rbx]
shr rax, 0x20
je 0x4c0265
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 0x4c0240
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 0x4c0220
mov r8d, dword [rsp + 0x20]
add r8w, si
add word [r12], r8w
jmp 0x4c0160
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 0x4c0293
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 0x4c033a
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x4c02f7
mov rax, qword [rbx]
shr rax, 0x20
je 0x4c0325
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 0x4c0300
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 0x4c02e0
movzx ecx, byte [r12 + 2]
cmp cl, 7
jae 0x4c0365
add byte [r12 + 3], 0xff
jne 0x4c0365
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.004bf520
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