Function at 0x790dc0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov dword [rsp + 0x1c], 0
mov dword [rsp + 0x10], 0
mov dword [rsp], 0
mov dword [rsp + 0x18], 0xffffffff
mov dword [rsp + 0x14], 0
mov rax, qword [rsp + 0x40]
mov byte [rax + 0x16f], 0
mov rax, qword [rsp + 0x40]
mov byte [rax + 0x16e], 0
mov rax, qword [rsp + 0x40]
mov byte [rax + 0x16d], 0
mov rax, qword [rsp + 0x40]
mov byte [rax + 0x16c], 0
mov rax, qword [rsp + 0x48]
mov qword [rsp + 8], rax
mov eax, dword [rsp + 0x50]
mov dword [rsp + 4], eax
jmp 0x790e4c
mov rax, qword [rsp + 8]
add rax, 4
mov qword [rsp + 8], rax
mov eax, dword [rsp + 4]
mov ecx, dword [rsp + 4]
dec ecx
mov dword [rsp + 4], ecx
test eax, eax
je 0x790f07
mov rax, qword [rsp + 8]
cmp dword [rax], 0
jge 0x790e7b
mov rax, qword [rsp + 8]
mov eax, dword [rax]
not eax
mov dword [rsp + 0x20], eax
jmp 0x790e86
mov rax, qword [rsp + 8]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
mov ecx, dword [rsp + 0x1c]
or ecx, eax
mov eax, ecx
mov dword [rsp + 0x1c], eax
mov rax, qword [rsp + 8]
mov eax, dword [rax]
and eax, 1
neg eax
mov rcx, qword [rsp + 8]
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 + 8]
mov eax, dword [rax]
mov ecx, dword [rsp + 0x18]
and ecx, eax
mov eax, ecx
mov dword [rsp + 0x18], eax
mov rax, qword [rsp + 8]
mov eax, dword [rax]
mov ecx, dword [rsp + 0x10]
or ecx, eax
mov eax, ecx
mov dword [rsp + 0x10], eax
mov eax, dword [rsp + 0x10]
and eax, 1
test eax, eax
je 0x790f02
mov eax, dword [rsp + 0x18]
and eax, 1
test eax, eax
jne 0x790f02
mov eax, dword [rsp]
and eax, 2
test eax, eax
je 0x790f02
jmp 0x7910dd
jmp 0x790e3e
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x18]
and eax, 0xff83ffff
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x18], eax
cmp dword [rsp + 0x1c], 0
je 0x790f44
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x18]
add eax, 0x40000
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x18], eax
mov eax, dword [rsp + 0x1c]
shr eax, 1
mov dword [rsp + 0x1c], eax
jmp 0x790f1c
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x18]
and eax, 0x7c0000
test eax, eax
jne 0x790f5a
jmp 0x7910dd
mov eax, dword [rsp + 0x10]
and eax, 1
test eax, eax
jne 0x790fb9
mov eax, dword [rsp + 0x10]
and eax, 1
test eax, eax
jne 0x790fb4
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x18]
sub eax, 0x40000
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x40]
movzx eax, byte [rax + 0x16d]
inc al
mov rcx, qword [rsp + 0x40]
mov byte [rcx + 0x16d], al
mov eax, dword [rsp + 0x14]
inc eax
mov dword [rsp + 0x14], eax
mov eax, dword [rsp + 0x10]
shr eax, 1
mov dword [rsp + 0x10], eax
jmp 0x790f65
jmp 0x79106b
mov eax, dword [rsp + 0x18]
and eax, 1
test eax, eax
je 0x791015
mov eax, dword [rsp + 0x18]
and eax, 1
test eax, eax
je 0x791013
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x18]
sub eax, 0x40000
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x40]
movzx eax, byte [rax + 0x16e]
inc al
mov rcx, qword [rsp + 0x40]
mov byte [rcx + 0x16e], al
mov eax, dword [rsp + 0x14]
inc eax
mov dword [rsp + 0x14], eax
mov eax, dword [rsp + 0x18]
shr eax, 1
mov dword [rsp + 0x18], eax
jmp 0x790fc4
jmp 0x79106b
mov eax, dword [rsp]
and eax, 2
test eax, eax
jne 0x79106b
mov eax, dword [rsp]
and eax, 2
test eax, eax
jne 0x79106b
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x18]
sub eax, 0x40000
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x40]
movzx eax, byte [rax + 0x16f]
inc al
mov rcx, qword [rsp + 0x40]
mov byte [rcx + 0x16f], al
mov eax, dword [rsp + 0x14]
inc eax
mov dword [rsp + 0x14], eax
mov eax, dword [rsp]
shr eax, 1
mov dword [rsp], eax
jmp 0x79101f
cmp dword [rsp + 0x14], 0
je 0x7910dd
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0x18]
bts eax, 8
mov rcx, qword [rsp + 0x40]
mov dword [rcx + 0x18], eax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 8], rax
mov eax, dword [rsp + 0x50]
mov dword [rsp + 4], eax
jmp 0x7910a8
mov rax, qword [rsp + 8]
add rax, 4
mov qword [rsp + 8], rax
mov eax, dword [rsp + 4]
mov ecx, dword [rsp + 4]
dec ecx
mov dword [rsp + 4], ecx
test eax, eax
je 0x7910dd
mov eax, dword [rsp + 0x14]
mov rcx, qword [rsp + 8]
mov qword [rsp + 0x28], rcx
movzx ecx, al
mov rax, qword [rsp + 0x28]
mov eax, dword [rax]
sar eax, cl
mov rcx, qword [rsp + 8]
mov dword [rcx], eax
jmp 0x79109a
add rsp, 0x38
ret