Function at 0x140217750
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x148
mov qword [rsp + 0x60], r8
mov r15, rdx
mov r8d, dword [rsp + 0x1b0]
xor r14d, r14d
xor ebp, ebp
test r8, r8
setne r14b
sete bpl
mov eax, dword [rsp + 0x1c0]
mov r12, qword [rsp + 0x1b8]
mov rdx, qword [0x1406a7e00]
xor rdx, rsp
mov qword [rsp + 0x140], rdx
mov rdx, r8
shl rdx, 8
lea rdx, [rdx + r8*8]
lea r11, [rcx + rdx]
add r11, 0xe24
lea rdx, [r8 + r8*2]
shl rdx, 7
lea r10, [rcx + rdx]
add r10, 0x55c8
mov ebx, ebp
lea rdx, [0x1405ae910]
movzx edx, byte [rbx + rdx]
movsxd r9, r9d
mov qword [rsp + 0x68], r11
lea r8, [r11 + rdx]
shl rdx, 5
add rdx, r8
lea r8, [r9 + r9*4]
lea r8, [r9 + r8*2]
movzx r8d, byte [rdx + r8]
movzx edx, word [r12 + 2]
imul edx, edx
shr edx, 2
neg r14d
mov r11d, 0x10
lea r13, [0x1405c06e0]
nop word cs:[rax + rax]
lea esi, [r11 - 1]
movzx edi, byte [rsi + r13]
movsx edi, word [r15 + rdi*2]
imul edi, edi
cmp edi, edx
ja 0x14021783e
mov r11d, esi
cmp esi, ebp
ja 0x140217820
jmp 0x140217844
dec r11d
mov r14d, r11d
xor edx, edx
cmp r14d, 0xf
setl dl
lea r11, [0x1405ad710]
movsxd rsi, eax
lea rax, [rbx + rbx*2]
lea rax, [r10 + rax*8]
mov rax, qword [rax + r9*8]
test r9d, r9d
je 0x140217881
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], rax
xor r9d, r9d
jmp 0x1402178a7
mov r9d, r8d
not r9b
movzx r9d, r9b
movzx r9d, word [r11 + r9*2]
mov r10, r9
imul r10, rsi
mov qword [rsp + 0x80], r10
mov qword [rsp + 0x88], rax
lea rdi, [rsp + 0xa0]
movzx r8d, word [r11 + r8*2]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x48], rsi
imul r9, rsi
mov qword [rsp + 0x90], r9
mov qword [rsp + 0x98], rax
add r14d, edx
mov dword [rsp + 0x2c], 0xffffffff
mov dword [rsp + 0x30], 0xffffffff
mov dword [rsp + 0x34], 0xffffffff
mov dword [rsp + 0x5c], ebp
cmp r14d, ebp
jge 0x140217924
mov eax, dword [rsp + 0x1b0]
xorps xmm0, xmm0
test eax, eax
je 0x140217d09
movups xmmword [r15 + 0x10], xmm0
movups xmmword [r15], xmm0
mov r11, qword [rsp + 0x60]
movups xmmword [r11 + 0x10], xmm0
movups xmmword [r11], xmm0
jmp 0x140217d22
mov rax, qword [rsp + 0x38]
imul rax, qword [rsp + 0x48]
mov qword [rsp + 0x38], rax
inc r14d
mov eax, dword [rsp + 0x1b0]
shl rax, 7
lea rax, [rax + rax*2]
lea rdx, [rbx*8]
lea rdx, [rdx + rdx*2]
or rdx, rax
add rcx, rdx
add rcx, 0x55e0
mov dword [rsp + 0x34], 0xffffffff
lea rax, [rsp + 0x80]
mov dword [rsp + 0x30], 0xffffffff
mov dword [rsp + 0x2c], 0xffffffff
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x78], r14
jmp 0x1402179c2
movabs rax, 0x7fffffffffffff
mov qword [r14 + 0x10], rax
mov r12, qword [rsp + 0x1b8]
lea r13, [0x1405c06e0]
add rcx, 0x18
mov rax, r14
mov r14, qword [rsp + 0x78]
cmp r14, rbx
je 0x1402178f6
mov r14, rdi
mov rdi, rax
mov r8, rbx
movzx r9d, byte [rbx + r13]
movzx r10d, word [r12 + r9*2]
movzx r13d, word [r12 + r9*2 + 0x20]
movzx r11d, word [r15 + r9*2]
mov eax, r11d
neg ax
cmovs ax, r11w
movzx edx, ax
movzx eax, word [r12 + r9*2 + 0xc0]
add eax, edx
imul r13d, eax
mov r12d, r13d
shr r12d, 0x11
add r13d, 0x10000
shr r13d, 0x11
cmp r13d, 0x7ff
mov edx, 0x7ff
cmovge r13d, edx
cmp r12d, 0x7ff
mov esi, 0x7ff
cmovl esi, r12d
add eax, eax
shr r11d, 0xf
cmp r12d, 2
mov ebx, 2
cmovl ebx, r12d
mov rdx, qword [rcx + rbx*8]
mov qword [r14 + 8], rdx
lea rdx, [0x1405ae910]
movzx edx, byte [r8 + rdx + 1]
mov qword [rsp + 0x70], rdx
cmp esi, r13d
jbe 0x140217a80
movabs rdx, 0x7fffffffffffff
mov qword [r14], rdx
jmp 0x140217bc0
mov edx, esi
mov dword [rsp + 0x44], r10d
imul edx, r10d
lea r10, [0x1405c06f0]
movzx ebp, word [r10 + r9*2]
imul ebp, edx
sub edx, eax
imul ebp, edx
movsxd rbp, ebp
shl rbp, 8
cmp r12d, 0x43
mov edx, 0x43
cmovge r12d, edx
mov rdx, qword [rdi + 8]
mov r10, rdi
mov rdi, qword [rdi + 0x18]
movzx r15d, word [rdx + r12*2]
movzx edx, word [rdi + r12*2]
lea rdi, [0x1405ad910]
movzx edi, word [rdi + rsi*2]
add r15, rdi
mov r12, qword [rsp + 0x48]
imul r15, r12
add r15, qword [r10]
add rdx, rdi
mov rdi, r10
imul rdx, r12
add rdx, qword [r10 + 0x10]
xor r12d, r12d
cmp rdx, r15
cmovge rdx, r15
setl r15b
setl byte [rsp + r8*8 + 0xc0]
add rdx, rbp
mov byte [rsp + r8*8 + 0xc1], r11b
mov word [rsp + r8*8 + 0xc2], si
mov qword [r14], rdx
test rsi, rsi
je 0x140217b70
cmp rdx, qword [rsp + 0x38]
jge 0x140217b70
mov byte [rsp + 0x2b], r15b
cmp r8, 0xe
ja 0x140217b7c
lea rdi, [rbx + rbx*4]
lea rdi, [rbx + rdi*2]
mov rbp, qword [rsp + 0x70]
mov rbx, rbp
shl rbx, 5
mov r15, qword [rsp + 0x68]
add r15, rbp
add rbx, r15
movzx edi, byte [rbx + rdi]
lea rbx, [0x1405ad710]
movzx ebx, word [rbx + rdi*2]
mov rdi, r10
jmp 0x140217b7e
mov r15, qword [rsp + 0x50]
mov r10d, dword [rsp + 0x44]
jmp 0x140217bc0
xor ebx, ebx
mov r15, qword [rsp + 0x50]
mov r10, qword [rsp + 0x48]
imul rbx, r10
add rbx, rdx
cmp rbx, qword [rsp + 0x38]
mov r10d, dword [rsp + 0x44]
jge 0x140217bc0
movzx edx, byte [rsp + 0x2b]
mov r12b, dl
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x38], rbx
mov edx, r8d
mov dword [rsp + 0x2c], r8d
mov dword [rsp + 0x34], r12d
nop dword [rax]
lea ebp, [rsi + 1]
cmp ebp, 2
mov r12d, 2
cmovl r12d, ebp
lea rbx, [r8 + 1]
mov rdx, qword [rcx + r12*8]
mov qword [r14 + 0x18], rdx
cmp esi, r13d
jae 0x140217990
lea edx, [rsi + 1]
imul r10d, edx
mov r13d, r10d
mov r10, rdi
mov edi, r13d
sub edi, eax
lea rax, [0x1405c06f0]
movzx eax, word [rax + r9*2]
imul eax, r13d
imul eax, edi
mov rdi, r10
movsxd r13, eax
shl r13, 8
cmp ebp, 0x43
mov eax, 0x43
cmovge ebp, eax
mov rax, qword [rdi + 8]
mov r9, qword [rdi + 0x18]
movzx r10d, word [rax + rbp*2]
movzx r9d, word [r9 + rbp*2]
lea rax, [0x1405ad910]
movzx eax, word [rax + rsi*2 + 2]
add r10, rax
mov rsi, qword [rsp + 0x48]
imul r10, rsi
add r10, qword [rdi]
add r9, rax
imul r9, rsi
add r9, qword [rdi + 0x10]
xor eax, eax
cmp r9, r10
cmovge r9, r10
setl r10b
setl byte [rsp + r8*8 + 0xc4]
add r9, r13
mov byte [rsp + r8*8 + 0xc5], r11b
mov word [rsp + r8*8 + 0xc6], dx
mov qword [r14 + 0x10], r9
cmp r9, qword [rsp + 0x38]
jge 0x14021799e
cmp r8, 0xe
lea r13, [0x1405c06e0]
ja 0x140217ccc
lea rdx, [r12 + r12*4]
lea rdx, [r12 + rdx*2]
mov r11, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
add r11, r12
shl r12, 5
add r12, r11
movzx edx, byte [r12 + rdx]
lea r11, [0x1405ad710]
movzx edx, word [r11 + rdx*2]
jmp 0x140217cce
xor edx, edx
mov r12, qword [rsp + 0x1b8]
imul rdx, rsi
add rdx, r9
cmp rdx, qword [rsp + 0x38]
jge 0x1402179ad
mov al, r10b
mov dword [rsp + 0x30], 1
mov qword [rsp + 0x38], rdx
mov edx, r8d
mov dword [rsp + 0x2c], r8d
mov dword [rsp + 0x34], eax
jmp 0x1402179ad
movups xmmword [r15 + 0x10], xmm0
movups xmmword [r15 + 2], xmm0
mov r11, qword [rsp + 0x60]
movups xmmword [r11 + 0x10], xmm0
movups xmmword [r11 + 2], xmm0
mov r8d, dword [rsp + 0x30]
mov edx, dword [rsp + 0x2c]
xor esi, esi
cmp edx, 0xffffffff
mov edi, dword [rsp + 0x5c]
je 0x140217db2
movsxd rax, edx
movsxd rcx, r8d
lea rax, [rsp + rax*8]
add rax, 0xc0
mov r9d, dword [rsp + 0x34]
mov byte [rax + rcx*4], r9b
cmp edx, edi
jl 0x140217db2
mov ecx, edx
xor eax, eax
nop word [rax + rax]
movsxd rdx, r8d
lea rdx, [rsp + rdx*4]
add rdx, 0xc0
movsx r8d, word [rdx + rcx*8 + 2]
mov r9d, r8d
neg r9d
cmp byte [rdx + rcx*8 + 1], 0
movzx r10d, byte [rcx + r13]
cmove r9d, r8d
mov word [r11 + rcx*2], r9w
or eax, r8d
imul r9w, word [r12 + r10*2]
mov word [r15 + r10*2], r9w
movsx r8d, byte [rdx + rcx*8]
dec rcx
lea edx, [rcx + 1]
cmp edx, edi
jg 0x140217d60
xor esi, esi
test eax, eax
setne sil
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1405602f0
mov eax, esi
add rsp, 0x148
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret