Function at 0x140058620
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0x110]
sub rsp, 0x210
mov rax, qword [0x1401cde90]
xor rax, rsp
mov qword [rbp + 0x100], rax
mov r8d, dword [0x1401d5d60]
xor edi, edi
lea eax, [r8 + 1]
lea ecx, [r8 + 2]
imul ecx, eax
mov eax, 0x2e8ba2e9
imul ecx, r8d
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x16
sub ecx, edx
cmp ecx, 0xb
jne 0x1400587ae
mov qword [rsp + 0x220], rbx
mov ebx, edi
call fcn.1400d41a0
inc rbx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movsd qword [rsp + rbx*8 + 0x18], xmm0
cmp rbx, 0x38
jb 0x140058687
mov rbx, qword [rsp + 0x220]
mov r10d, 0x37
mov r9, rdi
lea r11d, [r10 + 1]
nop dword [rax + rax]
mov edx, 0x37
cmp r9, rdx
jge 0x140058798
cmp r10, 4
jl 0x14005876d
mov r8d, 0x33
lea rcx, [rbp + 0xc8]
sub r8, r9
shr r8, 2
inc r8
lea rax, [r8*4]
sub rdx, rax
nop word [rax + rax]
movsd xmm0, qword [rcx + 0x10]
movsd xmm1, qword [rcx + 8]
comisd xmm0, xmm1
jbe 0x14005871a
movsd qword [rcx + 0x10], xmm1
movsd qword [rcx + 8], xmm0
movsd xmm0, qword [rcx + 8]
movsd xmm1, qword [rcx]
comisd xmm0, xmm1
jbe 0x140058732
movsd qword [rcx + 8], xmm1
movsd qword [rcx], xmm0
movsd xmm0, qword [rcx]
movsd xmm1, qword [rcx - 8]
comisd xmm0, xmm1
jbe 0x14005874a
movsd qword [rcx], xmm1
movsd qword [rcx - 8], xmm0
movsd xmm0, qword [rcx - 8]
movsd xmm1, qword [rcx - 0x10]
comisd xmm0, xmm1
jbe 0x140058764
movsd qword [rcx - 8], xmm1
movsd qword [rcx - 0x10], xmm0
sub rcx, 0x20
dec r8
jne 0x140058700
cmp rdx, r9
jle 0x140058798
movsd xmm0, qword [rsp + rdx*8 + 0x20]
movsd xmm1, qword [rsp + rdx*8 + 0x18]
comisd xmm0, xmm1
jbe 0x140058790
movsd qword [rsp + rdx*8 + 0x20], xmm1
movsd qword [rsp + rdx*8 + 0x18], xmm0
dec rdx
cmp rdx, r9
jg 0x140058772
inc r9
dec r10
dec r11
jne 0x1400586c0
mov r8d, dword [0x1401d5d60]
cmp byte [0x1401d7a20], dil
je 0x1400587c3
lea rax, [0x1401d1c38]
jmp 0x1400588df
mov dword [rbp + 0xe0], 0x8000c
mov dword [rbp + 0xe4], 0x6000f
mov dword [rbp + 0xe8], 0x4b000a
mov dword [rbp + 0xec], 0x180011
mov dword [rbp + 0xf0], 0x16001b
mov dword [rbp + 0xf4], 0xb0049
mov dword [rbp + 0xf8], 0x18000e
mov dword [rbp + 0xfc], 0xe
lea r10, [0x1401d1c38]
lea rdx, [0x1401d0d91]
movzx eax, byte [rdi + rdx - 1]
movzx ecx, word [rbp + rdi*2 + 0xe2]
add rdi, 5
xor ax, word [rbp + rdi*2 + 0xd6]
mov word [r10 + rdi*2 - 0xa], ax
movzx eax, byte [rdi + rdx - 5]
xor cx, ax
movzx eax, byte [rdi + rdx - 4]
xor ax, word [rbp + rdi*2 + 0xda]
mov word [r10 + rdi*2 - 8], cx
mov word [r10 + rdi*2 - 6], ax
movzx eax, byte [rdi + rdx - 3]
xor ax, word [rbp + rdi*2 + 0xdc]
mov word [r10 + rdi*2 - 4], ax
movzx eax, byte [rdi + rdx - 2]
xor ax, word [rbp + rdi*2 + 0xde]
mov word [r10 + rdi*2 - 2], ax
cmp rdi, 0xf
jl 0x140058821
imul r8d, r8d
mov eax, 0x88888889
imul r8d
add edx, r8d
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xf
sub r8d, edx
cmp r8d, 8
jne 0x1400588d5
mov edx, 1
mov r9d, 0xf6
mov ecx, edx
nop
dec r9d
lea r8d, [rcx + rdx]
lea edx, [rcx]
mov ecx, r8d
jns 0x1400588c0
mov dword [0x1401d5d60], r8d
mov byte [0x1401d7a20], 1
mov rax, r10
mov rcx, qword [rbp + 0x100]
xor rcx, rsp
call fcn.1400d37e0
mov rdi, qword [rsp + 0x228]
add rsp, 0x210
pop rbp
ret