Function at 0x791290
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov dword [rsp + 0x24], 0
mov dword [rsp + 0x18], 0
mov dword [rsp], 0
mov dword [rsp + 0x20], 0xffffffff
mov dword [rsp + 8], 0xffffffff
mov dword [rsp + 0x1c], 0
mov rax, qword [rsp + 0x50]
mov byte [rax + 0x16f], 0
mov rax, qword [rsp + 0x50]
mov byte [rax + 0x16e], 0
mov rax, qword [rsp + 0x50]
mov byte [rax + 0x16d], 0
mov rax, qword [rsp + 0x50]
mov byte [rax + 0x16c], 0
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x10], rax
mov eax, dword [rsp + 0x60]
mov dword [rsp + 4], eax
jmp 0x791324
mov rax, qword [rsp + 0x10]
add rax, 4
mov qword [rsp + 0x10], rax
mov eax, dword [rsp + 4]
mov ecx, dword [rsp + 4]
dec ecx
mov dword [rsp + 4], ecx
test eax, eax
je 0x7913e9
mov eax, dword [rsp + 8]
imul eax, eax, 9
mov rcx, qword [rsp + 0x10]
mov ecx, dword [rcx]
and ecx, 0xffff
imul ecx, ecx, 3
add eax, ecx
mov rcx, qword [rsp + 0x10]
mov ecx, dword [rcx]
sar ecx, 0x10
and ecx, 0xffff
add eax, ecx
mov dword [rsp + 8], eax
mov rax, qword [rsp + 0x10]
cmp dword [rax], 0
jge 0x791382
mov rax, qword [rsp + 0x10]
mov eax, dword [rax]
not eax
mov dword [rsp + 0x28], eax
jmp 0x79138d
mov rax, qword [rsp + 0x10]
mov eax, dword [rax]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x24]
or ecx, eax
mov eax, ecx
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x10]
mov eax, dword [rax]
and eax, 1
neg eax
mov rcx, qword [rsp + 0x10]
mov ecx, dword [rcx]
xor ecx, eax
mov eax, ecx
mov ecx, dword [rsp]
or ecx, eax
mov eax, ecx
mov dword [rsp], eax
mov rax, qword [rsp + 0x10]
mov eax, dword [rax]
mov ecx, dword [rsp + 0x20]
and ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x10]
mov eax, dword [rax]
mov ecx, dword [rsp + 0x18]
or ecx, eax
mov eax, ecx
mov dword [rsp + 0x18], eax
jmp 0x791316
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 8]
mov dword [rax + 0xc8], ecx
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
and eax, 0xff83ffff
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
cmp dword [rsp + 0x24], 0
je 0x791435
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
add eax, 0x40000
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
mov eax, dword [rsp + 0x24]
shr eax, 1
mov dword [rsp + 0x24], eax
jmp 0x79140d
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
and eax, 0x7c0000
shr eax, 0x12
test eax, eax
jne 0x791464
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
btr eax, 8
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
xor eax, eax
jmp 0x791668
mov eax, dword [rsp + 0x18]
and eax, 1
test eax, eax
jne 0x7914c3
mov eax, dword [rsp + 0x18]
and eax, 1
test eax, eax
jne 0x7914be
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
sub eax, 0x40000
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + 0x16d]
inc al
mov rcx, qword [rsp + 0x50]
mov byte [rcx + 0x16d], al
mov eax, dword [rsp + 0x1c]
inc eax
mov dword [rsp + 0x1c], eax
mov eax, dword [rsp + 0x18]
shr eax, 1
mov dword [rsp + 0x18], eax
jmp 0x79146f
jmp 0x791575
mov eax, dword [rsp + 0x20]
and eax, 1
test eax, eax
je 0x79151f
mov eax, dword [rsp + 0x20]
and eax, 1
test eax, eax
je 0x79151d
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
sub eax, 0x40000
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + 0x16e]
inc al
mov rcx, qword [rsp + 0x50]
mov byte [rcx + 0x16e], al
mov eax, dword [rsp + 0x1c]
inc eax
mov dword [rsp + 0x1c], eax
mov eax, dword [rsp + 0x20]
shr eax, 1
mov dword [rsp + 0x20], eax
jmp 0x7914ce
jmp 0x791575
mov eax, dword [rsp]
and eax, 2
test eax, eax
jne 0x791575
mov eax, dword [rsp]
and eax, 2
test eax, eax
jne 0x791575
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
sub eax, 0x40000
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + 0x16f]
inc al
mov rcx, qword [rsp + 0x50]
mov byte [rcx + 0x16f], al
mov eax, dword [rsp + 0x1c]
inc eax
mov dword [rsp + 0x1c], eax
mov eax, dword [rsp]
shr eax, 1
mov dword [rsp], eax
jmp 0x791529
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
and eax, 0x7c0000
shr eax, 0x12
cmp eax, 0x17
jbe 0x7915ea
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
and eax, 0x7c0000
shr eax, 0x12
sub eax, 0x17
mov rcx, qword [rsp + 0x50]
mov byte [rcx + 0x16c], al
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + 0x16c]
mov ecx, dword [rsp + 0x1c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x1c], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
and eax, 0xff83ffff
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
add eax, 0x5c0000
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
cmp dword [rsp + 0x1c], 0
je 0x79165c
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x18]
bts eax, 8
mov rcx, qword [rsp + 0x50]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x10], rax
mov eax, dword [rsp + 0x60]
mov dword [rsp + 4], eax
jmp 0x791627
mov rax, qword [rsp + 0x10]
add rax, 4
mov qword [rsp + 0x10], rax
mov eax, dword [rsp + 4]
mov ecx, dword [rsp + 4]
dec ecx
mov dword [rsp + 4], ecx
test eax, eax
je 0x79165c
mov eax, dword [rsp + 0x1c]
mov rcx, qword [rsp + 0x10]
mov qword [rsp + 0x30], rcx
movzx ecx, al
mov rax, qword [rsp + 0x30]
mov eax, dword [rax]
sar eax, cl
mov rcx, qword [rsp + 0x10]
mov dword [rcx], eax
jmp 0x791619
mov rax, qword [rsp + 0x50]
movzx eax, byte [rax + 0x16c]
add rsp, 0x48
ret