Function at 0x61660c30
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movups xmmword [rsp + 0x40], xmm6
mov rbx, rcx
mov r13d, edx
mov rbp, r8
mov esi, r9d
test r9d, r9d
jg 0x61660c75
movups xmm6, xmmword [rsp + 0x40]
mov ecx, 1
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.6160a290
movsxd rdi, r9d
mov rcx, rdi
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x61660c56
xor edx, edx
mov eax, 0x10ea
movzx r8d, byte [rbp + rdx]
movzx ecx, ah
add eax, r8d
xor ecx, r8d
imul ax, ax, 0xce6d
mov byte [r12 + rdx], cl
inc rdx
add ax, 0x58bf
cmp esi, edx
jg 0x61660c8f
movsxd rcx, dword [rbx + 0x108]
movsxd rbp, r13d
add rdi, r12
xor eax, eax
shl rbp, 5
mov r15d, 0xfb
lea r14, [0x6175b988]
add rcx, r12
xorps xmm6, xmm6
cmp rcx, rdi
jae 0x61660fb5
movzx edx, byte [rcx]
cmp dl, 0x1f
ja 0x61660f35
lea rsi, [rcx + 1]
cmp dl, 0xc
je 0x61660dc4
cmp dl, 0xd
je 0x61660da3
cmp dl, 0xa
jne case.0x61660de1.3080
cmp dword [rbx + 0xbc], 0
je 0x61660d94
mov edx, dword [rbx + 0x228]
test edx, edx
jle 0x61660d94
dec edx
lea r8, [rsp + 0x38]
mov dword [rsp + 0x2c], eax
mov dword [rbx + 0x228], edx
movsxd rdx, edx
movsd xmm0, qword [rbx + rdx*8 + 0x168]
mov rdx, r8
call fcn.6158e120
mov eax, dword [rsp + 0x2c]
comisd xmm0, xmm6
jne 0x61660d94
cvttsd2si edx, qword [rsp + 0x38]
test edx, edx
js 0x61660d94
cmp dword [rbx + 0xb8], edx
jle 0x61660d94
mov rax, qword [rbx + 0xc0]
movsxd rdx, edx
mov rcx, rbx
shl rdx, 5
mov dword [rax + rdx + 0x1c], 1
add rdx, qword [rbx + 0xc0]
mov r9d, dword [rdx + 8]
mov r8, qword [rdx]
mov edx, r13d
call fcn.61660c30
jmp 0x61660fad
mov dword [rbx + 0xbc], 0
jmp 0x61660fad
cmp dword [rbx + 0x228], 1
jg 0x61660db6
mov eax, 0x64
jmp 0x61660fb5
mov rdx, qword [rbx + 0x78]
movsd xmm0, qword [rbx + 0x170]
jmp 0x61660e32
movzx edx, byte [rcx + 1]
lea rsi, [rcx + 2]
or dh, 0xc
sub edx, 0xc06
cmp edx, 0xb
ja case.0x61660de1.3080
movsxd rdx, dword [r14 + rdx*4]
add rdx, r14
jmp rdx
cmp dword [rbx + 0x228], 4
jle 0x61660dac
cvttsd2si edx, qword [rbx + 0x180]
mov rcx, rbx
call fcn.61738100
test eax, eax
jne 0x61660fb5
cvttsd2si edx, qword [rbx + 0x188]
mov rcx, rbx
call fcn.61738100
test eax, eax
je case.0x61660de1.3080
jmp 0x61660fb5
cmp dword [rbx + 0x228], 3
jle 0x61660dac
mov rdx, qword [rbx + 0x78]
movsd xmm0, qword [rbx + 0x178]
divsd xmm0, qword [rbx + 0x50]
movsd qword [rdx + rbp + 8], xmm0
mov dword [rbx + 0x228], 0
jmp 0x61660fad
mov edx, dword [rbx + 0x228]
cmp edx, 1
jle 0x61660dac
movsxd rcx, edx
dec edx
lea rcx, [rbx + rcx*8]
movsd xmm1, qword [rcx + 0x160]
movsd xmm0, qword [rcx + 0x158]
mov dword [rbx + 0x228], edx
comisd xmm1, xmm6
je 0x61660dac
divsd xmm0, xmm1
movsd qword [rcx + 0x158], xmm0
jmp 0x61660fad
mov edx, dword [rbx + 0x228]
test edx, edx
jle 0x61660dac
mov dword [rbx + 0x290], 0
dec edx
mov dword [rbx + 0x228], edx
mov edx, dword [rbx + 0x228]
test edx, edx
je 0x61660fad
dec edx
mov dword [rbx + 0x228], edx
movsxd rdx, edx
movsd xmm0, qword [rbx + rdx*8 + 0x168]
movsxd rdx, dword [rbx + 0x290]
lea ecx, [rdx + 1]
mov dword [rbx + 0x290], ecx
cvttsd2si ecx, xmm0
mov dword [rbx + rdx*4 + 0x230], ecx
jmp 0x61660eb5
mov edx, dword [rbx + 0x290]
test edx, edx
jle 0x61660dac
dec edx
mov dword [rbx + 0x290], edx
movsxd rdx, edx
mov ecx, dword [rbx + rdx*4 + 0x230]
movsxd rdx, dword [rbx + 0x228]
cvtsi2sd xmm0, ecx
lea r8d, [rdx + 1]
mov dword [rbx + 0x228], r8d
movsd qword [rbx + rdx*8 + 0x168], xmm0
jmp 0x61660fad
movsxd r8, dword [rbx + 0x228]
cmp r8d, 0x17
jg 0x61660dac
cmp dl, 0xf6
ja 0x61660f57
lea rsi, [rcx + 1]
sub edx, 0x8b
jmp 0x61660f95
movzx r9d, byte [rcx + 1]
cmp dl, 0xfa
ja 0x61660f71
sub edx, 0xf7
shl edx, 8
lea edx, [r9 + rdx + 0x6c]
jmp 0x61660f86
cmp dl, 0xff
je 0x61660f8c
mov esi, r15d
sub esi, edx
mov edx, esi
shl edx, 8
sub edx, r9d
sub edx, 0x6c
lea rsi, [rcx + 2]
jmp 0x61660f95
mov edx, dword [rcx + 1]
lea rsi, [rcx + 5]
bswap edx
cvtsi2sd xmm0, edx
lea ecx, [r8 + 1]
mov dword [rbx + 0x228], ecx
movsd qword [rbx + r8*8 + 0x168], xmm0
mov rcx, rsi
jmp 0x61660cd8
mov rcx, r12
mov dword [rsp + 0x2c], eax
call sub.msvcrt.dll_free
mov eax, dword [rsp + 0x2c]
movups xmm6, xmmword [rsp + 0x40]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret