Function at 0x140005220
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov r9d, dword [rcx + 0x60]
mov rbx, rcx
and r9d, 0x3f
mov rdi, rdx
mov ecx, r9d
not ecx
and ecx, 3
lea r8d, [r9 + 3]
shl ecx, 3
shr r8d, 2
test r8d, r8d
je 0x140005271
lea rax, [rbx + r8*4]
nop dword [rax]
mov edx, dword [rax - 4]
lea rax, [rax - 4]
bswap edx
mov dword [rax], edx
add r8d, 0xffffffff
jne 0x140005260
mov eax, r9d
mov edx, 0xffffff80
shr rax, 2
xor esi, esi
lea r8, [rbx + rax*4]
shl edx, cl
and edx, dword [r8]
mov eax, 0x80
shl eax, cl
or edx, eax
mov dword [r8], edx
cmp r9d, 0x38
jae 0x1400052a9
shr r9d, 2
inc r9d
cmp r9d, 0xe
jae 0x1400052df
jmp 0x1400052c4
cmp r9d, 0x3c
jae 0x1400052b4
mov eax, dword [rbx + 0x3c]
jmp 0x1400052b6
mov eax, esi
xor dword [rbx + 0x3c], eax
mov rcx, rbx
call fcn.140004eb0
mov r9d, esi
mov ecx, r9d
mov r8d, 0xe
sub r8d, r9d
xor edx, edx
shl r8, 2
lea rcx, [rbx + rcx*4]
call fcn.140050d90
mov edx, dword [rbx + 0x60]
mov eax, edx
mov ecx, dword [rbx + 0x64]
shr eax, 0x1d
shl ecx, 3
or ecx, eax
lea eax, [rdx*8]
mov dword [rbx + 0x38], ecx
mov rcx, rbx
mov dword [rbx + 0x3c], eax
call fcn.140004eb0
movzx eax, byte [rbx + 0x43]
mov byte [rdi], al
movzx eax, byte [rbx + 0x42]
mov byte [rdi + 1], al
mov eax, dword [rbx + 0x40]
shr eax, 8
mov byte [rdi + 2], al
movzx eax, byte [rbx + 0x40]
mov byte [rdi + 3], al
movzx eax, byte [rbx + 0x47]
mov byte [rdi + 4], al
movzx eax, byte [rbx + 0x46]
mov byte [rdi + 5], al
mov eax, dword [rbx + 0x44]
shr eax, 8
mov byte [rdi + 6], al
movzx eax, byte [rbx + 0x44]
mov byte [rdi + 7], al
movzx eax, byte [rbx + 0x4b]
mov byte [rdi + 8], al
movzx eax, byte [rbx + 0x4a]
mov byte [rdi + 9], al
mov eax, dword [rbx + 0x48]
shr eax, 8
mov byte [rdi + 0xa], al
movzx eax, byte [rbx + 0x48]
mov byte [rdi + 0xb], al
movzx eax, byte [rbx + 0x4f]
mov byte [rdi + 0xc], al
movzx eax, byte [rbx + 0x4e]
mov byte [rdi + 0xd], al
mov eax, dword [rbx + 0x4c]
shr eax, 8
mov byte [rdi + 0xe], al
movzx eax, byte [rbx + 0x4c]
mov byte [rdi + 0xf], al
mov dword [rbx], esi
movzx eax, byte [rbx + 0x53]
mov byte [rdi + 0x10], al
mov dword [rbx + 4], esi
movzx eax, byte [rbx + 0x52]
mov byte [rdi + 0x11], al
mov dword [rbx + 8], esi
mov eax, dword [rbx + 0x50]
shr eax, 8
mov byte [rdi + 0x12], al
mov dword [rbx + 0xc], esi
movzx eax, byte [rbx + 0x50]
mov byte [rdi + 0x13], al
mov dword [rbx + 0x10], esi
movzx eax, byte [rbx + 0x57]
mov byte [rdi + 0x14], al
mov dword [rbx + 0x14], esi
movzx eax, byte [rbx + 0x56]
mov byte [rdi + 0x15], al
mov dword [rbx + 0x18], esi
mov eax, dword [rbx + 0x54]
shr eax, 8
mov byte [rdi + 0x16], al
mov dword [rbx + 0x1c], esi
movzx eax, byte [rbx + 0x54]
mov byte [rdi + 0x17], al
mov dword [rbx + 0x20], esi
movzx eax, byte [rbx + 0x5b]
mov byte [rdi + 0x18], al
mov dword [rbx + 0x24], esi
movzx eax, byte [rbx + 0x5a]
mov byte [rdi + 0x19], al
mov dword [rbx + 0x28], esi
mov eax, dword [rbx + 0x58]
shr eax, 8
mov byte [rdi + 0x1a], al
mov dword [rbx + 0x2c], esi
movzx eax, byte [rbx + 0x58]
mov byte [rdi + 0x1b], al
mov dword [rbx + 0x30], esi
movzx eax, byte [rbx + 0x5f]
mov byte [rdi + 0x1c], al
mov dword [rbx + 0x34], esi
movzx eax, byte [rbx + 0x5e]
mov byte [rdi + 0x1d], al
mov dword [rbx + 0x38], esi
mov eax, dword [rbx + 0x5c]
shr eax, 8
mov byte [rdi + 0x1e], al
mov dword [rbx + 0x3c], esi
movzx eax, byte [rbx + 0x5c]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov byte [rdi + 0x1f], al
add rsp, 0x20
pop rdi
ret