Function at 0x180060528
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x78]
sub rsp, 0x178
mov rax, qword [0x18018f280]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rax, qword [rcx]
xor esi, esi
mov r13, r9
mov qword [rbp - 0x78], r9
mov qword [rbp - 0x68], r8
mov rbx, rcx
mov qword [rbp - 0x70], rdx
mov dword [rax + 8], esi
mov qword [rbp - 0x80], rcx
call fcn.18005fb3c
mov rdx, qword [rbx]
movsxd rcx, dword [rdx + 8]
test eax, eax
jne 0x180060591
mov edx, ecx
xor r8d, r8d
mov rcx, rbx
call fcn.18005f40c
xor eax, eax
jmp 0x180060a58
mov edi, 1
lea edx, [rdi + 2]
cmp ecx, edx
jne 0x1800605bc
cmp dword [rbx + 0x4850], edx
je 0x1800605b5
cmp dword [rbx + 0x484c], esi
jne 0x1800605bc
cmp dword [rbx + 0x4848], esi
jne 0x1800605bc
mov qword [rsp + 0x70], rdi
jmp 0x1800605c1
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x58], rcx
xorps xmm0, xmm0
xorps xmm1, xmm1
mov r12, rcx
movdqu xmmword [rsp + 0x38], xmm0
movdqu xmmword [rsp + 0x48], xmm1
test ecx, ecx
jle 0x1800606bc
mov r15, rsi
lea r14, [rbx + 0x46a4]
lea rsi, [rbp - 0x44]
mov rax, qword [rbx]
mov ecx, dword [rax]
add ecx, edx
call fcn.180113040
mov qword [r14 + 0x44], rax
test rax, rax
je 0x180060751
mov eax, dword [rbx + 0x4688]
and dword [rsi + 0xc], 0
cdq
idiv dword [r14]
mov r9d, eax
mov dword [rsi - 4], eax
mov eax, dword [rbx + 0x468c]
cdq
idiv dword [r14 + 4]
xor edx, edx
mov ecx, eax
mov dword [rsi], eax
sar ecx, 1
mov r8d, eax
mov dword [rsi + 8], ecx
mov rcx, qword [rbx]
mov eax, dword [rcx]
mov rcx, qword [r14 + 0x2c]
dec eax
add eax, r9d
mov qword [rsi - 0xc], rcx
div r9d
mov qword [rsi - 0x14], rcx
mov dword [rsi + 4], eax
cmp r9d, edi
jne 0x180060675
cmp r8d, edi
jne 0x180060666
lea rax, [0x18005fdc0]
jmp 0x18006069f
cmp r8d, 2
jne 0x180060698
lea rax, [0x18005fdc4]
jmp 0x18006069f
cmp r9d, 2
jne 0x180060698
cmp r8d, edi
jne 0x180060689
lea rax, [0x18005fe0c]
jmp 0x18006069f
cmp r8d, 2
jne 0x180060698
mov rax, qword [rbx + 0x4880]
jmp 0x18006069f
lea rax, [0x180060160]
mov qword [rsi - 0x1c], rax
add r15, rdi
add rsi, 0x30
add r14, 0x60
mov edx, 3
cmp r15, r12
jl 0x1800605f1
mov rdx, qword [rbx]
mov r9d, edi
mov ecx, 4
mov r8d, dword [rdx + 4]
mov edx, dword [rdx]
call fcn.18005af18
mov rdx, qword [rbx]
mov r12, rax
mov qword [rsp + 0x78], rax
test rax, rax
je 0x180060754
xor eax, eax
mov dword [rsp + 0x30], eax
cmp dword [rdx + 4], eax
jbe 0x180060a19
mov r15, qword [rsp + 0x48]
mov r13, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
imul eax, dword [rdx]
shl eax, 2
mov r14d, eax
add r14, r12
xor r12d, r12d
cmp qword [rsp + 0x58], r12
jle 0x180060806
lea r15, [rbx + 0x46c0]
mov rbx, qword [rsp + 0x58]
lea rsi, [rbp - 0x3c]
mov eax, dword [rsi - 8]
lea r13, [rsi - 0x14]
mov r9d, dword [rsi - 0xc]
lea rcx, [rsi - 0x1c]
sar eax, 1
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x60], r13
cmp dword [rsi], eax
jl 0x18006078a
mov r8, qword [rcx]
mov rcx, r13
jmp 0x180060793
mov rdx, qword [rbx]
mov edx, dword [rdx + 8]
xor r8d, r8d
mov rcx, rbx
call fcn.18005f40c
mov edx, dword [0x1801956e8]
mov rax, qword gs:[0x58]
mov ecx, 0x18
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
mov qword [rcx + rax], rdx
jmp 0x18006058a
mov r8, qword [r13]
mov qword [rsp + 0x68], rcx
mov rdx, qword [rcx]
mov rcx, qword [r15 + 0x28]
mov dword [rsp + 0x20], r9d
mov r9d, dword [rsi - 4]
call qword [rsi - 0x24]
mov qword [rsp + r12*8 + 0x38], rax
mov eax, dword [rsi]
inc eax
mov dword [rsi], eax
cmp eax, dword [rsi - 8]
jl 0x1800607df
mov rax, qword [rsp + 0x68]
add dword [rsi + 4], edi
mov rcx, qword [rsp + 0x60]
and dword [rsi], 0
mov rcx, qword [rcx]
mov qword [rax], rcx
mov eax, dword [rsi + 4]
cmp eax, dword [r15]
jge 0x1800607df
movsxd rax, dword [r15 + 4]
add rax, rcx
mov qword [r13], rax
add r12, rdi
add rsi, 0x30
add r15, 0x60
cmp r12, rbx
jl 0x18006072a
mov r15, qword [rsp + 0x48]
mov r13, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
mov rbx, qword [rbp - 0x80]
mov rax, qword [rbx]
cmp dword [rax + 8], 3
jne 0x180060885
cmp qword [rsp + 0x70], 0
je 0x180060860
xor r8d, r8d
cmp dword [rax], r8d
jbe 0x1800609fa
add r14, 3
mov al, byte [r8 + rsi]
xor edx, edx
mov byte [r14 - 3], al
mov rax, qword [rsp + rdx*8 + 0x40]
mov cl, byte [r8 + rax]
mov byte [rdx + r14 - 2], cl
add rdx, rdi
cmp rdx, 2
jl 0x180060831
mov byte [r14], 0xff
add r8d, edi
mov rax, qword [rbx]
add r14, 4
cmp r8d, dword [rax]
jb 0x180060827
jmp 0x1800609fa
mov eax, dword [rax]
mov r9, r15
mov dword [rsp + 0x28], 4
mov r8, r13
mov rdx, rsi
mov dword [rsp + 0x20], eax
mov rcx, r14
call qword [rbx + 0x4878]
jmp 0x1800609fa
mov r12d, 4
cmp dword [rax + 8], r12d
jne 0x1800609d2
mov ecx, dword [rbx + 0x484c]
test ecx, ecx
jne 0x18006091e
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x1800609fa
add r14, 2
movzx ecx, byte [r9 + rsi]
mov rax, qword [rsp + 0x50]
movzx r8d, byte [r9 + rax]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14 - 2], al
movzx ecx, byte [r9 + r13]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14 - 1], al
movzx ecx, byte [r9 + r15]
add r9d, edi
mov byte [r14 + 1], 0xff
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14], al
add r14, r12
mov rax, qword [rbx]
cmp r9d, dword [rax]
jb 0x1800608af
jmp 0x1800609fa
mov edx, dword [rax]
cmp ecx, 2
mov rax, qword [rbx + 0x4878]
mov r9, r15
mov dword [rsp + 0x28], r12d
mov r8, r13
mov dword [rsp + 0x20], edx
mov rcx, r14
mov rdx, rsi
jne 0x1800609ce
call rax
mov rax, qword [rbx]
xor r8d, r8d
cmp dword [rax], r8d
jbe 0x1800609fa
mov r15, qword [rsp + 0x50]
add r14, 2
movzx edx, byte [r8 + r15]
add r8d, edi
mov al, byte [r14 - 2]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14 - 2], al
mov al, byte [r14 - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14 - 1], al
mov al, byte [r14]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14], al
add r14, r12
mov rax, qword [rbx]
cmp r8d, dword [rax]
jb 0x18006095f
mov r15, qword [rsp + 0x48]
jmp 0x1800609fa
call rax
jmp 0x1800609fa
xor edx, edx
cmp dword [rax], edx
jbe 0x1800609fa
inc r14
mov cl, byte [rdx + rsi]
add edx, edi
mov byte [r14 + 1], cl
mov byte [r14], cl
mov byte [r14 - 1], cl
mov byte [r14 + 2], 0xff
add r14, r12
mov rax, qword [rbx]
cmp edx, dword [rax]
jb 0x1800609db
mov eax, dword [rsp + 0x30]
mov rdx, qword [rbx]
add eax, edi
mov r12, qword [rsp + 0x78]
mov dword [rsp + 0x30], eax
cmp eax, dword [rdx + 4]
jb 0x180060700
mov r13, qword [rbp - 0x78]
mov edx, dword [rdx + 8]
xor r8d, r8d
mov rcx, rbx
call fcn.18005f40c
mov rax, qword [rbx]
mov ecx, dword [rax]
mov rax, qword [rbp - 0x70]
mov dword [rax], ecx
mov rax, qword [rbx]
mov ecx, dword [rax + 4]
mov rax, qword [rbp - 0x68]
mov dword [rax], ecx
test r13, r13
je 0x180060a55
mov rax, qword [rbx]
mov ecx, 3
cmp dword [rax + 8], ecx
cmovge edi, ecx
mov dword [r13], edi
mov rax, r12
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.18008e310
add rsp, 0x178
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret