Function at 0x14005db70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
movsxd rax, edx
mov r13d, dword [rcx + 0x44058]
mov r12, qword [rcx + 0x44050]
mov r14d, dword [rcx + 0x10]
mov ebx, dword [rcx + 0x14]
mov rdx, qword [rcx + 8]
mov qword [rsp + 0x38], rdx
mov r9d, 0x400
xor r11d, r11d
shl rax, 0x15
add rax, rcx
shl r13, 0xb
add r13, rax
xor esi, esi
mov edi, ebx
mov qword [rsp + 0x28], rcx
jmp 0x14005dbe7
movsx r11d, word [r12 + r15*4]
mov esi, eax
mov eax, r9d
sub eax, esi
mov ebx, edi
cmp eax, 1
jle 0x14005dcbb
movsxd r15, r11d
mov ebp, r14d
shr ebp, 0xb
movzx eax, word [r13 + r15*2 + 0x4405c]
imul ebp, eax
sub edi, ebp
jae 0x14005dc20
mov edx, 0x800
sub edx, eax
shr edx, 4
add edx, eax
mov r14d, ebp
mov edi, ebx
jmp 0x14005dc2f
sub r14d, ebp
mov dword [rcx + 0x14], edi
mov edx, eax
shr edx, 4
sub eax, edx
mov edx, eax
lea rax, [r15*2 + 0x4405c]
add rax, r13
mov dword [rcx + 0x10], r14d
mov word [rax], dx
cmp r14d, 0xffffff
ja 0x14005dca2
shl edi, 8
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax + 8]
xor edx, edx
lea r8, [rsp + 0x25]
mov qword [rsp + 0x40], rsi
mov esi, r9d
mov r9d, 1
mov dword [rsp + 0x34], r14d
mov r14d, edi
mov edi, r11d
call qword [rax]
mov r11d, edi
mov edi, r14d
mov r14d, dword [rsp + 0x34]
mov r9d, esi
mov rsi, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x28]
movzx eax, byte [rsp + 0x25]
or edi, eax
mov dword [rcx + 0x14], edi
shl r14d, 8
mov dword [rcx + 0x10], r14d
movsx eax, word [r12 + r15*4 + 2]
cmp ebx, ebp
jae 0x14005dbd0
inc r11d
mov r9d, eax
jmp 0x14005dbda
lea eax, [rsi + 1]
cmp esi, 0x400
mov edx, 0x3ff
cmovb edx, esi
mov dword [rcx + 0x44058], edx
cmp eax, 0x400
jne 0x14005ded7
mov esi, dword [rcx + 0x44018]
test esi, esi
je 0x14005ddb7
mov r15, qword [rcx + 8]
mov r12d, 1
lea rbx, [rsp + 0x26]
jmp 0x14005dd14
mov r14d, ebp
add r12d, r12d
or r13d, r12d
mov r12d, r13d
dec esi
je 0x14005ddaf
mov rax, qword [rcx + 0x44020]
mov r10d, r12d
mov ebp, r14d
shr ebp, 0xb
movzx edx, word [rax + r10*2]
imul ebp, edx
mov r8d, edi
sub r8d, ebp
jae 0x14005dd50
mov r8d, 0x800
sub r8d, edx
shr r8d, 4
add r8d, edx
xor r13d, r13d
jmp 0x14005dd70
sub r14d, ebp
mov dword [rcx + 0x14], r8d
mov r9d, edx
shr r9d, 4
sub edx, r9d
mov r13d, 1
mov ebp, r14d
mov edi, r8d
mov r8d, edx
mov dword [rcx + 0x10], ebp
mov word [rax + r10*2], r8w
cmp ebp, 0xffffff
ja 0x14005dd00
shl edi, 8
mov rcx, qword [r15 + 8]
xor edx, edx
mov r8, rbx
mov r9d, 1
call qword [r15]
mov rcx, qword [rsp + 0x28]
movzx eax, byte [rsp + 0x26]
or edi, eax
mov dword [rcx + 0x14], edi
shl ebp, 8
mov dword [rcx + 0x10], ebp
jmp 0x14005dd00
mov eax, dword [rcx + 0x44018]
jmp 0x14005ddbf
mov r13d, 1
xor eax, eax
mov edx, 0xffffffff
shlx eax, edx, eax
add eax, r13d
cmp eax, 0x10000
jb 0x14005ded2
movzx esi, ax
mov r15d, dword [rcx + 0x44028]
test r15d, r15d
je 0x14005deba
mov r12, qword [rcx + 8]
mov r13d, 1
mov ebp, r14d
jmp 0x14005de15
add r13d, r13d
or ebx, r13d
mov r14d, ebp
mov r13d, ebx
dec r15d
je 0x14005deb2
mov rax, qword [rcx + 0x44030]
mov r10d, r13d
shr ebp, 0xb
movzx edx, word [rax + r10*2]
imul ebp, edx
mov r8d, edi
sub r8d, ebp
jae 0x14005de50
mov r8d, 0x800
sub r8d, edx
shr r8d, 4
add r8d, edx
xor ebx, ebx
jmp 0x14005de6f
sub r14d, ebp
mov dword [rcx + 0x14], r8d
mov r9d, edx
shr r9d, 4
sub edx, r9d
mov ebx, 1
mov ebp, r14d
mov edi, r8d
mov r8d, edx
mov dword [rcx + 0x10], ebp
mov word [rax + r10*2], r8w
cmp ebp, 0xffffff
ja 0x14005de00
shl edi, 8
mov rcx, qword [r12 + 8]
xor edx, edx
lea r8, [rsp + 0x27]
mov r9d, 1
call qword [r12]
mov rcx, qword [rsp + 0x28]
movzx eax, byte [rsp + 0x27]
or edi, eax
mov dword [rcx + 0x14], edi
shl ebp, 8
mov dword [rcx + 0x10], ebp
jmp 0x14005de00
mov eax, dword [rcx + 0x44028]
jmp 0x14005dec1
mov ebx, 1
xor eax, eax
mov ecx, 0xffffffff
shlx eax, ecx, eax
add eax, ebx
shl eax, 0x10
or eax, esi
add eax, 0x400
mov ecx, eax
shr ecx, 1
and eax, 1
neg eax
xor eax, ecx
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret