Function at 0x140031969
Capabilities:
Encrypt data using rc4 prga

Disassembly:
test r8d, r8d
jle 0x140031c08
push rbx
push rsi
push rdi
push r14
sub rsp, 0x38
mov rax, qword [0x1400ec0a0]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov esi, dword [rsp + 0x80]
mov eax, edx
mov qword [rsp + 0x68], rbp
sub eax, esi
mov qword [rsp + 0x70], r12
mov r14d, edx
mov qword [rsp + 0x30], r15
mov rdi, rcx
movsxd rbx, eax
mov qword [rsp + 0x20], 0
movsxd r15, r9d
mov ebp, r8d
nop dword [rax]
nop word [rax + rax]
mov r8, rsi
lea rcx, [rsp + 0x20]
xor edx, edx
call fcn.140082860
xor r9d, r9d
mov eax, esi
sub eax, 2
je 0x140031b4e
sub eax, 1
je 0x140031afd
sub eax, 1
je 0x140031aa2
xor ecx, ecx
cmp eax, 1
je 0x140031a4e
test rbx, rbx
js 0x140031b97
mov r10, rdi
lea r11, [rbx + 1]
nop word [rax + rax]
movzx r8d, byte [r10]
lea r10, [r10 + 1]
movsxd rax, ecx
mov edx, r8d
and eax, 7
movzx eax, byte [rsp + rax + 0x20]
sub edx, eax
lea eax, [rsi + rcx]
and eax, 7
add r9d, edx
xor edx, edx
inc ecx
mov byte [rsp + rax + 0x20], r8b
mov eax, r9d
div esi
mov byte [r10 - 1], al
sub r11, 1
jne 0x140031a10
jmp 0x140031b97
test rbx, rbx
js 0x140031b97
mov r10, rdi
lea r11, [rbx + 1]
nop
movzx r8d, byte [r10]
lea r10, [r10 + 1]
movsxd rax, ecx
mov edx, r8d
and eax, 7
movzx eax, byte [rsp + rax + 0x20]
sub edx, eax
lea eax, [rcx - 3]
and eax, 7
add r9d, edx
inc ecx
mov byte [rsp + rax + 0x20], r8b
mov eax, 0xcccccccd
mul r9d
shr edx, 2
mov byte [r10 - 1], dl
sub r11, 1
jne 0x140031a60
jmp 0x140031b97
xor ecx, ecx
test rbx, rbx
js 0x140031b97
mov r10, rdi
lea r11, [rbx + 1]
nop dword [rax]
nop dword [rax + rax]
movzx r8d, byte [r10]
lea r10, [r10 + 1]
movsxd rax, ecx
mov edx, r8d
and eax, 7
movzx eax, byte [rsp + rax + 0x20]
sub edx, eax
lea eax, [rcx - 4]
and eax, 7
add r9d, edx
inc ecx
mov byte [rsp + rax + 0x20], r8b
mov eax, r9d
shr eax, 2
mov byte [r10 - 1], al
sub r11, 1
jne 0x140031ac0
jmp 0x140031b97
xor ecx, ecx
test rbx, rbx
js 0x140031b97
mov r10, rdi
lea r11, [rbx + 1]
nop
movzx r8d, byte [r10]
lea r10, [r10 + 1]
movsxd rax, ecx
mov edx, r8d
and eax, 7
movzx eax, byte [rsp + rax + 0x20]
sub edx, eax
lea eax, [rcx + 3]
and eax, 7
add r9d, edx
inc ecx
mov byte [rsp + rax + 0x20], r8b
mov eax, 0xaaaaaaab
mul r9d
shr edx, 1
mov byte [r10 - 1], dl
sub r11, 1
jne 0x140031b10
jmp 0x140031b97
xor ecx, ecx
test rbx, rbx
js 0x140031b97
mov r10, rdi
lea r11, [rbx + 1]
nop dword [rax]
movzx r8d, byte [r10]
lea r10, [r10 + 1]
movsxd rax, ecx
mov edx, r8d
and eax, 7
movzx eax, byte [rsp + rax + 0x20]
sub edx, eax
lea eax, [rcx + 2]
and eax, 7
add r9d, edx
inc ecx
mov byte [rsp + rax + 0x20], r8b
mov eax, r9d
shr eax, 1
mov byte [r10 - 1], al
sub r11, 1
jne 0x140031b60
cmp ecx, r14d
jge 0x140031bd6
movsxd r8, ecx
mov eax, r14d
sub eax, ecx
mov ecx, eax
lea r10, [r8 + rdi]
nop word [rax + rax]
mov rax, r8
lea r10, [r10 + 1]
and eax, 7
xor edx, edx
inc r8
movzx eax, byte [rsp + rax + 0x20]
sub r9d, eax
mov eax, r9d
div esi
mov byte [r10 - 1], al
sub rcx, 1
jne 0x140031bb0
add rdi, r15
sub rbp, 1
jne 0x1400319c0
mov r15, qword [rsp + 0x30]
mov r12, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140045970
add rsp, 0x38
pop r14
pop rdi
pop rsi
pop rbx
ret