Function at 0x1400017c4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x141688fc0]
xor ebx, ebx
xor r12d, r12d
movsxd r15, ecx
lea rsi, [0x140000000]
lea edi, [r12 + 1]
mov r8, r15
shl r8, 7
test edx, edx
lea rax, [r8 + rax + 0x828]
sete bl
mov qword [rbp + 0x40], rax
mov r14d, ebx
add r12d, edi
mov ecx, r12d
dec ecx
je 0x14000186d
dec ecx
je 0x140001857
dec ecx
je 0x140001841
test ebx, ebx
je 0x140001838
lea rcx, [0x14162f000]
jmp 0x14000187f
lea rcx, [0x14162e980]
jmp 0x14000187f
test ebx, ebx
je 0x14000184e
lea rcx, [0x14162ee60]
jmp 0x14000187f
lea rcx, [0x14162e7e0]
jmp 0x14000187f
test ebx, ebx
je 0x140001864
lea rcx, [0x14162ecc0]
jmp 0x14000187f
lea rcx, [0x14162e640]
jmp 0x14000187f
lea rcx, [0x14162eb20]
test ebx, ebx
jne 0x14000187f
lea rcx, [0x14162e4a0]
call fcn.140005f64
cmp eax, 0x66
jne 0x14000194f
test ebx, ebx
je 0x1400018aa
lea rcx, [0x14162f1c0]
call fcn.140005f64
movsxd rcx, eax
mov r13d, dword [rsi + rcx*4 + 0x162e098]
jmp 0x1400018c1
lea rcx, [0x14162f1b0]
call fcn.140005f64
movsxd rcx, eax
mov r13d, dword [rsi + rcx*4 + 0x162df88]
lea rcx, [0x14162f2f0]
test ebx, ebx
jne 0x1400018d3
lea rcx, [0x14162f1d0]
call fcn.140005f64
lea rcx, [0x14162f800]
cdqe
mov eax, dword [rsi + rax*4 + 0x1630390]
mov dword [rbp - 0x2c], eax
test ebx, ebx
jne 0x1400018f6
lea rcx, [0x14162f400]
call fcn.140005f64
cdqe
mov ecx, dword [rsi + rax*4 + 0x1630490]
cmp ecx, 0x80
jle 0x140001912
sub ecx, 0x100
test ecx, ecx
jns 0x140001924
mov eax, ecx
mov esi, edi
cdq
xor eax, edx
sub eax, edx
mov dword [rbp - 0x30], eax
jmp 0x140001929
xor esi, esi
mov dword [rbp - 0x30], ecx
cmp dword [0x1416a8b50], 0
mov rdi, qword [rbp - 0x30]
mov qword [rbp - 0x20], rdi
je 0x140001991
mov rdx, qword [0x1416a8b60]
lea rcx, str.ESC:
call fcn.14014c9dc
jmp 0x140001991
cdqe
mov ecx, dword [rsi + rax*4 + 0x16301f0]
mov r13d, ecx
mov eax, ecx
and ecx, 0xf
sar eax, 4
mov dword [rbp - 0x10], ecx
sar r13d, 0xc
movzx eax, al
lea rcx, [0x14162f1a0]
and r13d, edi
mov dword [rbp - 0xc], eax
call fcn.140005f64
mov rdi, qword [rbp - 0x10]
movsxd rcx, eax
mov qword [rbp - 0x20], rdi
mov esi, dword [rsi + rcx*4 + 0x162df38]
shr rdi, 0x20
lea rcx, [0x140000000]
add r14d, edi
mov edi, 1
movsxd rax, r14d
add r14d, edi
movzx r8d, byte [rax + rcx + 0x1631c10]
cmp r15d, 6
jl 0x1400019eb
movsxd rax, dword [0x141641694]
lea r9d, [rdi + 0x1e]
mov edx, dword [rcx + rax*4 + 0x1631c00]
imul edx, dword [0x141641624]
sar edx, 2
cmp edx, r9d
jg 0x1400019e5
cmp edx, edi
jge 0x1400019e2
mov edx, edi
jmp 0x1400019f1
cmp edx, r9d
cmovg edx, r9d
jmp 0x1400019f1
mov edx, dword [0x141641624]
mov eax, edx
and eax, 0x80000001
jge 0x140001a01
sub eax, edi
or eax, 0xfffffffe
add eax, edi
movzx ecx, word [rbp - 0x20]
add cx, cx
add cx, di
imul cx, dx
cmp eax, edi
jne 0x140001a1b
movzx eax, cx
neg ax
jmp 0x140001a23
mov eax, edi
sub ax, cx
sub cx, di
test esi, esi
lea rsi, [0x140000000]
cmovne cx, ax
mov rax, qword [rbp + 0x40]
mov word [rax + r8*2], cx
test r13d, r13d
je 0x140001819
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret