Function at 0x180040020
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
push rbp
push rbx
push rsi
push r13
push r15
lea rbp, [rax - 0x58]
sub rsp, 0x130
test byte [rcx + 0xc], 0x42
mov r13d, r9d
mov rbx, qword [0x1800801d0]
mov r15, r8
mov rsi, rcx
jne 0x180040962
cmp byte [rcx + 0x94], 0
jg 0x180040962
cmp byte [rcx + 0x95], 0
jg 0x180040962
cmp byte [rcx + 0x7f], 0
je 0x180040962
movss xmm1, dword [rbx + 0x1928]
movss xmm0, dword [rsi + 0x40]
movaps xmm2, xmm1
movzx ecx, byte [rbx + 0xcb]
mulss xmm1, dword [0x180071cac]
mov qword [rax + 0x20], rdi
mulss xmm2, dword [0x180071ce0]
mov qword [rax - 0x30], r12
xor r12b, r12b
mov qword [rax - 0x38], r14
movaps xmmword [rax - 0x48], xmm6
movaps xmmword [rax - 0x58], xmm7
movaps xmmword [rax - 0x68], xmm8
xorps xmm8, xmm8
movaps xmmword [rax - 0x88], xmm10
movss xmm10, dword [0x1800713bc]
movaps xmmword [rax - 0x98], xmm11
addss xmm0, xmm10
movaps xmmword [rax - 0xa8], xmm12
movaps xmmword [rax - 0xb8], xmm13
movss xmm13, dword [0x180071cf0]
movaps xmmword [rax - 0xc8], xmm14
movaps xmmword [rax - 0xd8], xmm15
addss xmm0, xmm1
movzx eax, cl
mov byte [rsp + 0x30], r12b
neg al
sbb r14d, r14d
maxss xmm2, xmm0
and r14d, 4
mov dword [rsp + 0x60], r14d
cvttss2si eax, xmm2
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x180071ccc]
cvttss2si eax, xmm0
movd xmm15, eax
cvtdq2ps xmm15, xmm15
movss dword [rsp + 0x64], xmm15
test cl, cl
je 0x180040158
movaps xmm7, xmm13
jmp 0x18004015b
xorps xmm7, xmm7
cmp byte [0x180071b17], r12b
movss xmm0, dword [0x180071d08]
mov rax, qword [0x180071b10]
movaps xmm11, xmm0
movss dword [rsp + 0x48], xmm0
movaps xmm12, xmm0
movss dword [rsp + 0x4c], xmm0
movaps xmm14, xmm0
movss dword [rsp + 0x38], xmm0
movaps xmm6, xmm0
movss dword [rsp + 0x3c], xmm0
mov qword [rbp + 0x60], rax
mov dword [rsi + 0x13c], 1
mov dword [rsi + 0x140], 2
je 0x1800401f2
xor r8d, r8d
movabs r9, 0x47ae147ae147ae15
nop
mov rax, r9
mul r8
mov rax, r8
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
movsx eax, al
imul ecx, eax, 0x32
movzx eax, r8b
sub al, cl
add al, 0x31
xor byte [rbp + r8 + 0x60], al
inc r8
cmp r8, 8
jb 0x1800401c0
lea rcx, [rbp + 0x60]
movaps xmmword [rsp + 0xe0], xmm9
call fcn.18003aea0
xor edi, edi
test r13d, r13d
jle 0x180040516
mov r15, qword [rbp + 0x80]
lea r14, [0x18007d2c8]
movss xmm9, dword [0x180071470]
nop word [rax + rax]
movss xmm0, dword [rsi + 0x10]
movss xmm1, dword [rsi + 0x14]
movaps xmm3, xmm0
addss xmm3, dword [rsi + 0x18]
movaps xmm2, xmm1
addss xmm2, dword [rsi + 0x1c]
subss xmm3, xmm0
subss xmm2, xmm1
mulss xmm3, dword [r14 - 8]
mulss xmm2, dword [r14 - 4]
addss xmm3, xmm0
movss xmm0, dword [r14]
movaps xmm5, xmm0
mulss xmm0, xmm7
addss xmm2, xmm1
mulss xmm5, xmm15
movss xmm1, dword [r14 + 4]
movaps xmm4, xmm1
mulss xmm1, xmm7
addss xmm5, xmm3
mulss xmm4, xmm15
subss xmm3, xmm0
addss xmm4, xmm2
subss xmm2, xmm1
movss dword [rsp + 0x58], xmm5
comiss xmm3, xmm5
movss dword [rsp + 0x50], xmm3
movss dword [rsp + 0x54], xmm2
movss dword [rsp + 0x5c], xmm4
jbe 0x1800402c2
movss dword [rsp + 0x50], xmm5
movss dword [rsp + 0x58], xmm3
comiss xmm2, xmm4
jbe 0x1800402d3
movss dword [rsp + 0x54], xmm4
movss dword [rsp + 0x5c], xmm2
mov edx, edi
mov rcx, rsi
call fcn.180033970
mov edx, eax
mov dword [rsp + 0x20], 0x4080
lea r9, [rbp + 0x60]
lea r8, [rsp + 0x31]
lea rcx, [rsp + 0x50]
call fcn.180056ad0
movzx edx, byte [rsp + 0x31]
movzx ecx, byte [rbp + 0x60]
test dl, dl
jne 0x18004030f
test cl, cl
je 0x180040491
mov eax, edi
not eax
and eax, 1
add eax, 5
mov dword [rbx + 0x1f18], eax
test cl, cl
je 0x180040491
cmp byte [rbx + 0x42d], r12b
je 0x1800403df
test edi, edi
jne 0x1800403df
mov rax, qword [rbp + 0x68]
lea rcx, [rsp + 0x78]
mov rdx, rsi
mov r8, qword [rax]
call fcn.180030c90
mov rdx, qword [0x1800801d0]
mov byte [rsp + 0x30], 1
movss xmm14, dword [rax]
movss xmm6, dword [rax + 4]
mov ecx, dword [rdx + 0x1ac8]
test ecx, ecx
movss dword [rsp + 0x38], xmm14
setne al
movss dword [rsp + 0x3c], xmm6
mov byte [rdx + 0x1ad4], al
xor eax, eax
test ecx, ecx
je 0x180040397
mov dword [rdx + 0x1ad0], eax
mov word [rdx + 0x1ad6], ax
mov dword [rdx + 0x1ac8], eax
mov byte [rdx + 0x1ad5], r12b
mov qword [rdx + 0x1af8], rax
mov byte [rdx + 0x1ad8], r12b
mov qword [rdx + 0x1adc], 0
mov qword [rdx + 0x1ae8], rax
movzx ecx, byte [rbp + 0x60]
movzx edx, byte [rsp + 0x31]
test cl, cl
je 0x1800404a5
mov ecx, 0x20
jmp 0x1800404b0
movss xmm0, dword [r14]
lea rax, [rsp + 0x38]
movss xmm3, dword [r14 + 4]
lea r9, [rsp + 0x48]
movaps xmm2, xmm0
mov qword [rsp + 0x20], rax
mulss xmm2, xmm7
lea r8, [r14 - 8]
lea rdx, [rsp + 0x40]
mov rcx, rsi
movaps xmm5, xmm15
movaps xmm4, xmm3
xorps xmm5, xmm9
mulss xmm4, xmm7
movaps xmm1, xmm5
mulss xmm5, xmm3
mulss xmm1, xmm0
movss xmm0, dword [rbx + 0x130]
subss xmm5, xmm4
subss xmm0, dword [rbx + 0x1af0]
subss xmm1, xmm2
mulss xmm5, dword [r14 - 4]
mulss xmm1, dword [r14 - 8]
addss xmm5, xmm4
addss xmm1, xmm2
movss xmm2, dword [rbx + 0x134]
subss xmm2, dword [rbx + 0x1af4]
addss xmm1, xmm0
addss xmm2, xmm5
movss dword [rsp + 0x40], xmm1
movss dword [rsp + 0x44], xmm2
call fcn.180030630
movzx ecx, byte [rbp + 0x60]
movzx edx, byte [rsp + 0x31]
movss xmm6, dword [rsp + 0x3c]
movss xmm14, dword [rsp + 0x38]
test edi, edi
je 0x1800403cd
test cl, cl
jne 0x1800403d5
test dl, dl
je 0x1800404e6
xor ecx, ecx
test dl, dl
setne cl
add rcx, 0x1e
mov rax, qword [0x1800801d0]
add rcx, rcx
movups xmm0, xmmword [rax + rcx*8 + 0x161c]
lea rcx, [rsp + 0x68]
movups xmmword [rsp + 0x68], xmm0
shufps xmm0, xmm0, 0xff
mulss xmm0, dword [rax + 0x1568]
movss dword [rsp + 0x74], xmm0
call fcn.180031520
mov dword [r15], eax
inc edi
add r14, 0x18
add r15, 4
cmp edi, r13d
jl 0x180040230
movss xmm12, dword [rsp + 0x4c]
movss xmm11, dword [rsp + 0x48]
mov r14d, dword [rsp + 0x60]
mov r15, qword [rbp + 0x70]
movzx r12d, byte [rsp + 0x30]
xor edi, edi
test r14d, r14d
je 0x1800406ff
movss xmm15, dword [0x180071c9c]
nop word [rax + rax]
movss xmm3, dword [rsp + 0x64]
lea rcx, [rsp + 0x68]
mov r8d, edi
movss dword [rsp + 0x20], xmm13
mov rdx, rsi
call fcn.180033fe0
lea edx, [rdi + 4]
mov rcx, rsi
call fcn.180033970
mov edx, eax
mov dword [rsp + 0x20], 0x80
lea r9, [rbp + 0x60]
lea r8, [rsp + 0x30]
lea rcx, [rsp + 0x68]
call fcn.180056ad0
cmp byte [rsp + 0x30], 0
movzx ecx, byte [rbp + 0x60]
je 0x18004058e
movss xmm0, dword [rbx + 0x1ac0]
comiss xmm0, xmm15
ja 0x180040596
test cl, cl
je 0x1800406f4
mov eax, edi
and eax, 1
add eax, 3
mov dword [rbx + 0x1f18], eax
test cl, cl
je 0x1800406f4
mov dword [r15], edi
movaps xmm9, xmm8
movss xmm0, dword [rsi + 0x10]
movss xmm1, dword [rsi + 0x14]
movaps xmm6, xmm0
movaps xmm7, xmm1
test edi, edi
jne 0x1800405de
movss xmm7, dword [rbx + 0x134]
subss xmm7, dword [rbx + 0x1af4]
addss xmm7, xmm13
jmp 0x180040645
cmp edi, 1
jne 0x1800405fe
movss xmm6, dword [rbx + 0x130]
movaps xmm9, xmm8
subss xmm6, dword [rbx + 0x1af0]
addss xmm6, xmm13
jmp 0x180040649
movaps xmm10, xmm8
cmp edi, 2
jne 0x180040627
movss xmm7, dword [rbx + 0x134]
subss xmm7, dword [rbx + 0x1af4]
movss xmm9, dword [0x1800713bc]
addss xmm7, xmm13
jmp 0x180040649
cmp edi, 3
jne 0x180040649
movss xmm6, dword [rbx + 0x130]
movaps xmm9, xmm8
subss xmm6, dword [rbx + 0x1af0]
addss xmm6, xmm13
movaps xmm10, xmm8
movaps xmm11, xmm0
lea rcx, [rsp + 0x40]
addss xmm0, dword [rsi + 0x18]
subss xmm11, xmm6
movaps xmm12, xmm1
addss xmm1, dword [rsi + 0x1c]
subss xmm12, xmm7
mov rdx, rsi
mulss xmm11, xmm10
mulss xmm12, xmm9
addss xmm11, xmm6
subss xmm6, xmm0
addss xmm12, xmm7
subss xmm7, xmm1
mulss xmm6, xmm10
mulss xmm7, xmm9
addss xmm6, xmm0
addss xmm7, xmm1
subss xmm6, xmm11
subss xmm7, xmm12
movaps xmm0, xmm6
unpcklps xmm0, xmm7
movq r8, xmm0
call fcn.180030c90
ucomiss xmm10, xmm8
movss xmm14, dword [rsp + 0x40]
jp 0x1800406d1
jne 0x1800406d1
movaps xmm0, xmm14
subss xmm0, xmm6
subss xmm11, xmm0
ucomiss xmm9, xmm8
movss xmm6, dword [rsp + 0x44]
jp 0x1800406eb
jne 0x1800406eb
movaps xmm0, xmm6
subss xmm0, xmm7
subss xmm12, xmm0
movss xmm10, dword [0x1800713bc]
inc edi
cmp edi, r14d
jl 0x180040530
mov rax, qword [0x1800801d0]
movaps xmm15, xmmword [rsp + 0x80]
movaps xmm13, xmmword [rsp + 0xa0]
movaps xmm10, xmmword [rsp + 0xd0]
mov rcx, qword [rax + 0x1a80]
mov r14, qword [rsp + 0x120]
mov rdi, qword [rsp + 0x178]
dec dword [rcx + 0xc0]
mov dword [rsi + 0x13c], 0
mov dword [rsi + 0x140], 1
mov rax, qword [rbx + 0x1d18]
test rax, rax
je 0x180040875
cmp qword [rax + 0x368], rsi
jne 0x180040875
mov eax, dword [rbx + 0x1c2c]
cmp eax, 3
jne 0x18004078c
cmp byte [rbx + 0x149], 0
je 0x180040875
lea edx, [rax - 2]
jmp 0x180040798
cmp eax, 4
jne 0x180040875
lea edx, [rax - 2]
movaps xmm3, xmm8
movss dword [rsp + 0x20], xmm8
xor r8d, r8d
lea rcx, [rbp + 0x60]
call fcn.180033c80
movss xmm7, dword [rax]
ucomiss xmm7, xmm8
movss xmm9, dword [rax + 4]
jp 0x1800407cd
jne 0x1800407cd
ucomiss xmm9, xmm8
jp 0x1800407cd
je 0x180040875
movss xmm0, dword [rbx + 0x18]
lea rcx, [rsp + 0x68]
mulss xmm0, dword [0x180071cfc]
mov byte [rbx + 0x1d38], 0
movss xmm1, dword [rbx + 0xc0]
minss xmm1, dword [rbx + 0xc4]
mov byte [rbx + 0x1c4f], 1
mulss xmm1, xmm0
cvttss2si eax, xmm1
movd xmm6, eax
mov rax, qword [0x1800801d0]
cvtdq2ps xmm6, xmm6
movups xmm0, xmmword [rax + 0x181c]
movups xmmword [rsp + 0x68], xmm0
shufps xmm0, xmm0, 0xff
mulss xmm0, dword [rax + 0x1568]
movss dword [rsp + 0x74], xmm0
call fcn.180031520
mov rcx, qword [rbp + 0x80]
mov rdx, rsi
mulss xmm7, xmm6
mulss xmm9, xmm6
mov dword [rcx], eax
lea rcx, [rbp + 0x60]
addss xmm7, dword [rsi + 0x20]
addss xmm9, dword [rsi + 0x24]
movaps xmm0, xmm7
unpcklps xmm0, xmm9
movq r8, xmm0
call fcn.180030c90
movss xmm14, dword [rax]
movss xmm6, dword [rax + 4]
movss xmm0, dword [0x180071d08]
ucomiss xmm14, xmm0
movaps xmm9, xmmword [rsp + 0xe0]
movaps xmm7, xmmword [rsp + 0x100]
jp 0x180040896
je 0x1800408c4
test dword [rsi + 0xc], 0x100
movss dword [rsi + 0x20], xmm14
movss dword [rsi + 0x24], xmm6
mov rcx, qword [0x1800801d0]
jne 0x1800408c4
comiss xmm8, dword [rcx + 0x2f94]
jb 0x1800408c4
mov eax, dword [rcx + 0x1c]
mov dword [rcx + 0x2f94], eax
ucomiss xmm11, xmm0
movaps xmm14, xmmword [rsp + 0x90]
movaps xmm6, xmmword [rsp + 0x110]
jp 0x1800408dd
je 0x180040922
test dword [rsi + 0xc], 0x100
cvttss2si eax, xmm11
movd xmm1, eax
cvttss2si eax, xmm12
cvtdq2ps xmm1, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [rsi + 0x10], xmm1
movss dword [rsi + 0x14], xmm0
mov rdx, qword [0x1800801d0]
jne 0x180040922
comiss xmm8, dword [rdx + 0x2f94]
jb 0x180040922
mov ecx, dword [rdx + 0x1c]
mov dword [rdx + 0x2f94], ecx
movsd xmm0, qword [rsi + 0x20]
movzx eax, r12b
movaps xmm12, xmmword [rsp + 0xb0]
movaps xmm11, xmmword [rsp + 0xc0]
movaps xmm8, xmmword [rsp + 0xf0]
mov r12, qword [rsp + 0x128]
movsd qword [rsi + 0x18], xmm0
add rsp, 0x130
pop r15
pop r13
pop rsi
pop rbx
pop rbp
ret
xor al, al
add rsp, 0x130
pop r15
pop r13
pop rsi
pop rbx
pop rbp
ret