Function at 0x18017b640
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov qword [rbp + 7], 0xfffffffffffffffe
mov rsi, rcx
mov rax, qword [rcx + 0x50]
mov rbx, qword [rax]
mov rax, qword [rax + 8]
mov qword [rbp + 0x6f], rax
cmp rbx, rax
je 0x18017b9a3
nop word [rax + rax]
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x39], xmm0
mov r8, qword [rbx + 8]
mov rdx, qword [rbx]
test r8, r8
je 0x18017b699
lock inc dword [r8 + 8]
lea rcx, [rbp - 0x39]
call fcn.18007ebc0
nop
mov rdi, qword [rbp - 0x39]
test rdi, rdi
sete al
xor al, 1
je 0x18017b950
mov rdx, qword [rsi + 0x140]
mov rcx, qword [rdx + 8]
sub rcx, qword [rdx]
sar rcx, 4
movzx eax, word [rdi + 4]
cmp rax, rcx
jbe 0x18017b6df
mov rax, qword [rdx + 8]
sub rax, qword [rdx]
sar rax, 4
mov word [rdi + 4], ax
movzx ecx, word [rdi + 4]
test ecx, ecx
je 0x18017b88d
sub ecx, 1
je 0x18017b7c5
cmp ecx, 1
jne 0x18017b950
lea rdx, [rdi + 0x60]
mov rcx, qword [rsi + 0x148]
call fcn.1800f93c0
nop
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x29], xmm0
mov r8, qword [rax + 8]
mov rdx, qword [rax]
test r8, r8
je 0x18017b727
lock inc dword [r8 + 8]
lea rcx, [rbp - 0x29]
call fcn.18007ebc0
nop
cmp qword [rbp - 0x29], 0
sete al
test al, al
je 0x18017b759
lea rdx, [rdi + 0x60]
mov rcx, qword [rsi + 0x148]
call fcn.1800f93c0
mov rcx, rax
lea rdx, [rbp - 0x39]
call fcn.180082b80
mov rcx, qword [rsi + 0x140]
mov rax, qword [rcx]
mov qword [rbp + 0x77], rax
movzx r8d, word [rdi + 4]
shl r8, 4
add r8, rax
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0x7f]
call fcn.180173540
nop
mov rcx, qword [rbp - 0x21]
test rcx, rcx
je 0x18017b7c0
or eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18017b7c0
mov rdi, qword [rbp - 0x21]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
or eax, 0xffffffff
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18017b7c0
mov rcx, qword [rbp - 0x21]
mov rax, qword [rcx]
call qword [rax + 8]
nop
jmp 0x18017b950
lea rdx, [rdi + 0x60]
mov rcx, qword [rsi + 0x148]
call fcn.1800f93c0
nop
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x19], xmm0
mov r8, qword [rax + 8]
mov rdx, qword [rax]
test r8, r8
je 0x18017b7ef
lock inc dword [r8 + 8]
lea rcx, [rbp - 0x19]
call fcn.18007ebc0
nop
cmp qword [rbp - 0x19], 0
sete al
test al, al
je 0x18017b821
lea rdx, [rdi + 0x60]
mov rcx, qword [rsi + 0x148]
call fcn.1800f93c0
mov rcx, rax
lea rdx, [rbp - 0x39]
call fcn.180082b80
mov rcx, qword [rsi + 0x140]
mov rax, qword [rcx]
mov qword [rbp + 0xf], rax
movzx r8d, word [rdi + 4]
shl r8, 4
add r8, rax
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0x17]
call fcn.180173540
nop
mov rcx, qword [rbp - 0x11]
test rcx, rcx
je 0x18017b888
or eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18017b888
mov rdi, qword [rbp - 0x11]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
or eax, 0xffffffff
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18017b888
mov rcx, qword [rbp - 0x11]
mov rax, qword [rcx]
call qword [rax + 8]
nop
jmp 0x18017b950
lea rdx, [rdi + 0x60]
mov rcx, qword [rsi + 0x148]
call fcn.1800f93c0
nop
xorps xmm0, xmm0
movdqu xmmword [rbp - 9], xmm0
mov r8, qword [rax + 8]
mov rdx, qword [rax]
test r8, r8
je 0x18017b8b7
lock inc dword [r8 + 8]
lea rcx, [rbp - 9]
call fcn.18007ebc0
nop
cmp qword [rbp - 9], 0
sete al
test al, al
je 0x18017b8e9
lea rdx, [rdi + 0x60]
mov rcx, qword [rsi + 0x148]
call fcn.1800f93c0
mov rcx, rax
lea rdx, [rbp - 0x39]
call fcn.180082b80
mov rcx, qword [rsi + 0x140]
mov rax, qword [rcx]
mov qword [rbp + 0x1f], rax
movzx r8d, word [rdi + 4]
shl r8, 4
add r8, rax
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0x27]
call fcn.180173540
nop
mov rcx, qword [rbp - 1]
test rcx, rcx
je 0x18017b950
or eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18017b950
mov rdi, qword [rbp - 1]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
or eax, 0xffffffff
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18017b950
mov rcx, qword [rbp - 1]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x18017b98a
or eax, 0xffffffff
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18017b98a
mov rdi, qword [rbp - 0x31]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
or eax, 0xffffffff
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18017b98a
mov rcx, qword [rbp - 0x31]
mov rax, qword [rcx]
call qword [rax + 8]
nop
add rbx, 0x10
mov rax, qword [rsi + 0x50]
mov rax, qword [rax + 8]
mov qword [rbp + 0x6f], rax
cmp rbx, rax
jne 0x18017b680
add rsp, 0xa0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret