Function at 0x140005000
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x48]
dec eax
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x20], 0
je 0x14000525b
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
and eax, 0xfff
mov word [rsp + 0x1c], ax
movzx eax, word [rsp + 0x1c]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x10], rax
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
sar eax, 0xc
mov dword [rsp + 8], eax
cmp dword [rsp + 8], 0
je 0x14000523f
cmp dword [rsp + 8], 1
je 0x1400050d2
cmp dword [rsp + 8], 2
je 0x14000519a
cmp dword [rsp + 8], 3
je 0x1400050bb
cmp dword [rsp + 8], 4
je 0x140005105
cmp dword [rsp + 8], 5
je 0x1400051f8
cmp dword [rsp + 8], 9
je 0x1400051c8
cmp dword [rsp + 8], 0xa
je 0x1400051e1
jmp 0x140005241
mov rax, qword [rsp + 0x10]
mov eax, dword [rax]
add eax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x10]
mov dword [rcx], eax
jmp 0x140005248
mov rax, qword [rsp + 0x10]
movzx eax, word [rax]
shl eax, 0x10
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 4]
add ecx, eax
mov eax, ecx
mov dword [rsp + 4], eax
mov eax, dword [rsp + 4]
sar eax, 0x10
mov rcx, qword [rsp + 0x10]
mov word [rcx], ax
jmp 0x140005248
movzx eax, word [rsp + 0x1c]
and eax, 2
test eax, eax
je 0x14000512e
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x48]
dec eax
mov dword [rsp + 0x48], eax
jmp 0x140005248
mov rax, qword [rsp + 0x10]
movzx eax, word [rax]
shl eax, 0x10
mov dword [rsp + 4], eax
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x48]
dec eax
mov dword [rsp + 0x48], eax
mov rax, qword [rsp + 0x50]
movsx eax, word [rax]
mov ecx, dword [rsp + 4]
add ecx, eax
mov eax, ecx
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 4]
add ecx, eax
mov eax, ecx
mov dword [rsp + 4], eax
mov eax, dword [rsp + 4]
add eax, 0x8000
mov dword [rsp + 4], eax
mov eax, dword [rsp + 4]
sar eax, 0x10
mov rcx, qword [rsp + 0x10]
mov word [rcx], ax
jmp 0x140005248
mov rax, qword [rsp + 0x10]
movsx eax, word [rax]
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 4]
add ecx, eax
mov eax, ecx
mov dword [rsp + 4], eax
mov rax, qword [rsp + 0x10]
movzx ecx, word [rsp + 4]
mov word [rax], cx
jmp 0x140005248
mov rax, qword [rsp + 0x10]
and rax, 0xfffffffffffffff0
mov qword [rsp + 0x10], rax
mov qword [rsp + 0x28], 0
jmp 0x140005248
mov rax, qword [rsp + 0x10]
mov rax, qword [rax]
add rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x10]
mov qword [rcx], rax
jmp 0x140005248
mov rax, qword [rsp + 0x10]
mov eax, dword [rax]
and eax, 0x3ffffff
shl eax, 2
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 4]
add ecx, eax
mov eax, ecx
mov dword [rsp + 4], eax
mov rax, qword [rsp + 0x10]
mov eax, dword [rax]
and eax, 0xfc000000
mov ecx, dword [rsp + 4]
sar ecx, 2
and ecx, 0x3ffffff
or eax, ecx
mov rcx, qword [rsp + 0x10]
mov dword [rcx], eax
jmp 0x140005248
jmp 0x140005248
xor eax, eax
jmp 0x140005355
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
jmp 0x140005017
mov dword [rsp], 0xa
mov dword [rsp + 0xc], 0
jmp 0x140005276
mov eax, dword [rsp + 0xc]
inc eax
mov dword [rsp + 0xc], eax
mov eax, dword [rsp]
cmp dword [rsp + 0xc], eax
jge 0x1400052e8
mov eax, dword [rsp + 0xc]
cdq
and eax, 1
xor eax, edx
sub eax, edx
test eax, eax
jne 0x1400052c9
mov eax, dword [rsp]
shl eax, 1
mov dword [rsp], eax
mov eax, dword [rsp + 0xc]
cdq
mov ecx, 3
idiv ecx
mov eax, edx
test eax, eax
jne 0x1400052b9
mov eax, dword [rsp + 0xc]
mov ecx, dword [rsp]
add ecx, eax
mov eax, ecx
mov dword [rsp], eax
jmp 0x1400052c7
mov eax, dword [rsp + 0xc]
mov ecx, dword [rsp]
sub ecx, eax
mov eax, ecx
mov dword [rsp], eax
jmp 0x1400052e6
cmp dword [rsp], 0
jle 0x1400052e6
mov eax, dword [rsp]
dec eax
mov dword [rsp], eax
mov eax, dword [rsp]
cdq
mov ecx, 5
idiv ecx
mov eax, edx
jmp 0x1400052c9
jmp 0x14000526c
cmp dword [rsp], 0x14
jle 0x140005301
mov eax, dword [rsp]
cdq
sub eax, edx
sar eax, 1
mov dword [rsp], eax
cmp dword [rsp], 0xa
jg 0x1400052ee
jmp 0x140005350
mov dword [rsp + 0x18], 0
jmp 0x140005315
mov eax, dword [rsp + 0x18]
inc eax
mov dword [rsp + 0x18], eax
mov eax, dword [rsp]
cmp dword [rsp + 0x18], eax
jge 0x140005350
mov eax, dword [rsp + 0x18]
cdq
mov ecx, 3
idiv ecx
mov eax, edx
test eax, eax
jne 0x140005340
mov eax, dword [rsp + 0x18]
mov ecx, dword [rsp]
add ecx, eax
mov eax, ecx
mov dword [rsp], eax
jmp 0x14000534e
mov eax, dword [rsp + 0x18]
mov ecx, dword [rsp]
sub ecx, eax
mov eax, ecx
mov dword [rsp], eax
jmp 0x14000530b
mov rax, qword [rsp + 0x50]
add rsp, 0x38
ret