Function at 0x100bf5c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub rsp, 0x38
mov r9d, dword [rdx + 8]
mov r10d, dword [rdx + 4]
movzx r11d, word [rcx + 8]
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x50], rsi
lea rbp, [rcx + 8]
mov qword [rsp + 0x58], rdi
mov rdi, rdx
xor edx, edx
lea eax, [r9 + 1]
mov rsi, rcx
mov qword [rsp + 0x28], r13
mov r13d, 1
mov r8d, r13d
imul eax, r11d
dec eax
div r10d
lea rdx, [rcx + 0xa]
movzx ecx, word [rcx + 0xa]
cmp ecx, eax
jbe 0x100bf62f
nop
nop
nop
nop
movzx ecx, word [rdx + 2]
add rdx, 2
inc r8d
cmp ecx, eax
ja 0x100bf620
mov ecx, dword [rdi]
xor edx, edx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x30], r12
lea r12d, [r8 - 1]
movzx eax, word [rsi + r12*2 + 8]
imul eax, r10d
div r11d
xor edx, edx
lea ebx, [rax + rcx - 1]
mov eax, r8d
movzx eax, word [rsi + rax*2 + 8]
imul eax, r10d
div r11d
sub r9d, eax
add eax, ecx
mov dword [rdi], eax
mov dword [rdi + 8], r9d
nop
mov ecx, dword [rdi]
mov eax, ecx
xor eax, ebx
bt eax, 0xf
jae 0x100bf694
bt ecx, 0xe
jae 0x100bf6ff
bt ebx, 0xe
jb 0x100bf6ff
and ecx, 0x3fff
bts ebx, 0xe
mov dword [rdi], ecx
mov eax, dword [rdi]
and ebx, 0x7fff
and eax, 0x7fff
add ebx, ebx
add eax, eax
or ebx, r13d
mov dword [rdi], eax
cmp dword [rdi + 0x10], 0x10000
jb 0x100bf6e0
mov rax, qword [rdi + 0x18]
lea rcx, [rdi + 0x18]
cmp rax, qword [rcx + 8]
jb 0x100bf6cc
call fcn.100068fc
movzx r11d, al
jmp 0x100bf6d5
mov r11b, byte [rax]
inc rax
mov qword [rcx], rax
movzx eax, r11b
bts eax, 8
mov dword [rdi + 0x10], eax
mov eax, dword [rdi + 0x10]
mov ecx, eax
add eax, eax
mov dword [rdi + 0x10], eax
mov eax, dword [rdi + 8]
shr ecx, 7
add eax, eax
and ecx, r13d
or eax, ecx
mov dword [rdi + 8], eax
jmp 0x100bf670
sub ebx, ecx
movsxd rax, r12d
mov qword [rsp + 0x20], r14
inc ebx
lea rcx, [rsi + rax*2 + 8]
mov dword [rdi + 4], ebx
movzx r14d, byte [r12 + rsi + 0x8a]
nop
add word [rcx], 8
mov eax, r12d
sub rcx, 2
add r12d, 0xffffffff
test eax, eax
jne 0x100bf720
cmp word [rbp], 0xed8
jbe 0x100bf852
add dword [rsi + 4], 0xffffffff
jne 0x100bf827
xor ebx, ebx
mov dword [rsi + 4], 0x32
cmp dword [rsi], ebx
mov r9d, ebx
jbe 0x100bf780
mov r8, rbp
nop
movzx ecx, word [r8]
movzx eax, word [r8 + 2]
inc r9d
sub ecx, eax
add r8, 2
inc ecx
sar ecx, 1
mov word [r8 - 2], cx
cmp r9d, dword [rsi]
jb 0x100bf760
mov eax, dword [rsi]
dec eax
je 0x100bf801
mov r12, 0xffffffffffffff77
lea r11, [rsi + 0x8a]
sub r12, rsi
nop
nop
nop
cmp r13d, dword [rsi]
mov r9d, r13d
lea r8, [r11 + r12]
jae 0x100bf7ed
lea rdx, [rbp + 2]
movzx r10d, word [rbp]
movzx eax, word [rdx]
cmp r10w, ax
jae 0x100bf7de
movzx ecx, byte [r11]
mov word [rbp], ax
movzx eax, byte [rsi + r8 + 0x8a]
mov byte [r11], al
mov word [rdx], r10w
mov byte [rsi + r8 + 0x8a], cl
inc r9d
inc r8
add rdx, 2
cmp r9d, dword [rsi]
jb 0x100bf7b0
mov eax, dword [rsi]
inc ebx
inc r13d
dec eax
add rbp, 2
inc r11
cmp ebx, eax
jb 0x100bf7a0
movsxd rcx, ebx
lea rdx, [rsi + rcx*2 + 8]
nop
nop
movzx ecx, word [rdx + 2]
sub rdx, 2
add word [rdx + 2], cx
mov ecx, ebx
add ebx, 0xffffffff
test ecx, ecx
jne 0x100bf810
jmp 0x100bf852
mov edx, dword [rsi]
dec edx
movsxd rax, edx
lea rcx, [rsi + rax*2 + 8]
movzx eax, word [rcx + 2]
shr word [rcx], 1
cmp word [rcx], ax
ja 0x100bf845
inc ax
mov word [rcx], ax
mov eax, edx
sub rcx, 2
add edx, 0xffffffff
test eax, eax
jne 0x100bf833
mov r13, qword [rsp + 0x28]
mov r12, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov eax, r14d
mov r14, qword [rsp + 0x20]
add rsp, 0x38
ret