Function at 0x140012d90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rbx, r8
mov rdi, rdx
mov rsi, rcx
mov ecx, dword [rsp + 0xa0]
mov rax, qword [0x14008ae00]
xor rax, rsp
mov qword [rsp + 0x40], rax
test ecx, ecx
mov eax, 6
cmovns eax, ecx
movd r15d, xmm3
mov ecx, r15d
and ecx, 0x7fffff
lea edx, [rcx + rcx]
cmp r15d, 0x7fffff
ja 0x140012ded
test ecx, ecx
mov r15d, 0xffffff82
cmove r15d, ecx
jmp 0x140012dfb
shr r15d, 0x17
or edx, 0x1000000
add r15d, 0xffffff81
mov ebp, r15d
neg ebp
cmovs ebp, r15d
mov rcx, rbx
sub rcx, rdi
mov r8d, eax
sub rcx, r8
jl 0x140012e3d
xor r8d, r8d
cmp ebp, 0x64
setb r8b
xor r8, 3
cmp ebp, 0xa
mov r9d, 1
cmovae r9, r8
cmp eax, 1
sbb r9, 0
add r9, 4
cmp rcx, r9
jge 0x140012e4c
mov qword [rsi], rbx
mov dword [rsi + 8], 0x84
jmp 0x140013051
shr r15d, 0x1f
add r15b, r15b
add r15b, 0x2b
cmp eax, 5
ja 0x140012ec9
lea r8d, [rax*4]
lea r9d, [rdx + rdx]
lea r10d, [rdx + rdx]
dec r10d
or r10d, edx
mov cl, 0x18
sub cl, r8b
mov r8d, 1
shl r8d, cl
and r10d, r9d
and r8d, r10d
add r8d, edx
mov ecx, r8d
shr ecx, 0x18
or cl, 0x30
mov byte [rdi], cl
test eax, eax
je 0x140012f6a
mov byte [rdi + 1], 0x2e
mov edx, r8d
shr edx, 0x14
and edx, 0xf
lea rcx, [0x1400577b0]
movzx edx, byte [rdx + rcx]
mov byte [rdi + 2], dl
cmp eax, 1
jne 0x140012f6f
add rdi, 3
jmp 0x140012fd4
mov ecx, edx
shr ecx, 0x18
or cl, 0x30
mov byte [rdi], cl
mov byte [rdi + 1], 0x2e
mov r8d, edx
shr r8d, 0x14
and r8d, 0xf
lea rcx, [0x1400577b0]
movzx r8d, byte [r8 + rcx]
mov byte [rdi + 2], r8b
mov r8d, edx
shr r8d, 0x10
and r8d, 0xf
movzx r8d, byte [r8 + rcx]
mov byte [rdi + 3], r8b
mov r8d, edx
shr r8d, 0xc
and r8d, 0xf
movzx r8d, byte [r8 + rcx]
mov byte [rdi + 4], r8b
mov r8d, edx
shr r8d, 8
and r8d, 0xf
movzx r8d, byte [r8 + rcx]
mov byte [rdi + 5], r8b
mov r8d, edx
shr r8d, 4
and r8d, 0xf
movzx r8d, byte [r8 + rcx]
mov byte [rdi + 6], r8b
and edx, 0xf
movzx ecx, byte [rdx + rcx]
mov byte [rdi + 7], cl
add rdi, 8
add eax, 0xfffffffa
je 0x140012fd4
mov r14d, eax
mov rcx, rdi
mov dl, 0x30
mov r8, r14
call fcn.140055dc0
add rdi, r14
jmp 0x140012fd4
inc rdi
jmp 0x140012fd4
mov edx, r8d
shr edx, 0x10
and edx, 0xf
movzx edx, byte [rdx + rcx]
mov byte [rdi + 3], dl
cmp eax, 2
jne 0x140012f8a
add rdi, 4
jmp 0x140012fd4
mov edx, r8d
shr edx, 0xc
and edx, 0xf
movzx edx, byte [rdx + rcx]
mov byte [rdi + 4], dl
cmp eax, 3
jne 0x140012fa5
add rdi, 5
jmp 0x140012fd4
mov edx, r8d
shr edx, 8
and edx, 0xf
movzx edx, byte [rdx + rcx]
mov byte [rdi + 5], dl
cmp eax, 4
jne 0x140012fc0
add rdi, 6
jmp 0x140012fd4
shr r8d, 4
and r8d, 0xf
movzx eax, byte [r8 + rcx]
mov byte [rdi + 6], al
add rdi, 7
mov byte [rdi], 0x70
mov byte [rdi + 1], r15b
xor r14d, r14d
mov eax, 0xcccccccd
nop word cs:[rax + rax]
mov ecx, ebp
imul rcx, rax
shr rcx, 0x23
lea edx, [rcx + rcx]
lea edx, [rdx + rdx*4]
mov r8d, ebp
sub r8d, edx
or r8b, 0x30
mov byte [rsp + r14 + 0x3f], r8b
dec r14
cmp ebp, 9
mov ebp, ecx
ja 0x140012ff0
add rdi, 2
mov r8, r14
neg r8
mov rcx, rbx
sub rcx, rdi
mov eax, 0x84
cmp rcx, r8
jl 0x14001304b
lea rdx, [rsp + r14]
add rdx, 0x40
mov rcx, rdi
call fcn.140055720
sub rdi, r14
xor eax, eax
mov rbx, rdi
mov qword [rsi], rbx
mov dword [rsi + 8], eax
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14002bd70
mov rax, rsi
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret