Function at 0x1400054a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov dword [rsp + 0x10], edx
push rbx
push rsi
push rdi
push r13
sub rsp, 0x28
mov edi, r9d
mov ebx, r8d
mov r13d, edx
mov rsi, rcx
cmp r8d, edx
jne 0x1400054cb
mov rax, rcx
add rsp, 0x28
pop r13
pop rdi
pop rsi
pop rbx
ret
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x20], r15
test ebx, ebx
js 0x1400058e9
test edi, edi
js 0x1400058e9
xor r15d, r15d
test edi, edi
je 0x14000550e
mov eax, 0x7fffffff
mov ecx, r15d
cdq
idiv edi
cmp ebx, eax
setle cl
test ecx, ecx
je 0x1400058e9
mov r12d, ebx
imul r12d, edi
test r12d, r12d
js 0x1400058e9
mov r14d, dword [rsp + 0x70]
test r14d, r14d
js 0x1400058e9
je 0x140005548
mov eax, 0x7fffffff
mov ecx, r15d
cdq
idiv r14d
cmp r12d, eax
setle cl
test ecx, ecx
je 0x1400058e9
mov eax, r12d
imul eax, r14d
movsxd rcx, eax
call fcn.140036d58
mov rbp, rax
test rax, rax
je 0x1400058e9
test r14d, r14d
jle 0x1400058b7
mov eax, dword [rsp + 0x58]
lea r11d, [r13*8 - 0xa]
add r11d, ebx
lea r8, [0x140000000]
imul eax, edi
mov ebx, r15d
mov r13d, r15d
mov dword [rsp + 0x58], eax
nop
mov r9d, r13d
mov eax, ebx
add r9, rsi
add rax, rbp
cmp r11d, 0x19
ja case.0x1400055b3.3
movsxd rcx, r11d
mov edx, dword [r8 + rcx*4 + 0x5930]
add rdx, r8
jmp rdx
lea edx, [rdi - 1]
test edx, edx
js 0x1400058a3
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax], cl
lea r9, [r9 + 1]
mov byte [rax + 1], 0xff
lea rax, [rax + 2]
jns 0x1400055c0
jmp 0x1400058a3
lea edx, [rdi - 1]
test edx, edx
js 0x1400058a3
nop word [rax + rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax + 2], cl
lea r9, [r9 + 1]
mov byte [rax + 1], cl
mov byte [rax], cl
lea rax, [rax + 3]
jns 0x1400055f0
jmp 0x1400058a3
lea edx, [rdi - 1]
test edx, edx
js 0x1400058a3
nop dword [rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax + 2], cl
lea r9, [r9 + 1]
mov byte [rax + 1], cl
mov byte [rax], cl
mov byte [rax + 3], 0xff
lea rax, [rax + 4]
jns 0x140005620
jmp 0x1400058a3
lea edx, [rdi - 1]
test edx, edx
js 0x1400058a3
nop dword [rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax], cl
lea rax, [rax + 1]
lea r9, [r9 + 2]
jns 0x140005650
jmp 0x1400058a3
lea edx, [rdi - 1]
test edx, edx
js 0x1400058a3
nop dword [rax]
nop word [rax + rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax + 2], cl
lea r9, [r9 + 2]
mov byte [rax + 1], cl
mov byte [rax], cl
lea rax, [rax + 3]
jns 0x140005680
jmp 0x1400058a3
lea edx, [rdi - 1]
test edx, edx
js 0x1400058a3
nop dword [rax]
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax + 2], cl
lea r9, [r9 + 2]
mov byte [rax + 1], cl
mov byte [rax], cl
lea rax, [rax + 4]
movzx ecx, byte [r9 - 1]
mov byte [rax - 1], cl
jns 0x1400056b0
jmp 0x1400058a3
lea edx, [rdi - 1]
test edx, edx
js 0x1400058a3
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax], cl
lea rax, [rax + 4]
movzx ecx, byte [r9 + 1]
lea r9, [r9 + 3]
mov byte [rax - 3], cl
movzx ecx, byte [r9 - 1]
mov byte [rax - 2], cl
mov byte [rax - 1], 0xff
jns 0x1400056e1
jmp 0x1400058a3
lea r10d, [rdi - 1]
test r10d, r10d
js 0x1400058a3
nop word [rax + rax]
movzx ecx, byte [r9 + 1]
lea rax, [rax + 1]
imul r8d, ecx, 0x96
movzx ecx, byte [r9 + 2]
lea r9, [r9 + 3]
imul edx, ecx, 0x1d
movzx ecx, byte [r9 - 3]
add r8d, edx
imul edx, ecx, 0x4d
add r8d, edx
shr r8d, 8
sub r10d, 1
mov byte [rax - 1], r8b
jns 0x140005720
lea r8, [0x140000000]
jmp 0x1400058a3
lea r10d, [rdi - 1]
test r10d, r10d
js 0x1400058a3
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r9 + 1]
lea rax, [rax + 2]
imul r8d, ecx, 0x96
movzx ecx, byte [r9 + 2]
lea r9, [r9 + 3]
imul edx, ecx, 0x1d
movzx ecx, byte [r9 - 3]
mov byte [rax - 1], 0xff
add r8d, edx
imul edx, ecx, 0x4d
add r8d, edx
shr r8d, 8
sub r10d, 1
mov byte [rax - 2], r8b
jns 0x140005780
lea r8, [0x140000000]
jmp 0x1400058a3
lea r10d, [rdi - 1]
test r10d, r10d
js 0x1400058a3
nop word [rax + rax]
movzx ecx, byte [r9 + 1]
lea rax, [rax + 1]
imul r8d, ecx, 0x96
movzx ecx, byte [r9 + 2]
lea r9, [r9 + 4]
imul edx, ecx, 0x1d
movzx ecx, byte [r9 - 4]
add r8d, edx
imul edx, ecx, 0x4d
add r8d, edx
shr r8d, 8
sub r10d, 1
mov byte [rax - 1], r8b
jns 0x1400057e0
lea r8, [0x140000000]
jmp 0x1400058a3
lea r10d, [rdi - 1]
test r10d, r10d
js 0x1400058a3
nop dword [rax]
movzx ecx, byte [r9 + 1]
lea rax, [rax + 2]
imul r8d, ecx, 0x96
movzx ecx, byte [r9 + 2]
lea r9, [r9 + 4]
imul edx, ecx, 0x1d
movzx ecx, byte [r9 - 4]
add r8d, edx
imul edx, ecx, 0x4d
add r8d, edx
shr r8d, 8
sub r10d, 1
mov byte [rax - 2], r8b
movzx ecx, byte [r9 - 1]
mov byte [rax - 1], cl
jns 0x140005830
lea r8, [0x140000000]
jmp 0x1400058a3
lea edx, [rdi - 1]
test edx, edx
js 0x1400058a3
sub edx, 1
movzx ecx, byte [r9]
mov byte [rax], cl
lea rax, [rax + 3]
movzx ecx, byte [r9 + 1]
lea r9, [r9 + 4]
mov byte [rax - 2], cl
movzx ecx, byte [r9 - 2]
mov byte [rax - 1], cl
jns 0x140005880
add r13d, dword [rsp + 0x58]
inc r15d
add ebx, r12d
cmp r15d, r14d
jl 0x140005590
mov rcx, rsi
call fcn.140036340
mov rax, rbp
jmp 0x14000590f
mov rcx, rsi
call fcn.140036340
mov rcx, rbp
call fcn.140036340
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.unsupported
jmp 0x140005904
mov rcx, rsi
call fcn.140036340
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
mov edx, 0x20
mov qword [rdx + rcx], rax
xor eax, eax
mov r14, qword [rsp + 0x68]
mov r12, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x50]
mov r15, qword [rsp + 0x20]
add rsp, 0x28
pop r13
pop rdi
pop rsi
pop rbx
ret