Function at 0x140056d74
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor r11d, r11d
mov ebp, r9d
mov r13, r8
mov r14, rdx
mov rsi, rcx
cmp dword [rdx], r11d
je 0x14005704a
cmp dword [rdx + 4], r11d
je 0x14005704a
mov r9, qword [r8]
mov eax, 0x10000000
cmp dword [r9], eax
jae 0x14005704a
mov r10, qword [r8 + 8]
mov ecx, dword [r10]
cmp ecx, eax
jae 0x14005704a
mov edx, dword [r9]
lea edi, [r11 + 8]
mov r15d, 0x800000
lea r12d, [rdi + 0x78]
and edx, r15d
je 0x140056df0
cmp dword [r9 + 4], edi
je 0x140056e06
mov r8d, ecx
and r8d, r15d
je 0x140056e90
cmp dword [r10 + 4], edi
jne 0x140056e90
mov ebx, 0x16
mov dword [rsp + 0x20], 0xc
mov ebp, 2
mov r12, r14
mov r14d, 0x5b00
lea ecx, [rbp + 0x1d]
lea r15d, [rbp + 0x11]
movzx edx, byte [r12 + 3]
and edx, ecx
lea eax, [rdx - 0xd]
cmp eax, 1
jbe 0x140056f1b
lea eax, [rdx - 0x15]
cmp eax, 1
jbe 0x140056f5f
mov rax, qword [r13]
movzx ecx, word [r12]
mov edx, dword [rax]
mov eax, 0x800
shr edx, 0xc
not dx
mov word [rsi + 0xb8], cx
and dx, ax
movzx eax, bx
shl ax, 5
or dx, ax
movzx eax, bx
or dx, r15w
or ax, r14w
mov word [rsi + 0xba], dx
mov word [rsi + 0xbc], ax
jmp 0x140056f4e
mov dword [rsp + 0x20], 0xb
mov ebx, 0x15
cmp ebp, 0xa
jge 0x140056e13
mov eax, ecx
or eax, dword [r9]
bt eax, 0x1a
jb 0x140056e13
cmp dword [r9 + 4], 4
jne 0x140056e13
cmp dword [r10 + 4], 4
jne 0x140056e13
xor ecx, dword [r9]
test r15d, ecx
je 0x140056f10
mov r9d, 0x8000
cmp word [r14 + 4], r9w
jae 0x140056eef
movzx ecx, word [r14 + 4]
mov rax, qword [rsi + 0x20]
cmp dword [rax + rcx*8], r11d
jge 0x140056f10
cmp word [r14], r9w
jae 0x140056e13
movzx ecx, word [r14]
mov rax, qword [rsi + 0x20]
cmp dword [rax + rcx*8], r11d
jl 0x140056e13
neg r8d
jmp 0x140056f12
neg edx
sbb ebx, ebx
neg ebx
add ebx, 0x13
jmp 0x140056f87
movzx ecx, word [r12]
movzx eax, bx
or ax, r14w
mov word [rsi + 0xb8], cx
mov word [rsi + 0xbc], ax
mov ecx, 0x80
movzx eax, bx
or ax, cx
shl ax, 5
or ax, dx
mov word [rsi + 0xba], ax
mov rcx, rsi
call fcn.14004e53c
mov ecx, 0x1f
mov dword [r12], eax
add r13, rdi
add r12, 4
sub rbp, 1
jne 0x140056e28
mov ebp, dword [rsp + 0x88]
mov r14, qword [rsp + 0x78]
cmp ebp, 0xa
jge 0x140056fdf
mov r12d, 0x80
cmp ebp, 4
je 0x140056fa5
sub ebp, 6
neg ebp
sbb eax, eax
and eax, 2
mov edi, eax
lea eax, [rbx - 0x14]
test eax, 0xfffffffd
jne 0x140056fa5
add edi, 4
movzx eax, word [r14]
movzx ecx, word [r14 + 4]
shl di, 8
or di, bx
mov word [rsi + 0xb8], ax
or di, r12w
mov word [rsi + 0xba], cx
mov word [rsi + 0xbc], di
mov eax, 0x2007ffd
mov dword [rsi + 0x174], 2
jmp 0x14005704c
movzx r9d, word [r14 + 4]
add bp, cx
movzx r8d, word [r14]
mov eax, 0x100
movzx ecx, bp
imul ecx, eax
mov word [rsi + 0xb8], r8w
mov word [rsi + 0xba], r9w
or cx, bx
mov word [rsi + 0xbc], cx
mov rcx, rsi
call fcn.14004e53c
mov edx, dword [rsp + 0x20]
mov rcx, rsi
mov ebx, eax
call fcn.140046534
mov ecx, 0x548a
mov word [rsi + 0xb8], ax
mov word [rsi + 0xbc], cx
mov rcx, rsi
mov word [rsi + 0xba], bx
call fcn.14004e53c
jmp 0x14005704c
xor eax, eax
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret