Function at 0x140055d20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push r13
push r15
sub rsp, 0x40
mov rax, r9
xor esi, esi
xor r15d, r15d
mov r9, r8
mov r11, rdx
mov r13d, dword [rax + 0xc]
cmp r13d, 0xffffffff
je 0x14005605d
mov qword [rsp + 0x38], rbx
mov rbx, qword [rsp + 0x80]
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r12
mov qword [rsp + 0x18], r14
nop word [rax + rax]
mov ecx, r13d
add rcx, rsi
shl rcx, 4
add rcx, rax
mov r14d, dword [rcx]
mov r10d, dword [rcx + 8]
and r14d, 0xffffff
mov r13d, dword [rcx + 0xc]
add rsi, r10
test r15, r15
jne 0x140055db5
mov rax, qword [rsp + 0x88]
add r10, qword [rax]
mov qword [rax], r15
mov edx, dword [rcx + 4]
mov r12d, edx
mov ecx, dword [rcx]
and r12d, 0x1ffffff
mov eax, ecx
and ecx, 0xffffff
shr eax, 0x18
sub ecx, eax
lea rax, [rsi + r11]
cmp rax, r9
lea r8d, [rcx + 9]
mov rcx, r9
cmovb rcx, rax
mov eax, edx
shr eax, 0x19
mov qword [rsp], rcx
test eax, eax
jne 0x140055dfb
and edx, 0x1ffffff
add edx, 0xf
jmp 0x140055dfe
lea edx, [rax - 1]
mov r11, r15
mov ebp, edx
shl r11, 4
mov rcx, r8
add r11, qword [rsp + 0x90]
mov rax, r14
shl rcx, 0x18
shl rax, 0x18
xor ecx, eax
or ecx, r14d
mov dword [r11], r10d
mov dword [r11 + 4], ecx
cmp rbp, 0x10
jae 0x140055e3b
mov word [r11 + 0xe], bp
xor edx, edx
movzx edi, bp
jmp 0x140055e7f
add rdx, 0xfffffffffffffff4
xor ecx, ecx
mov rax, rdx
shr rax, 1
je 0x140055e57
nop dword [rax]
inc ecx
shr rax, 1
jne 0x140055e50
dec ecx
mov rax, rdx
shr rax, cl
and eax, 1
lea edi, [rcx + 7]
add di, di
add di, ax
add rax, 2
shl rax, cl
sub edx, eax
shl rcx, 0x18
or edx, ecx
mov word [r11 + 0xe], di
mov dword [r11 + 8], edx
cmp r10, 6
jae 0x140055e97
movzx r9d, r10w
mov ecx, 0x17
jmp 0x140055f1c
cmp r10, 0x82
jae 0x140055ecd
lea r9, [r10 - 2]
xor ecx, ecx
mov rax, r9
shr rax, 1
je 0x140055eb7
nop
inc ecx
shr rax, 1
jne 0x140055eb0
dec ecx
shr r9, cl
inc cx
add cx, cx
add r9w, cx
mov ecx, 0x17
jmp 0x140055f1c
cmp r10, 0x842
jae 0x140055ef3
xor eax, eax
lea rcx, [r10 - 0x42]
shr rcx, 1
je 0x140055ee8
inc eax
shr rcx, 1
jne 0x140055ee1
lea r9d, [rax + 0xa]
mov ecx, 0x17
jmp 0x140055f1c
mov ecx, 0x17
cmp r10, 0x1842
jae 0x140055f07
lea r9d, [rcx - 2]
jmp 0x140055f1c
cmp r10, 0x5842
movzx r9d, cx
mov edx, 0x16
cmovb r9w, dx
cmp r8, 0xa
jae 0x140055f29
sub r8w, 2
jmp 0x140055f81
cmp r8, 0x86
jae 0x140055f59
add r8, 0xfffffffffffffffa
xor ecx, ecx
mov rax, r8
shr rax, 1
je 0x140055f47
inc ecx
shr rax, 1
jne 0x140055f40
dec ecx
shr r8, cl
add cx, 2
add cx, cx
add r8w, cx
jmp 0x140055f81
cmp r8, 0x846
jae 0x140055f7d
xor eax, eax
lea rcx, [r8 - 0x46]
shr rcx, 1
je 0x140055f77
nop dword [rax]
inc eax
shr rcx, 1
jne 0x140055f70
lea r8d, [rax + 0xc]
jmp 0x140055f81
movzx r8d, cx
movzx edx, r9w
movzx eax, r8w
and dx, 7
and ax, 7
shl dx, 3
or dx, ax
test di, di
jne 0x140055fbd
cmp r9w, 8
jae 0x140055fbd
cmp r8w, 0x10
jae 0x140055fbd
movzx eax, dx
or ax, 0x40
cmp r8w, 8
cmovae dx, ax
jmp 0x140055ff1
movzx eax, r9w
shr eax, 3
lea ecx, [rax + rax*2]
movzx eax, r8w
shr eax, 3
mov r8d, 0xc0
add ecx, eax
mov eax, 0x520d40
add ecx, ecx
sar eax, cl
add cx, 2
shl cx, 5
and ax, r8w
add ax, cx
or dx, ax
mov word [r11 + 0xc], dx
cmp r12, qword [rsp]
ja 0x140056015
test rbp, rbp
je 0x140056015
mov eax, dword [rbx + 8]
mov dword [rbx + 0xc], eax
mov eax, dword [rbx + 4]
mov dword [rbx + 8], eax
mov eax, dword [rbx]
mov dword [rbx + 4], eax
mov dword [rbx], r12d
mov rax, qword [rsp + 0x98]
add rsi, r14
mov r9, qword [rsp + 0x70]
inc r15
mov r11, qword [rsp + 0x68]
add qword [rax], r10
mov rax, qword [rsp + 0x78]
cmp r13d, 0xffffffff
jne 0x140055d80
mov r14, qword [rsp + 0x18]
mov r12, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x88]
sub rcx, rsi
add qword [rax], rcx
add rsp, 0x40
pop r15
pop r13
pop rsi
ret