Function at 0x140013790
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x90
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x48], r13
mov qword [rbp - 0x40], r14
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x18]
mov rbx, qword [rax]
mov qword [rbp - 0x10], rbx
mov r9d, 0xffff
mov rdi, qword [rbp + 0x10]
mov rsi, qword [rdi]
cmp rsi, rbx
mov qword [rbp - 0x38], rbx
jae 0x1400139f0
mov rbx, qword [rbp + 0x18]
mov r10, qword [rbx + 8]
movzx r8d, byte [r10 + rsi]
test r8b, 0x80
je 0x140013962
mov edx, 1
movzx r12d, r8b
mov r11d, r12d
mov al, r11b
mov cl, dl
shl al, cl
test al, 0x80
jne 0x140013819
cmp edx, 1
je 0x140013990
jmp 0x140013826
inc edx
cmp edx, 4
ja 0x140013990
jmp 0x140013803
mov r9d, 1
mov ecx, 7
sub ecx, edx
shl r9d, cl
dec r9d
movzx r10d, r8b
and r9d, r10d
lea r11d, [rdx - 1]
mov r11d, r11d
add r11, rsi
cmp r11, qword [rbp - 0x10]
jae 0x140013990
lea r12, [rsi + 1]
mov r13, qword [rbx]
cmp r12, r13
jae 0x140013a13
mov r10, qword [rbx + 8]
add r10, rsi
movzx eax, byte [r10 + 1]
mov r11b, r8b
and r11b, 0xfe
cmp r11b, 0xc0
je 0x140013990
cmp r8b, 0xe0
jne 0x14001389b
mov r12b, al
and r12b, 0xe0
cmp r12b, 0x80
je 0x140013990
cmp r8b, 0xf0
jne 0x1400138b2
mov r13b, al
and r13b, 0xf0
cmp r13b, 0x80
je 0x140013990
cmp r8b, 0xf8
jne 0x1400138c6
mov cl, al
and cl, 0xf8
cmp cl, 0x80
je 0x140013990
cmp r8b, 0xfc
jne 0x1400138dd
mov r10b, al
and r10b, 0xfc
cmp r10b, 0x80
je 0x140013990
mov r11d, 1
cmp edx, 1
je 0x140013933
mov r8d, r11d
add r8, rsi
mov r12, qword [rbx]
cmp r8, r12
mov qword [rbp - 0x38], r8
jae 0x140013a2e
mov r10d, r11d
add r10, rsi
mov r12, qword [rbx + 8]
movzx r8d, byte [r10 + r12]
mov r13d, r8d
and r13b, 0xc0
cmp r13b, 0x80
jne 0x140013990
shl r9d, 6
mov r14b, r8b
and r14d, 0x3f
or r9d, r14d
inc r11d
cmp r11d, edx
jne 0x1400138e8
cmp r9d, 0xd800
jb 0x140013952
cmp r9d, 0xdfff
jbe 0x14001394e
cmp r9d, 0x10ffff
jbe 0x140013952
xor eax, eax
jmp 0x140013957
mov eax, 1
xor al, 1
jne 0x140013990
mov ecx, edx
add rsi, rcx
jmp 0x140013969
movzx r9d, r8b
inc rsi
mov rdx, qword [rbp + 0x10]
mov qword [rdx], rsi
mov eax, r9d
mov rbx, qword [rbp - 0x68]
mov rsi, qword [rbp - 0x60]
mov rdi, qword [rbp - 0x58]
mov r12, qword [rbp - 0x50]
mov r13, qword [rbp - 0x48]
mov r14, qword [rbp - 0x40]
mov rsp, rbp
pop rbp
ret
mov dword [rbp - 8], r9d
lea rbx, str.invalid_UTF_8_sequence
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], 0x16
lea rdi, str.srccoreinternalutf.d
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x30], 0x17
mov r9d, 0x124
lea r8, [rbp - 0x30]
mov rdx, rsi
lea rcx, [rbp - 0x20]
call fcn.140022520
mov eax, dword [rbp - 8]
mov rbx, qword [rbp - 0x68]
mov rsi, qword [rbp - 0x60]
mov rdi, qword [rbp - 0x58]
mov r12, qword [rbp - 0x50]
mov r13, qword [rbp - 0x48]
mov r14, qword [rbp - 0x40]
mov rsp, rbp
pop rbp
ret
mov rbx, qword [rbp + 0x18]
mov r8, qword [rbp - 0x38]
mov qword [rbp - 0x70], r8
mov r9, rsi
xor r8d, r8d
mov edx, 0xdf
lea rcx, str.srccoreinternalutf.d
call fcn.140012a70
mov qword [rbp - 0x70], r13
mov r9, r12
xor r8d, r8d
mov edx, 0x107
lea rcx, str.srccoreinternalutf.d
call fcn.140012a70
mov qword [rbp - 0x70], r12
mov r9, r8
xor r8d, r8d
mov edx, 0x111
lea rcx, str.srccoreinternalutf.d
call fcn.140012a70
int3