Function at 0x70511c30
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movaps xmmword [rsp + 0x30], xmm6
movaps xmmword [rsp + 0x40], xmm7
movaps xmmword [rsp + 0x50], xmm8
movaps xmmword [rsp + 0x60], xmm9
movaps xmmword [rsp + 0x70], xmm10
pxor xmm8, xmm8
mov edx, 1
mov esi, ecx
mov ecx, 0x30
call sub.msvcrt.dll_calloc
cvtsi2sd xmm8, esi
test rax, rax
movsd xmm10, qword [0x705a6440]
mov rdi, rax
movapd xmm7, xmm10
divsd xmm7, xmm8
je 0x70511f73
mov ebp, esi
mov dword [rax], esi
mov ecx, 8
shr ebp, 0x1f
add ebp, esi
sar ebp, 1
movsxd rdx, ebp
call sub.msvcrt.dll_calloc
test rax, rax
mov r12, rax
mov qword [rdi + 0x28], rax
je 0x70511f6b
xor ebx, ebx
test ebp, ebp
movsd xmm6, qword [0x705a6308]
jle 0x70511cf7
nop
pxor xmm1, xmm1
cvtsi2sd xmm1, ebx
addsd xmm1, xmm6
mulsd xmm1, xmm7
movapd xmm0, xmm1
call fcn.70532610
movsd qword [r12 + rbx*8], xmm0
add rbx, 1
cmp ebp, ebx
jg 0x70511cd0
cmp esi, 0x20
mov rax, rdi
jg 0x70511d30
movaps xmm6, xmmword [rsp + 0x30]
movaps xmm7, xmmword [rsp + 0x40]
movaps xmm8, xmmword [rsp + 0x50]
movaps xmm9, xmmword [rsp + 0x60]
movaps xmm10, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r13d, esi
mov ecx, 4
sar r13d, 2
movsxd rdx, r13d
call sub.msvcrt.dll_calloc
mov rbp, rax
mov qword [rdi + 0x10], rax
mov rax, rdi
test rbp, rbp
je 0x70511cff
lea edx, [rsi + r13]
mov ecx, 8
movsxd rdx, edx
call sub.msvcrt.dll_calloc
mov r15, rax
mov qword [rdi + 8], rax
mov rax, rdi
test r15, r15
je 0x70511cff
movsxd rax, esi
mov edx, 8
mov rcx, rax
mov qword [rsp + 0x20], rax
call sub.msvcrt.dll_calloc
mov rdx, rax
mov qword [rdi + 0x18], rax
mov rax, rdi
test rdx, rdx
je 0x70511cff
movapd xmm0, xmm8
mov r12d, esi
mov rbx, r15
sar r12d, 1
add r13d, r13d
xor r14d, r14d
call fcn.70532710
divsd xmm0, qword [0x705a6448]
movsxd r12, r12d
movsd xmm6, qword [0x705a6308]
movsd xmm9, qword [0x705a6450]
addsd xmm0, xmm6
cvttsd2si eax, xmm0
pxor xmm0, xmm0
mov dword [rsp + 0x2c], eax
mov dword [rdi + 4], eax
lea eax, [rsi + rsi]
cvtsi2sd xmm0, eax
divsd xmm10, xmm0
nop
lea eax, [r14 + r14]
pxor xmm8, xmm8
cvtsi2sd xmm8, eax
mulsd xmm8, xmm7
movapd xmm0, xmm8
call fcn.70532510
movsd qword [rbx], xmm0
movapd xmm0, xmm8
pxor xmm8, xmm8
call fcn.70532610
lea eax, [r14 + 1]
xorpd xmm0, xmm9
add r14d, 2
cvtsi2sd xmm8, eax
movsd qword [rbx + 8], xmm0
mulsd xmm8, xmm10
movapd xmm0, xmm8
call fcn.70532510
movsd qword [rbx + r12*8], xmm0
movapd xmm0, xmm8
call fcn.70532610
movsd qword [rbx + r12*8 + 8], xmm0
add rbx, 0x10
cmp r14d, r13d
jne 0x70511df0
mov rax, qword [rsp + 0x20]
mov ebx, esi
mov r12d, 2
sar ebx, 3
lea r13, [r15 + rax*8]
lea r15d, [rbx*4 + 2]
pxor xmm8, xmm8
add r13, 0x10
cvtsi2sd xmm8, r12d
add r12d, 4
mulsd xmm8, xmm7
movapd xmm0, xmm8
call fcn.70532510
mulsd xmm0, xmm6
movsd qword [r13 - 0x10], xmm0
movapd xmm0, xmm8
call fcn.70532610
xorpd xmm0, xmm9
mulsd xmm0, xmm6
movsd qword [r13 - 8], xmm0
cmp r12d, r15d
jne 0x70511e82
mov eax, dword [rsp + 0x2c]
mov r8d, 1
xor r10d, r10d
mov r11d, r8d
mov r12d, 1
lea ecx, [rax - 1]
shl r11d, cl
lea ecx, [rax - 2]
sub r11d, 1
shl r8d, cl
xor edx, edx
xor ecx, ecx
test r8d, r8d
mov r9d, r10d
mov eax, r8d
je 0x70511f61
test eax, r9d
je 0x70511f0c
mov eax, r12d
shl eax, cl
or edx, eax
add ecx, 1
mov eax, r8d
sar eax, cl
test eax, eax
jne 0x70511f00
mov eax, edx
not eax
and eax, r11d
mov dword [rbp + r10*8 + 4], edx
sub eax, 1
mov dword [rbp + r10*8], eax
add r10, 1
cmp ebx, r10d
jg 0x70511ef1
pxor xmm0, xmm0
mov rax, rdi
movss xmm1, dword [0x705a6460]
pxor xmm2, xmm2
cvtsi2ss xmm0, esi
divss xmm1, xmm0
movaps xmm0, xmm1
cvtss2sd xmm2, xmm0
movsd qword [rdi + 0x20], xmm2
jmp 0x70511cff
mov eax, 0xffffffff
mov edx, r8d
jmp 0x70511f1c
mov rax, rdi
jmp 0x70511cff
xor eax, eax
jmp 0x70511cff