Function at 0x180019658
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov edx, dword [rcx + 0x24]
mov r8d, dword [rcx + 0x54]
mov r10d, dword [rcx + 0x50]
mov ebp, dword [rcx + 0x28]
mov r12d, dword [rcx + 0x2c]
mov rsi, qword [rcx + 0x30]
mov r13, qword [rcx + 0x38]
mov r9d, edx
mov r15d, 0x7fff
and r9d, r15d
mov rbx, rcx
mov dword [rsp + 0x90], edx
mov dword [rsp + 0x80], r8d
mov dword [rsp + 0x88], r10d
mov dword [rsp + 0x98], r9d
xor edi, edi
mov rcx, qword [rbx + 0xb8]
cmp rcx, rdi
jne 0x1800196d3
cmp dword [rbx + 0xa8], edi
je 0x180019b81
cmp ebp, edi
je 0x180019b81
lea r14d, [rbp + rdx]
and r14d, r15d
mov r15d, 0x1000
sub r15d, ebp
cmp rcx, r15
cmovb r15d, ecx
mov eax, r15d
add ebp, r15d
sub rcx, rax
cmp r15d, edi
mov qword [rbx + 0xb8], rcx
je 0x1800197aa
mov rdx, qword [rbx + 0xb0]
mov eax, 0x8000
mov ecx, r15d
sub eax, r14d
cmp eax, r15d
cmovb ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], ecx
lea rcx, [r14 + rbx + 0xc8]
mov r8, rax
mov qword [rsp + 0x28], rax
call sub.ntdll.dll_memcpy
cmp r14d, 0x101
jae 0x180019768
mov ecx, dword [rsp + 0x20]
mov rdx, qword [rbx + 0xb0]
mov eax, 0x101
sub eax, r14d
cmp ecx, eax
cmovb eax, ecx
lea rcx, [r14 + rbx + 0x80c8]
mov r8d, eax
call sub.ntdll.dll_memcpy
mov rax, qword [rsp + 0x28]
add qword [rbx + 0xb0], rax
mov eax, dword [rsp + 0x20]
add r14d, eax
and r14d, 0x7fff
sub r15d, eax
jne 0x180019704
mov r10d, dword [rsp + 0x88]
mov edx, dword [rsp + 0x90]
mov r9d, dword [rsp + 0x98]
mov r8d, dword [rsp + 0x80]
mov eax, 0x8000
sub eax, ebp
cmp eax, r12d
cmovb r12d, eax
cmp dword [rbx + 0xa8], edi
jne 0x1800197cc
cmp ebp, 0x1000
jb 0x180019b81
cmp ebp, 4
jb 0x180019a7e
mov r14d, dword [rsp + 0x80]
mov eax, r9d
mov r8d, 1
lea r15, [rax + rbx + 0xc8]
mov qword [rsp + 0x88], r15
mov r11d, dword [r15]
and r11d, 0xffffff
mov eax, r11d
shr eax, 0x11
xor eax, r11d
and eax, 0xfff
movzx ecx, word [rbx + rax*2 + 0x292aa]
mov word [rbx + rax*2 + 0x292aa], dx
movzx eax, dx
sub ax, cx
movzx r9d, ax
cmp r9d, r12d
mov dword [rsp + 0x80], r9d
ja 0x18001998d
and ecx, 0x7fff
lea r9, [rcx + rbx + 0xc8]
mov eax, dword [r9]
and eax, 0xffffff
cmp eax, r11d
jne 0x18001998d
mov r8, r15
mov r15d, 0x20
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x1800198af
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x1800198af
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x1800198af
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x1800198af
add r15d, 0xffffffff
jne 0x180019861
mov al, byte [r9]
mov r9d, dword [rsp + 0x80]
mov ecx, edi
mov rdx, r8
sub rdx, qword [rsp + 0x88]
sar rdx, 1
cmp byte [r8], al
sete cl
cmp r15d, edi
lea eax, [rcx + rdx*2]
jne 0x1800198e4
mov eax, r9d
neg eax
sbb eax, eax
and eax, 0x102
cmp eax, 3
jb 0x180019980
jne 0x1800198fc
cmp r9d, 0x2000
jae 0x180019980
cmp eax, ebp
lea r11, [0x180000000]
mov r8d, ebp
cmovb r8d, eax
add r9d, 0xffffffff
mov word [rsi + 1], r9w
lea eax, [r8 - 3]
mov edx, r9d
mov byte [rsi], al
mov al, byte [r13]
shr rdx, 8
shr al, 1
add rsi, 3
or al, 0x80
mov byte [r13], al
mov eax, r9d
and eax, 0x1ff
cmp r9d, 0x200
movzx ecx, byte [rax + r11 + 0x23c30]
movzx eax, byte [rdx + r11 + 0x24030]
mov edx, dword [rsp + 0x90]
cmovb eax, ecx
add word [rbx + rax*2 + 0x840a], 1
lea eax, [r8 - 3]
mov ecx, eax
movzx eax, word [r11 + rax*2 + 0x23930]
add word [rbx + rax*2 + 0x81ca], 1
jmp 0x1800199a4
mov edx, dword [rsp + 0x90]
mov r8d, 1
mov byte [rsi], r11b
shr byte [r13], 1
movzx eax, r11b
add rsi, r8
add word [rbx + rax*2 + 0x81ca], r8w
add r10d, 0xffffffff
mov dword [rsp + 0x88], r10d
jne 0x1800199c7
mov r10d, 8
mov r13, rsi
add rsi, 1
mov dword [rsp + 0x88], r10d
mov r9d, dword [rsp + 0x98]
lea eax, [r8 + r12]
add r14d, r8d
add edx, r8d
mov r12d, 0x8000
mov r15d, 0x7fff
cmp eax, r12d
mov dword [rsp + 0x80], r14d
mov dword [rsp + 0x90], edx
cmovb r12d, eax
add r9d, r8d
lea rax, [rbx + 0x192a2]
and r9d, r15d
sub ebp, r8d
cmp rsi, rax
mov dword [rsp + 0x98], r9d
jbe 0x180019a73
mov dword [rbx + 0x24], edx
mov rcx, rbx
xor edx, edx
mov dword [rbx + 0x28], ebp
mov dword [rbx + 0x2c], r12d
mov dword [rbx + 0x54], r14d
mov qword [rbx + 0x30], rsi
mov qword [rbx + 0x38], r13
mov dword [rbx + 0x50], r10d
call fcn.1800190e0
cmp eax, edi
jne 0x180019ba2
mov r14d, dword [rbx + 0x54]
mov r10d, dword [rbx + 0x50]
mov rsi, qword [rbx + 0x30]
mov r13, qword [rbx + 0x38]
mov edx, dword [rsp + 0x90]
mov r9d, dword [rsp + 0x98]
mov dword [rsp + 0x80], r14d
mov dword [rsp + 0x88], r10d
cmp ebp, 4
jae 0x1800197dd
jmp 0x180019a84
mov r15d, 0x7fff
cmp ebp, edi
mov r8d, dword [rsp + 0x80]
je 0x1800196b3
lea r14, [rbx + 0x192a2]
add r8d, 1
mov eax, r9d
mov cl, byte [rax + rbx + 0xc8]
mov dword [rsp + 0x80], r8d
mov byte [rsi], cl
shr byte [r13], 1
add rsi, 1
add r10d, 0xffffffff
mov dword [rsp + 0x88], r10d
jne 0x180019ade
mov r10d, 8
mov r13, rsi
add rsi, 1
mov dword [rsp + 0x88], r10d
add edx, 1
movzx eax, cl
add word [rbx + rax*2 + 0x81ca], 1
lea eax, [r12 + 1]
mov r12d, 0x8000
cmp eax, r12d
mov dword [rsp + 0x90], edx
cmovb r12d, eax
add r9d, 1
add ebp, 0xffffffff
and r9d, r15d
cmp rsi, r14
mov dword [rsp + 0x98], r9d
jbe 0x180019b74
mov dword [rbx + 0x24], edx
mov rcx, rbx
xor edx, edx
mov dword [rbx + 0x28], ebp
mov dword [rbx + 0x2c], r12d
mov dword [rbx + 0x54], r8d
mov qword [rbx + 0x30], rsi
mov qword [rbx + 0x38], r13
mov dword [rbx + 0x50], r10d
call fcn.1800190e0
cmp eax, edi
jne 0x180019ba2
mov r8d, dword [rbx + 0x54]
mov r10d, dword [rbx + 0x50]
mov rsi, qword [rbx + 0x30]
mov r13, qword [rbx + 0x38]
mov edx, dword [rsp + 0x90]
mov r9d, dword [rsp + 0x98]
mov dword [rsp + 0x80], r8d
mov dword [rsp + 0x88], r10d
cmp ebp, edi
jne 0x180019a9b
jmp 0x1800196b3
mov dword [rbx + 0x24], edx
mov dword [rbx + 0x28], ebp
mov dword [rbx + 0x2c], r12d
mov dword [rbx + 0x54], r8d
mov qword [rbx + 0x30], rsi
mov qword [rbx + 0x38], r13
mov dword [rbx + 0x50], r10d
mov eax, 1
jmp 0x180019ba8
setge dil
mov eax, edi
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret