Function at 0x616ccbf0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov eax, dword [rcx + 0x13c]
mov esi, eax
sar esi, 8
mov r12d, r8d
mov dword [rsp + 0xa8], edx
mov rbx, rcx
mov r14d, r8d
sar r12d, 8
cmp esi, r12d
mov edx, r12d
cmovle edx, esi
cmp dword [rcx + 0x10c], edx
jle 0x616ccc8e
cmp esi, r12d
mov edx, r12d
cmovge edx, esi
cmp dword [rcx + 0x108], edx
jg 0x616ccc8e
mov edx, dword [rcx + 0x138]
mov edi, dword [rsp + 0xa8]
mov r15d, edx
sar edi, 8
movzx ebp, dl
mov ecx, edi
sar r15d, 8
mov dword [rsp + 0x2c], edi
movzx edi, al
cmp r15d, ecx
jne 0x616cccb8
cmp esi, r12d
jne 0x616cccb8
movzx edx, r14b
mov rax, qword [rbx + 0x118]
sub edx, edi
movzx edi, byte [rsp + 0xa8]
add dword [rax + 4], edx
add ebp, edi
imul ebp, edx
add dword [rax + 8], ebp
mov eax, dword [rsp + 0xa8]
mov dword [rbx + 0x13c], r14d
mov dword [rbx + 0x138], eax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, r14d
sub ecx, eax
je 0x616ccf50
mov r8d, dword [rsp + 0xa8]
sub r8d, edx
je 0x616ccdf0
movsxd r11, r8d
movsxd r10, ecx
movsxd r13, edi
movsxd rax, ebp
mov qword [rsp + 0x38], 0
imul r13, r11
imul rax, r10
sub r13, rax
cmp r15d, dword [rsp + 0x2c]
je 0x616ccd0a
mov eax, 0xffffffff
cqo
idiv r11
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x48], 0
cmp esi, r12d
je 0x616ccd27
mov eax, 0xffffffff
cqo
idiv r10
mov qword [rsp + 0x48], rax
shl r8d, 8
shl ecx, 8
mov qword [rsp + 0xa0], rbx
mov ebx, r15d
movsxd rax, r8d
mov r15d, esi
mov rsi, qword [rsp + 0xa0]
mov qword [rsp + 0x20], rax
movsxd rax, ecx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x48]
neg rax
mov qword [rsp + 0x40], rax
nop dword [rax]
mov rax, qword [rsi + 0x118]
mov rcx, r13
sub rcx, qword [rsp + 0x20]
mov edx, dword [rax + 4]
mov r8d, dword [rax + 8]
test rcx, rcx
jle 0x616cce70
test r13, r13
jle 0x616cced0
add rcx, qword [rsp + 0x30]
test rcx, rcx
jle 0x616cce82
mov rcx, qword [rsp + 0x40]
sub edx, edi
sub r15d, 1
mov dword [rax + 4], edx
imul rcx, r13
add r13, qword [rsp + 0x20]
shr rcx, 0x20
add ebp, ecx
imul edi, ebp
mov ebp, ecx
sub r8d, edi
mov edi, 0x100
mov dword [rax + 8], r8d
mov r8d, r15d
mov edx, ebx
mov rcx, rsi
call fcn.616ccf70
cmp ebx, dword [rsp + 0x2c]
jne 0x616ccd68
cmp r15d, r12d
jne 0x616ccd68
mov rbx, rsi
jmp 0x616ccc6e
test ecx, ecx
jle 0x616cce38
mov r13d, 0x100
nop word [rax + rax]
mov rdx, qword [rbx + 0x118]
mov eax, r13d
add esi, 1
mov rcx, rbx
sub eax, edi
mov r8d, esi
xor edi, edi
add dword [rdx + 4], eax
imul eax, ebp
add eax, eax
add dword [rdx + 8], eax
mov edx, r15d
call fcn.616ccf70
cmp r12d, esi
jne 0x616cce00
jmp 0x616ccc6e
mov rax, qword [rbx + 0x118]
sub esi, 1
mov edx, r15d
mov rcx, rbx
mov r8d, esi
sub dword [rax + 4], edi
neg edi
imul edi, ebp
add edi, edi
add dword [rax + 8], edi
mov edi, 0x100
call fcn.616ccf70
cmp r12d, esi
jne 0x616cce38
jmp 0x616ccc6e
mov r9, qword [rsp + 0x30]
lea r10, [rcx + r9]
test r10, r10
jg 0x616ccf10
mov r10, qword [rsp + 0x30]
add r10, r13
js 0x616ccd9e
mov rcx, qword [rsp + 0x38]
add ebp, 0x100
add ebx, 1
mov r13, r10
imul rcx, r10
shr rcx, 0x20
mov r11d, ecx
sub r11d, edi
mov edi, ecx
imul ebp, r11d
add edx, r11d
mov dword [rax + 4], edx
add r8d, ebp
xor ebp, ebp
mov dword [rax + 8], r8d
jmp 0x616ccdcc
mov r10, qword [rsp + 0x38]
sub ebx, 1
imul r10, r13
sub r13, qword [rsp + 0x30]
shr r10, 0x20
mov ecx, r10d
sub ecx, edi
mov edi, r10d
imul ebp, ecx
add edx, ecx
mov dword [rax + 4], edx
add r8d, ebp
mov ebp, 0x100
mov dword [rax + 8], r8d
jmp 0x616ccdcc
mov r10, qword [rsp + 0x20]
mov r11d, 0x100
add r15d, 1
sub r11d, edi
xor edi, edi
sub r10, r13
imul r10, qword [rsp + 0x48]
add edx, r11d
mov r13, rcx
mov dword [rax + 4], edx
shr r10, 0x20
add ebp, r10d
imul ebp, r11d
add r8d, ebp
mov ebp, r10d
mov dword [rax + 8], r8d
jmp 0x616ccdcc
mov edx, dword [rsp + 0x2c]
mov r8d, r12d
mov rcx, rbx
call fcn.616ccf70
jmp 0x616ccc8e