Function at 0x760640
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xd98
cmp dword [rsp + 0xdc8], 4
jl 0x76066b
xor eax, eax
test eax, eax
jne 0x760665
mov dword [rsp + 0xd40], 0x10000
jmp 0x760688
mov eax, dword [rsp + 0xd40]
dec eax
mov dword [rsp + 0xd40], eax
cmp dword [rsp + 0xd40], 0
jl 0x7606ab
movsxd rax, dword [rsp + 0xd40]
mov rcx, qword [rsp + 0xdb8]
mov dword [rcx + rax*4], 0
jmp 0x760678
mov rax, qword [rsp + 0xda8]
movzx eax, byte [rax]
shl eax, 8
mov dword [rsp + 0xd5c], eax
mov eax, dword [rsp + 0xdc0]
dec eax
mov dword [rsp + 0xd40], eax
jmp 0x7606e3
mov eax, dword [rsp + 0xd40]
sub eax, 4
mov dword [rsp + 0xd40], eax
cmp dword [rsp + 0xd40], 3
jl 0x7608af
movsxd rax, dword [rsp + 0xd40]
xor ecx, ecx
mov rdx, qword [rsp + 0xdb0]
mov word [rdx + rax*2], cx
mov eax, dword [rsp + 0xd5c]
sar eax, 8
movsxd rcx, dword [rsp + 0xd40]
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov dword [rsp + 0xd5c], eax
movsxd rax, dword [rsp + 0xd5c]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
inc eax
movsxd rcx, dword [rsp + 0xd5c]
mov rdx, qword [rsp + 0xdb8]
mov dword [rdx + rcx*4], eax
mov eax, dword [rsp + 0xd40]
dec eax
cdqe
xor ecx, ecx
mov rdx, qword [rsp + 0xdb0]
mov word [rdx + rax*2], cx
mov eax, dword [rsp + 0xd5c]
sar eax, 8
mov ecx, dword [rsp + 0xd40]
dec ecx
movsxd rcx, ecx
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov dword [rsp + 0xd5c], eax
movsxd rax, dword [rsp + 0xd5c]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
inc eax
movsxd rcx, dword [rsp + 0xd5c]
mov rdx, qword [rsp + 0xdb8]
mov dword [rdx + rcx*4], eax
mov eax, dword [rsp + 0xd40]
sub eax, 2
cdqe
xor ecx, ecx
mov rdx, qword [rsp + 0xdb0]
mov word [rdx + rax*2], cx
mov eax, dword [rsp + 0xd5c]
sar eax, 8
mov ecx, dword [rsp + 0xd40]
sub ecx, 2
movsxd rcx, ecx
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov dword [rsp + 0xd5c], eax
movsxd rax, dword [rsp + 0xd5c]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
inc eax
movsxd rcx, dword [rsp + 0xd5c]
mov rdx, qword [rsp + 0xdb8]
mov dword [rdx + rcx*4], eax
mov eax, dword [rsp + 0xd40]
sub eax, 3
cdqe
xor ecx, ecx
mov rdx, qword [rsp + 0xdb0]
mov word [rdx + rax*2], cx
mov eax, dword [rsp + 0xd5c]
sar eax, 8
mov ecx, dword [rsp + 0xd40]
sub ecx, 3
movsxd rcx, ecx
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov dword [rsp + 0xd5c], eax
movsxd rax, dword [rsp + 0xd5c]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
inc eax
movsxd rcx, dword [rsp + 0xd5c]
mov rdx, qword [rsp + 0xdb8]
mov dword [rdx + rcx*4], eax
jmp 0x7606d2
jmp 0x7608c1
mov eax, dword [rsp + 0xd40]
dec eax
mov dword [rsp + 0xd40], eax
cmp dword [rsp + 0xd40], 0
jl 0x760938
movsxd rax, dword [rsp + 0xd40]
xor ecx, ecx
mov rdx, qword [rsp + 0xdb0]
mov word [rdx + rax*2], cx
mov eax, dword [rsp + 0xd5c]
sar eax, 8
movsxd rcx, dword [rsp + 0xd40]
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov dword [rsp + 0xd5c], eax
movsxd rax, dword [rsp + 0xd5c]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
inc eax
movsxd rcx, dword [rsp + 0xd5c]
mov rdx, qword [rsp + 0xdb8]
mov dword [rdx + rcx*4], eax
jmp 0x7608b1
mov dword [rsp + 0xd40], 0
jmp 0x760955
mov eax, dword [rsp + 0xd40]
inc eax
mov dword [rsp + 0xd40], eax
cmp dword [rsp + 0xd40], 0x22
jge 0x7609b8
movsxd rax, dword [rsp + 0xd40]
mov ecx, dword [rsp + 0xd40]
mov edx, dword [rsp + 0xdc0]
add edx, ecx
mov ecx, edx
movsxd rcx, ecx
mov rdx, qword [rsp + 0xda8]
mov r8, qword [rsp + 0xda8]
movzx eax, byte [r8 + rax]
mov byte [rdx + rcx], al
mov eax, dword [rsp + 0xd40]
mov ecx, dword [rsp + 0xdc0]
add ecx, eax
mov eax, ecx
cdqe
xor ecx, ecx
mov rdx, qword [rsp + 0xdb0]
mov word [rdx + rax*2], cx
jmp 0x760945
cmp dword [rsp + 0xdc8], 4
jl 0x7609c8
xor eax, eax
test eax, eax
jne 0x7609c2
mov dword [rsp + 0xd40], 1
jmp 0x7609e5
mov eax, dword [rsp + 0xd40]
inc eax
mov dword [rsp + 0xd40], eax
cmp dword [rsp + 0xd40], 0x10000
jg 0x760a31
movsxd rax, dword [rsp + 0xd40]
mov ecx, dword [rsp + 0xd40]
dec ecx
movsxd rcx, ecx
mov rdx, qword [rsp + 0xdb8]
mov eax, dword [rdx + rax*4]
mov rdx, qword [rsp + 0xdb8]
add eax, dword [rdx + rcx*4]
movsxd rcx, dword [rsp + 0xd40]
mov rdx, qword [rsp + 0xdb8]
mov dword [rdx + rcx*4], eax
jmp 0x7609d5
mov rax, qword [rsp + 0xda8]
movzx eax, byte [rax]
shl eax, 8
mov word [rsp + 0xd44], ax
mov eax, dword [rsp + 0xdc0]
dec eax
mov dword [rsp + 0xd40], eax
jmp 0x760a6a
mov eax, dword [rsp + 0xd40]
sub eax, 4
mov dword [rsp + 0xd40], eax
cmp dword [rsp + 0xd40], 3
jl 0x760c83
movzx eax, word [rsp + 0xd44]
sar eax, 8
movsxd rcx, dword [rsp + 0xd40]
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov word [rsp + 0xd44], ax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
dec eax
mov dword [rsp + 0xd5c], eax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov edx, dword [rsp + 0xd5c]
mov dword [rcx + rax*4], edx
movsxd rax, dword [rsp + 0xd5c]
mov rcx, qword [rsp + 0xda0]
mov edx, dword [rsp + 0xd40]
mov dword [rcx + rax*4], edx
movzx eax, word [rsp + 0xd44]
sar eax, 8
mov ecx, dword [rsp + 0xd40]
dec ecx
movsxd rcx, ecx
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov word [rsp + 0xd44], ax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
dec eax
mov dword [rsp + 0xd5c], eax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov edx, dword [rsp + 0xd5c]
mov dword [rcx + rax*4], edx
mov eax, dword [rsp + 0xd40]
dec eax
movsxd rcx, dword [rsp + 0xd5c]
mov rdx, qword [rsp + 0xda0]
mov dword [rdx + rcx*4], eax
movzx eax, word [rsp + 0xd44]
sar eax, 8
mov ecx, dword [rsp + 0xd40]
sub ecx, 2
movsxd rcx, ecx
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov word [rsp + 0xd44], ax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
dec eax
mov dword [rsp + 0xd5c], eax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov edx, dword [rsp + 0xd5c]
mov dword [rcx + rax*4], edx
mov eax, dword [rsp + 0xd40]
sub eax, 2
movsxd rcx, dword [rsp + 0xd5c]
mov rdx, qword [rsp + 0xda0]
mov dword [rdx + rcx*4], eax
movzx eax, word [rsp + 0xd44]
sar eax, 8
mov ecx, dword [rsp + 0xd40]
sub ecx, 3
movsxd rcx, ecx
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov word [rsp + 0xd44], ax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
dec eax
mov dword [rsp + 0xd5c], eax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov edx, dword [rsp + 0xd5c]
mov dword [rcx + rax*4], edx
mov eax, dword [rsp + 0xd40]
sub eax, 3
movsxd rcx, dword [rsp + 0xd5c]
mov rdx, qword [rsp + 0xda0]
mov dword [rdx + rcx*4], eax
jmp 0x760a59
jmp 0x760c95
mov eax, dword [rsp + 0xd40]
dec eax
mov dword [rsp + 0xd40], eax
cmp dword [rsp + 0xd40], 0
jl 0x760d24
movzx eax, word [rsp + 0xd44]
sar eax, 8
movsxd rcx, dword [rsp + 0xd40]
mov rdx, qword [rsp + 0xda8]
movzx ecx, byte [rdx + rcx]
shl ecx, 8
or eax, ecx
mov word [rsp + 0xd44], ax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov eax, dword [rcx + rax*4]
dec eax
mov dword [rsp + 0xd5c], eax
movzx eax, word [rsp + 0xd44]
mov rcx, qword [rsp + 0xdb8]
mov edx, dword [rsp + 0xd5c]
mov dword [rcx + rax*4], edx
movsxd rax, dword [rsp + 0xd5c]
mov rcx, qword [rsp + 0xda0]
mov edx, dword [rsp + 0xd40]
mov dword [rcx + rax*4], edx
jmp 0x760c85
mov dword [rsp + 0xd40], 0
jmp 0x760d41
mov eax, dword [rsp + 0xd40]
inc eax
mov dword [rsp + 0xd40], eax
cmp dword [rsp + 0xd40], 0xff
jg 0x760d73
movsxd rax, dword [rsp + 0xd40]
mov byte [rsp + rax + 0x40], 0
movsxd rax, dword [rsp + 0xd40]
mov ecx, dword [rsp + 0xd40]
mov dword [rsp + rax*4 + 0x140], ecx
jmp 0x760d31
mov dword [rsp + 0xd60], 1
mov eax, dword [rsp + 0xd60]
imul eax, eax, 3
inc eax
mov dword [rsp + 0xd60], eax
cmp dword [rsp + 0xd60], 0x100
jle 0x760d7e