Function at 0x140082940
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push r14
sub rsp, 8
movabs rax, 0x3000000000
mov rbp, r8
mov r14, rdx
mov r9, rcx
cmp r8, rax
ja 0x140082974
mov rcx, qword [rcx]
sub rax, r8
cmp rax, rcx
lea rax, [rcx + r8]
jae 0x14008297e
movabs rax, 0x3000000001
mov rcx, r9
mov qword [rcx], rax
test r8, r8
je 0x140082c82
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x38], r12
xor r12d, r12d
mov qword [rsp], r15
lea r15, [0x140000000]
nop
movzx r10d, byte [r14]
mov ecx, dword [r9 + 0x8ec]
mov r8d, r10d
imul eax, r10d, 7
lea edx, [r10 + rcx]
mov dword [r9 + 0x8ec], edx
sub eax, ecx
mov ecx, dword [r9 + 0x8f8]
add dword [r9 + 0x8f0], eax
movzx eax, byte [rcx + r9 + 0x8e4]
sub edx, eax
mov dword [r9 + 0x8ec], edx
mov byte [rcx + r9 + 0x8e4], r10b
inc dword [r9 + 0x8f8]
cmp dword [r9 + 0x8f8], 7
jne 0x140082a0f
mov dword [r9 + 0x8f8], r12d
mov eax, dword [r9 + 0x8f4]
shl eax, 5
xor eax, r8d
mov dword [r9 + 0x8f4], eax
mov r8d, dword [r9 + 0x1c]
mov ecx, dword [r9 + 0x8f0]
mov edi, dword [r9 + 0x8ec]
add ecx, eax
mov ebx, dword [r9 + 0x18]
inc edi
add edi, ecx
mov eax, 0xaaaaaaab
mul edi
mov ecx, r8d
mov esi, edx
shr esi, 1
cmp ebx, r8d
jae 0x140082aae
mov r11, r10
and r11d, 0x3f
nop dword [rax]
mov eax, ebx
inc ebx
lea rcx, [rax + rax*8]
movzx eax, byte [r9 + rcx*8 + 0x71]
shl rax, 6
add rax, r11
movzx eax, byte [rax + r15 + 0x114d40]
mov byte [r9 + rcx*8 + 0x71], al
movzx eax, byte [r9 + rcx*8 + 0x72]
shl rax, 6
add rax, r11
movzx eax, byte [rax + r15 + 0x114d40]
mov byte [r9 + rcx*8 + 0x72], al
mov r8d, dword [r9 + 0x1c]
mov ecx, r8d
cmp ebx, r8d
jb 0x140082a60
mov ebx, dword [r9 + 0x18]
test byte [r9 + 0x24], 1
je 0x140082adb
movzx eax, byte [r9 + 0x8fc]
and r10d, 0x3f
shl rax, 6
mov r8d, ecx
add r10, rax
movzx eax, byte [r10 + r15 + 0x114d40]
mov byte [r9 + 0x8fc], al
nop dword [rax + rax]
test edi, edi
je 0x140082c59
test dword [r9 + 0x28], esi
jne 0x140082c59
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
lea eax, [rdx + rdx*2]
cmp edi, eax
jne 0x140082c59
mov ecx, ebx
shr esi, cl
nop dword [rax]
mov eax, ebx
lea rcx, [rax + rax*8]
lea rdx, [rcx*8]
cmp dword [rdx + r9 + 0x2c], r12d
jne 0x140082b82
lea eax, [r8 - 1]
lea rax, [rax + rax*8]
lea rcx, [r9 + rax*8]
cmp r8d, dword [r9 + 0x20]
ja 0x140082b62
movzx eax, byte [rcx + 0x71]
mov byte [rcx + 0xb9], al
movzx eax, byte [rcx + 0x72]
mov byte [rcx + 0xba], al
mov byte [rcx + 0x78], r12b
mov byte [rcx + 0xb8], r12b
mov dword [rcx + 0x74], r12d
inc dword [r9 + 0x1c]
jmp 0x140082b82
cmp r8d, 0x1f
jne 0x140082b82
mov eax, dword [r9 + 0x24]
test al, 1
jne 0x140082b82
or eax, 1
mov dword [r9 + 0x24], eax
movzx eax, byte [rcx + 0x71]
mov byte [r9 + 0x8fc], al
movzx eax, byte [rdx + r9 + 0x71]
mov ecx, dword [rdx + r9 + 0x2c]
add rcx, rdx
movzx eax, byte [rax + r15 + 0x13fbe0]
mov byte [rcx + r9 + 0x30], al
movzx eax, byte [rdx + r9 + 0x72]
movzx eax, byte [rax + r15 + 0x13fbe0]
mov byte [rdx + r9 + 0x70], al
mov eax, dword [rdx + r9 + 0x2c]
cmp eax, 0x3f
jae 0x140082bec
inc eax
mov dword [rdx + r9 + 0x2c], eax
mov ecx, eax
add rcx, rdx
mov byte [rcx + r9 + 0x30], r12b
cmp dword [rdx + r9 + 0x2c], 0x20
mov byte [rdx + r9 + 0x71], 0x27
jae 0x140082be6
mov byte [rdx + r9 + 0x72], 0x27
mov byte [rdx + r9 + 0x70], r12b
mov r8d, dword [r9 + 0x1c]
jmp 0x140082c46
mov edx, dword ds:[r9 + 0x1c]
mov r8d, edx
mov r10d, dword [r9 + 0x18]
mov eax, edx
sub eax, r10d
cmp eax, 2
jb 0x140082c46
test byte [r9 + 0x24], 2
lea rax, [r9 + 8]
jne 0x140082c13
mov rax, r9
mov r11, qword [r9 + 0x10]
cmp r11, qword [rax]
jae 0x140082c46
inc r10d
lea rcx, [r10 + r10*8]
cmp dword [r9 + rcx*8 + 0x2c], 0x20
jb 0x140082c46
lea rax, [r11 + r11]
mov dword [r9 + 0x18], r10d
mov qword [r9 + 0x10], rax
mov eax, dword [r9 + 0x28]
lea eax, [rax*2 + 1]
mov dword [r9 + 0x28], eax
test sil, 1
jne 0x140082c59
shr esi, 1
inc ebx
cmp ebx, r8d
jb 0x140082b10
inc r14
sub rbp, 1
jne 0x1400829b0
mov r15, qword [rsp]
mov r12, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x20]
xor eax, eax
add rsp, 8
pop r14
pop rbp
ret