Function at 0x180059570
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xc0
movups xmm0, xmmword [0x1800ef970]
mov edi, dword [0x180112028]
xor r8d, r8d
movaps xmmword [rax - 0x28], xmm6
movaps xmmword [rax - 0x38], xmm7
movaps xmmword [rax - 0x48], xmm8
mov qword [rax + 0x10], rbx
lea r14d, [r8 + 4]
movzx eax, byte [0x1800ef998]
lea r15d, [r8 + 0x1f]
mov byte [0x1802117e0], 1
mov byte [rbp - 0x21], al
movups xmm1, xmmword [0x1800ef980]
movups xmmword [rbp - 0x49], xmm0
movsd xmm0, qword [0x1800ef990]
movsd qword [rbp - 0x29], xmm0
movups xmmword [rbp - 0x39], xmm1
cmp edi, 2
jl 0x180059729
movdqa xmm0, xmmword [0x1800fef30]
lea rcx, [rbp - 0x45]
movdqa xmm5, xmmword [0x1800feda0]
movdqa xmm4, xmmword [0x1800ff230]
movdqa xmm7, xmmword [0x1800fedf0]
movdqa xmmword [rbp - 0x59], xmm0
mov edx, dword [rbp - 0x59]
movd xmm6, r14d
movd xmm8, r15d
nop dword [rax]
movd xmm2, r8d
lea eax, [r8 + 4]
pshufd xmm2, xmm2, 0
lea rcx, [rcx + 8]
paddd xmm2, xmm5
movd xmm3, eax
movdqa xmm1, xmm2
pshufd xmm3, xmm3, 0
punpckldq xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
paddd xmm3, xmm5
pmuldq xmm0, xmm4
add r8d, 8
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm3
pand xmm2, xmmword [0x1800fef10]
packuswb xmm2, xmm2
punpckldq xmm1, xmm3
pmuldq xmm1, xmm4
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx - 0xc]
pxor xmm2, xmm0
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm4
movd dword [rcx - 0xc], xmm2
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm3, xmm0
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm1, xmm0, 0xd8
movd xmm0, edx
pshufd xmm2, xmm1, 0xd8
pand xmm2, xmmword [0x1800fef10]
packuswb xmm2, xmm2
paddb xmm2, xmm0
movd xmm0, dword [rcx - 8]
pxor xmm2, xmm0
movd dword [rcx - 8], xmm2
cmp r8d, 0x28
jl 0x180059620
cmp r8d, 0x29
jge 0x180059771
movsxd rax, r8d
lea r9, [rbp - 0x49]
add r9, rax
nop dword [rax]
nop word [rax + rax]
mov eax, 0x51eb851f
lea r9, [r9 + 1]
imul r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, dl
imul ecx, eax, 0x32
movzx eax, r8b
inc r8d
sub al, cl
add al, 0x34
xor byte [r9 - 1], al
cmp r8d, 0x29
jl 0x180059740
mov rax, qword gs:[0x60]
lea rdx, [rbp - 0x49]
mov r9b, 1
mov r8d, 7
mov rcx, qword [rax + 0x10]
call fcn.18004fc20
mov rcx, rax
mov rbx, rax
call fcn.18004efa0
test al, al
jne 0x180059993
movups xmm0, xmmword [0x1800efa38]
mov byte [0x1802117e0], al
xor r8d, r8d
movzx eax, word [0x1800efa58]
mov word [rbp + 7], ax
movzx eax, byte [0x1800efa5a]
mov byte [rbp + 9], al
movups xmm1, xmmword [0x1800efa48]
movups xmmword [rbp - 0x19], xmm0
movups xmmword [rbp - 9], xmm1
cmp edi, 2
jl 0x180059929
movdqa xmm0, xmmword [0x1800fef30]
lea rcx, [rbp - 0x15]
movdqa xmm5, xmmword [0x1800feda0]
movdqa xmm4, xmmword [0x1800ff230]
movdqa xmm7, xmmword [0x1800fedf0]
movdqa xmmword [rbp - 0x59], xmm0
mov edx, dword [rbp - 0x59]
movd xmm6, r14d
movd xmm8, r15d
nop word [rax + rax]
movd xmm2, r8d
lea eax, [r8 + 4]
pshufd xmm2, xmm2, 0
lea rcx, [rcx + 8]
paddd xmm2, xmm5
movd xmm3, eax
movdqa xmm1, xmm2
pshufd xmm3, xmm3, 0
punpckldq xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
paddd xmm3, xmm5
pmuldq xmm0, xmm4
add r8d, 8
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm3
pand xmm2, xmmword [0x1800fef10]
packuswb xmm2, xmm2
punpckldq xmm1, xmm3
pmuldq xmm1, xmm4
movd xmm0, edx
paddb xmm2, xmm0
movd xmm0, dword [rcx - 0xc]
pxor xmm2, xmm0
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm4
movd dword [rcx - 0xc], xmm2
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm3, xmm0
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm1, xmm0, 0xd8
movd xmm0, edx
pshufd xmm2, xmm1, 0xd8
pand xmm2, xmmword [0x1800fef10]
packuswb xmm2, xmm2
paddb xmm2, xmm0
movd xmm0, dword [rcx - 8]
pxor xmm2, xmm0
movd dword [rcx - 8], xmm2
cmp r8d, 0x20
jl 0x180059820
cmp r8d, 0x23
jge 0x180059971
movsxd rax, r8d
lea r9, [rbp - 0x19]
add r9, rax
nop dword [rax]
nop word [rax + rax]
mov eax, 0x51eb851f
lea r9, [r9 + 1]
imul r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, dl
imul ecx, eax, 0x32
movzx eax, r8b
inc r8d
sub al, cl
add al, 0x34
xor byte [r9 - 1], al
cmp r8d, 0x23
jl 0x180059940
mov rax, qword gs:[0x60]
lea rdx, [rbp - 0x19]
mov r9b, 1
mov r8d, 7
mov rcx, qword [rax + 0x10]
call fcn.18004fc20
mov rbx, rax
cmp byte [0x1802117e0], 0
je 0x1800599a5
mov qword [0x1802117e8], rbx
jmp 0x1800599ac
mov qword [0x1802117f0], rbx
mov rcx, rbx
call fcn.18004efa0
mov rbx, qword [rsp + 0xe8]
test al, al
jne 0x180059bb2
movups xmm0, xmmword [0x1800ef6e0]
movzx eax, byte [0x1800ef6f8]
xor ecx, ecx
mov byte [rbp - 0x31], al
movups xmmword [rbp - 0x49], xmm0
movsd xmm0, qword [str._v__9jL]
movsd qword [rbp - 0x39], xmm0
cmp edi, 2
jl 0x180059b36
movdqa xmm0, xmmword [0x1800fef30]
lea rdx, [rbp - 0x45]
movdqa xmm5, xmmword [0x1800feda0]
movdqa xmm4, xmmword [0x1800ff230]
movdqa xmm7, xmmword [0x1800fedf0]
movdqa xmmword [rbp - 0x59], xmm0
mov r8d, dword [rbp - 0x59]
movd xmm6, r14d
movd xmm8, r15d
nop dword [rax + rax]
movd xmm2, ecx
lea eax, [rcx + 4]
pshufd xmm2, xmm2, 0
lea rdx, [rdx + 8]
paddd xmm2, xmm5
movd xmm3, eax
movdqa xmm1, xmm2
pshufd xmm3, xmm3, 0
punpckldq xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
paddd xmm3, xmm5
pmuldq xmm0, xmm4
add ecx, 8
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm3
pand xmm2, xmmword [0x1800fef10]
packuswb xmm2, xmm2
punpckldq xmm1, xmm3
pmuldq xmm1, xmm4
movd xmm0, r8d
paddb xmm2, xmm0
movd xmm0, dword [rdx - 0xc]
pxor xmm2, xmm0
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm4
movd dword [rdx - 0xc], xmm2
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm3, xmm0
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm1, xmm0, 0xd8
movd xmm0, r8d
pshufd xmm2, xmm1, 0xd8
pand xmm2, xmmword [0x1800fef10]
packuswb xmm2, xmm2
paddb xmm2, xmm0
movd xmm0, dword [rdx - 8]
pxor xmm2, xmm0
movd dword [rdx - 8], xmm2
cmp ecx, 0x18
jl 0x180059a30
cmp ecx, 0x19
jge 0x180059b6d
movsxd rax, ecx
lea r8, [rbp - 0x49]
add r8, rax
mov eax, 0x51eb851f
lea r8, [r8 + 1]
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, dl
imul edx, eax, 0x32
movzx eax, cl
inc ecx
sub al, dl
add al, 0x34
xor byte [r8 - 1], al
cmp ecx, 0x19
jl 0x180059b40
xorps xmm0, xmm0
mov qword [rbp - 9], 0
movups xmmword [rbp - 0x19], xmm0
mov qword [rbp - 1], 0
lea rax, [rbp - 0x49]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], 0
jne 0x180059b90
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 0x19]
call fcn.180013d70
xor edx, edx
lea rcx, [rbp - 0x19]
call fcn.180029370
lea r11, [rsp + 0xc0]
mov rdi, qword [r11 + 0x30]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
movaps xmm8, xmmword [r11 - 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret