Function at 0x14005d980
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 r9d, dword [rcx + 0x24]
mov edx, dword [rcx + 0x2c]
mov r14d, dword [rcx + 0x54]
mov r13d, dword [rcx + 0x28]
mov r12d, dword [rcx + 0x50]
mov rdi, qword [rcx + 0x30]
mov r15, qword [rcx + 0x38]
mov r10d, r9d
mov rbx, rcx
and r10d, 0x7fff
mov dword [rsp + 0x90], r9d
mov dword [rsp + 0x80], edx
mov dword [rsp + 0x88], r10d
mov dword [rsp + 0x98], r14d
nop dword [rax + rax]
mov rcx, qword [rbx + 0xb8]
test rcx, rcx
jne 0x14005da01
cmp dword [rbx + 0xa8], ecx
je 0x14005de7a
test r13d, r13d
je 0x14005de7a
mov ebp, 0x1000
lea esi, [r9 + r13]
sub ebp, r13d
and esi, 0x7fff
cmp rcx, rbp
jae 0x14005da1e
mov ebp, dword [rbx + 0xb8]
mov eax, ebp
add r13d, ebp
sub rcx, rax
mov qword [rbx + 0xb8], rcx
test ebp, ebp
je 0x14005dad8
nop word [rax + rax]
mov rdx, qword [rbx + 0xb0]
mov eax, 0x8000
mov r14d, ebp
sub eax, esi
cmp eax, ebp
cmovb r14d, eax
mov eax, esi
add rax, rbx
mov r8d, r14d
lea rcx, [rax + 0xc8]
mov qword [rsp + 0x20], rax
call fcn.1401f3020
cmp esi, 0x101
jae 0x14005daa1
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rbx + 0xb0]
mov eax, 0x101
sub eax, esi
cmp r14d, eax
cmovb eax, r14d
add rcx, 0x80c8
mov r8d, eax
call fcn.1401f3020
add esi, r14d
mov eax, r14d
add qword [rbx + 0xb0], rax
and esi, 0x7fff
sub ebp, r14d
jne 0x14005da40
mov edx, dword [rsp + 0x80]
mov r10d, dword [rsp + 0x88]
mov r14d, dword [rsp + 0x98]
mov r9d, dword [rsp + 0x90]
mov eax, 0x8000
sub eax, r13d
cmp eax, edx
cmovb edx, eax
cmp dword [rbx + 0xa8], 0
mov dword [rsp + 0x80], edx
jne 0x14005db02
cmp r13d, 0x1000
jb 0x14005de7a
cmp r13d, 4
jb 0x14005dd8a
nop dword [rax]
mov eax, r10d
lea rbp, [rbx + 0xc8]
mov r8d, 1
add rbp, rax
mov r11d, dword [rbp]
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], r9w
movzx eax, r9w
sub ax, cx
movzx esi, ax
cmp esi, edx
ja 0x14005dcaa
and ecx, 0x7fff
lea r9, [rbx + 0xc8]
mov eax, ecx
add r9, rax
mov eax, dword [r9]
and eax, 0xffffff
cmp eax, r11d
jne 0x14005dcaa
mov rax, rbp
lea r10d, [r8 + 0x1f]
nop dword [rax]
movzx ecx, word [r9 + 2]
add r9, 2
add rax, 2
cmp word [rax], cx
jne 0x14005dbdd
movzx ecx, word [r9 + 2]
add r9, 2
add rax, 2
cmp word [rax], cx
jne 0x14005dbdd
movzx ecx, word [r9 + 2]
add r9, 2
add rax, 2
cmp word [rax], cx
jne 0x14005dbdd
movzx ecx, word [r9 + 2]
add r9, 2
add rax, 2
cmp word [rax], cx
jne 0x14005dbdd
dec r10d
jne 0x14005db90
movzx ecx, byte [r9]
xor edx, edx
mov r8, rax
sub r8, rbp
sar r8, 1
cmp byte [rax], cl
sete dl
lea eax, [rdx + r8*2]
test r10d, r10d
jne 0x14005dc05
mov eax, esi
neg eax
sbb eax, eax
and eax, 0x102
cmp eax, 3
jb 0x14005dc95
jne 0x14005dc18
cmp esi, 0x2000
jae 0x14005dc95
mov r10d, dword [rsp + 0x88]
cmp eax, r13d
lea r9, [0x140000000]
mov r8d, r13d
cmovb r8d, eax
dec esi
add rdi, 3
mov word [rdi - 2], si
lea eax, [r8 - 3]
mov edx, esi
mov byte [rdi - 3], al
movzx eax, byte [r15]
shr rdx, 8
shr al, 1
or al, 0x80
mov byte [r15], al
mov eax, esi
and eax, 0x1ff
cmp esi, 0x200
movzx ecx, byte [rax + r9 + 0x2a01f0]
movzx eax, byte [rdx + r9 + 0x2a0170]
mov edx, dword [rsp + 0x80]
cmovb eax, ecx
inc word [rbx + rax*2 + 0x840a]
lea eax, [r8 - 3]
mov ecx, eax
movzx eax, word [r9 + rax*2 + 0x2a03f0]
jmp 0x14005dcb7
mov edx, dword [rsp + 0x80]
mov r10d, dword [rsp + 0x88]
mov r8d, 1
mov byte [rdi], r11b
inc rdi
shr byte [r15], 1
movzx eax, r11b
inc word [rbx + rax*2 + 0x81ca]
dec r12d
jne 0x14005dcd0
mov r15, rdi
mov r12d, 8
inc rdi
mov r9d, dword [rsp + 0x90]
lea eax, [r8 + rdx]
add r14d, r8d
add r9d, r8d
mov edx, 0x8000
mov dword [rsp + 0x98], r14d
cmp eax, edx
mov dword [rsp + 0x90], r9d
cmovb edx, eax
add r10d, r8d
lea rax, [rbx + 0x192a2]
and r10d, 0x7fff
sub r13d, r8d
mov dword [rsp + 0x80], edx
mov dword [rsp + 0x88], r10d
cmp rdi, rax
jbe 0x14005dd80
mov dword [rbx + 0x2c], edx
mov rcx, rbx
xor edx, edx
mov dword [rbx + 0x24], r9d
mov dword [rbx + 0x28], r13d
mov dword [rbx + 0x54], r14d
mov qword [rbx + 0x30], rdi
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x50], r12d
call fcn.14005d380
test eax, eax
jne 0x14005de9c
mov r14d, dword [rbx + 0x54]
mov rdi, qword [rbx + 0x30]
mov r15, qword [rbx + 0x38]
mov r12d, dword [rbx + 0x50]
mov edx, dword [rsp + 0x80]
mov r10d, dword [rsp + 0x88]
mov r9d, dword [rsp + 0x90]
mov dword [rsp + 0x98], r14d
cmp r13d, 4
jae 0x14005db10
test r13d, r13d
je 0x14005d9e0
lea rsi, [rbx + 0x192a2]
nop word [rax + rax]
inc r14d
mov eax, r10d
inc rdi
movzx ecx, byte [rax + rbx + 0xc8]
mov dword [rsp + 0x98], r14d
mov byte [rdi - 1], cl
shr byte [r15], 1
dec r12d
jne 0x14005ddd0
mov r15, rdi
mov r12d, 8
inc rdi
inc r9d
movzx eax, cl
inc word [rbx + rax*2 + 0x81ca]
lea eax, [rdx + 1]
mov edx, 0x8000
cmp eax, edx
inc r10d
mov dword [rsp + 0x90], r9d
cmovb edx, eax
and r10d, 0x7fff
dec r13d
mov dword [rsp + 0x88], r10d
mov dword [rsp + 0x80], edx
cmp rdi, rsi
jbe 0x14005de6c
mov dword [rbx + 0x2c], edx
mov rcx, rbx
xor edx, edx
mov dword [rbx + 0x24], r9d
mov dword [rbx + 0x28], r13d
mov dword [rbx + 0x54], r14d
mov qword [rbx + 0x30], rdi
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x50], r12d
call fcn.14005d380
test eax, eax
jne 0x14005de9c
mov r14d, dword [rbx + 0x54]
mov rdi, qword [rbx + 0x30]
mov r15, qword [rbx + 0x38]
mov r12d, dword [rbx + 0x50]
mov edx, dword [rsp + 0x80]
mov r10d, dword [rsp + 0x88]
mov r9d, dword [rsp + 0x90]
mov dword [rsp + 0x98], r14d
test r13d, r13d
jne 0x14005dda0
jmp 0x14005d9e0
mov dword [rbx + 0x24], r9d
mov dword [rbx + 0x28], r13d
mov dword [rbx + 0x2c], edx
mov dword [rbx + 0x54], r14d
mov qword [rbx + 0x30], rdi
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x50], r12d
mov eax, 1
jmp 0x14005dea4
mov eax, 0
setns al
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret