Function at 0x180046aa0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x108
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x70], xmm11
movaps xmmword [rbp + 0x60], xmm10
movaps xmmword [rbp + 0x50], xmm9
movaps xmmword [rbp + 0x40], xmm8
movaps xmmword [rbp + 0x30], xmm7
movaps xmmword [rbp + 0x20], xmm6
mov qword [rbp + 0x18], 0xfffffffffffffffe
mov rsi, rdx
mov r14, rcx
mov r15, qword [rdx + 0x10]
cmp r15, 1
jne 0x180046b44
movzx eax, byte [0x1800a4291]
mov ecx, 4
mov edx, 4
call fcn.1800458d0
test rax, rax
je 0x18004711e
mov dword [rax], 1
mov dword [r14], 0
mov qword [r14 + 8], rax
mov qword [r14 + 0x10], 1
mov qword [r14 + 0x18], 1
mov rdx, qword [rsi + 8]
test rdx, rdx
je 0x180047181
mov rbx, qword [rsi]
jmp 0x18004716f
mov rax, r15
dec rax
je 0x180046b56
bsr rax, rax
xor rax, 0x3f
jmp 0x180046b5b
mov eax, 0x40
mov edi, 0x40
sub edi, eax
cmp edi, r9d
cmovbe edi, r9d
mov r12d, 1
mov ecx, edi
shl r12d, cl
test r8, r8
js 0x180046b83
xorps xmm7, xmm7
cvtsi2ss xmm7, r8
jmp 0x180046b9c
mov rax, r8
shr rax, 1
and r8d, 1
or r8, rax
xorps xmm7, xmm7
cvtsi2ss xmm7, r8
addss xmm7, xmm7
mov rbx, qword [rsi]
lea r13, [r15*4]
xorps xmm6, xmm6
test r15, r15
je 0x180046d07
movzx eax, byte [0x1800a4291]
mov edx, 4
mov rcx, r13
call fcn.1800458d0
test rax, rax
je 0x180047133
mov r8, rax
cvtsi2ss xmm0, r12
divss xmm0, xmm7
xor eax, eax
mov rdx, r8
cmp r15, 8
jb 0x180046cc2
mov rcx, r8
sub rcx, rbx
cmp rcx, 0x20
jb 0x180046cc2
mov rax, r15
and rax, 0xfffffffffffffff8
movaps xmm1, xmm0
shufps xmm1, xmm0, 0
xor ecx, ecx
movdqa xmm2, xmmword [0x1800855f0]
movdqa xmm3, xmmword [0x180085600]
movdqa xmm4, xmmword [0x180085610]
movaps xmm5, xmmword [0x180085620]
movaps xmm7, xmmword [0x180086a00]
xorps xmm8, xmm8
nop word cs:[rax + rax]
movdqu xmm9, xmmword [rbx + rcx*4]
movdqu xmm10, xmmword [rbx + rcx*4 + 0x10]
movdqa xmm11, xmm9
pand xmm11, xmm2
por xmm11, xmm3
psrld xmm9, 0x10
por xmm9, xmm4
subps xmm9, xmm5
addps xmm9, xmm11
movdqa xmm11, xmm10
pand xmm11, xmm2
por xmm11, xmm3
psrld xmm10, 0x10
por xmm10, xmm4
subps xmm10, xmm5
addps xmm10, xmm11
mulps xmm9, xmm1
mulps xmm10, xmm1
addps xmm9, xmm7
addps xmm10, xmm7
maxps xmm9, xmm8
maxps xmm10, xmm8
movups xmmword [rdx + rcx*4], xmm9
movups xmmword [rdx + rcx*4 + 0x10], xmm10
add rcx, 8
cmp rax, rcx
jne 0x180046c40
cmp r15, rax
je 0x180046cf4
movss xmm1, dword [0x180086a10]
pxor xmm2, xmm2
nop
mov ecx, dword [rbx + rax*4]
xorps xmm3, xmm3
cvtsi2ss xmm3, rcx
mulss xmm3, xmm0
addss xmm3, xmm1
maxss xmm3, xmm2
movss dword [rdx + rax*4], xmm3
inc rax
cmp r15, rax
jne 0x180046cd0
mov eax, r15d
and eax, 7
cmp r15, 8
jae 0x180046d18
xorps xmm0, xmm0
xor ecx, ecx
jmp 0x180046d70
mov r9d, 4
mov r8d, 4
xorps xmm0, xmm0
jmp 0x180046d91
mov rdx, r15
and rdx, 0xfffffffffffffff8
xorps xmm0, xmm0
xor ecx, ecx
mov r9, r8
nop word [rax + rax]
addss xmm0, dword [r9 + rcx*4]
addss xmm0, dword [r9 + rcx*4 + 4]
addss xmm0, dword [r9 + rcx*4 + 8]
addss xmm0, dword [r9 + rcx*4 + 0xc]
addss xmm0, dword [r9 + rcx*4 + 0x10]
addss xmm0, dword [r9 + rcx*4 + 0x14]
addss xmm0, dword [r9 + rcx*4 + 0x18]
addss xmm0, dword [r9 + rcx*4 + 0x1c]
add rcx, 8
cmp rdx, rcx
jne 0x180046d30
test rax, rax
je 0x180046d8d
lea rcx, [r8 + rcx*4]
xor edx, edx
nop dword [rax + rax]
addss xmm0, dword [rcx + rdx*4]
inc rdx
cmp rax, rdx
jne 0x180046d80
lea r9, [r8 + r15*4]
mov qword [rbp - 0x30], r13
mov dword [rbp - 0x24], edi
ucomiss xmm0, xmm6
mov qword [rbp - 0x10], r8
jne 0x180046da3
jnp 0x180046db9
mov eax, r12d
sub eax, r15d
xorps xmm6, xmm6
cvtsi2ss xmm6, rax
mov r8, qword [rbp - 0x10]
divss xmm6, xmm0
mov rdi, r9
sub rdi, r8
mov r10, r9
mov r13b, 1
sub r10, r8
mov qword [rbp - 0x38], r15
je 0x180046e21
mov qword [rbp], rsi
mov qword [rbp - 0x18], r9
movabs rax, 0x7ffffffffffffffd
cmp r10, rax
jae 0x180047146
movzx eax, byte [0x1800a4291]
mov edx, 4
mov rcx, r10
mov rsi, r10
call fcn.1800458d0
test rax, rax
je 0x18004714d
mov r15, rax
shr rdi, 2
cmp rsi, 0x20
mov r10, rsi
jae 0x180046e3f
xor eax, eax
mov rdx, qword [rbp - 0x10]
jmp 0x180046e8e
xor eax, eax
mov qword [rbp - 8], rax
mov r15d, 4
xor edi, edi
mov eax, 4
mov qword [rbp + 8], rax
xor eax, eax
jmp 0x180047223
mov rax, rdi
and rax, 0xfffffffffffffff8
movaps xmm0, xmm6
shufps xmm0, xmm6, 0
xor ecx, ecx
movaps xmm1, xmmword [0x180086a20]
mov rdx, qword [rbp - 0x10]
nop word [rax + rax]
movups xmm2, xmmword [rdx + rcx*4]
movups xmm3, xmmword [rdx + rcx*4 + 0x10]
mulps xmm2, xmm0
mulps xmm3, xmm0
addps xmm2, xmm1
addps xmm3, xmm1
movups xmmword [r15 + rcx*4], xmm2
movups xmmword [r15 + rcx*4 + 0x10], xmm3
add rcx, 8
cmp rax, rcx
jne 0x180046e60
cmp rdi, rax
je 0x180046ebb
movss xmm0, dword [0x180083be0]
nop word cs:[rax + rax]
movss xmm1, dword [rdx + rax*4]
mulss xmm1, xmm6
addss xmm1, xmm0
movss dword [r15 + rax*4], xmm1
inc rax
cmp rdi, rax
jne 0x180046ea0
test r10, r10
sete byte [rbp + 0x17]
je 0x180046f01
movzx eax, byte [0x1800a4291]
mov edx, 4
mov rcx, r10
mov rsi, r10
call fcn.1800458d0
test rax, rax
mov qword [rbp - 0x20], rsi
je 0x18004715c
mov r13, rax
mov qword [rbp + 8], r14
cmp rsi, 0x10
jae 0x180046f21
xor r14d, r14d
mov rsi, qword [rbp]
jmp 0x18004707b
xor eax, eax
mov qword [rbp - 8], rax
mov eax, 4
mov qword [rbp + 8], rax
xor edi, edi
xor eax, eax
mov r9, qword [rbp - 0x18]
mov rsi, qword [rbp]
jmp 0x180047223
mov qword [rbp - 8], rbx
mov rbx, r13
mov r14, rdi
and r14, 0xfffffffffffffffc
xor esi, esi
xorps xmm10, xmm10
movss xmm11, dword [0x180085660]
xor r13d, r13d
jmp 0x180046faf
ucomiss xmm8, xmm11
cmova ecx, eax
cvttss2si r8, xmm7
ucomiss xmm7, xmm10
cmovb r8d, esi
ucomiss xmm7, xmm11
movd xmm0, edx
cmova r8d, eax
cvttss2si rdx, xmm6
ucomiss xmm6, xmm10
cmovb edx, esi
ucomiss xmm6, xmm11
movd xmm1, ecx
cmova edx, eax
punpckldq xmm1, xmm0
movd xmm0, r8d
movd xmm2, edx
punpckldq xmm0, xmm2
punpcklqdq xmm0, xmm1
movdqu xmmword [rbx + r13*4], xmm0
add r13, 4
cmp r14, r13
je 0x180047050
movups xmm9, xmmword [r15 + r13*4]
movaps xmm0, xmm9
shufps xmm0, xmm9, 0x55
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movaps xmm6, xmm0
movaps xmm0, xmm9
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movaps xmm7, xmm0
movaps xmm0, xmm9
unpckhpd xmm0, xmm9
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movaps xmm8, xmm0
shufps xmm9, xmm9, 0xff
movaps xmm0, xmm9
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
ucomiss xmm0, xmm10
mov ecx, 0
jae 0x180047020
ucomiss xmm0, xmm11
mov eax, 0xffffffff
mov edx, 0xffffffff
jbe 0x180047035
ucomiss xmm8, xmm10
mov ecx, 0
jb 0x180046f50
jmp 0x180047046
cvttss2si rcx, xmm0
ucomiss xmm0, xmm11
mov eax, 0xffffffff
mov edx, 0xffffffff
ja 0x18004700c
mov edx, ecx
ucomiss xmm8, xmm10
mov ecx, 0
jb 0x180046f50
cvttss2si rcx, xmm8
jmp 0x180046f50
cmp rdi, r14
mov rsi, qword [rbp]
mov r13, rbx
mov rbx, qword [rbp - 8]
jne 0x18004707b
mov r10, qword [rbp - 0x20]
cmp r10, 0x20
jae 0x1800470c6
xor eax, eax
xor ecx, ecx
mov r14, qword [rbp + 8]
mov r9, qword [rbp - 0x18]
jmp 0x1800471b4
xorps xmm6, xmm6
movss xmm7, dword [0x180085660]
jmp 0x18004709d
mov dword [r13 + r14*4], ecx
inc r14
cmp rdi, r14
je 0x180047060
movss xmm0, dword [r15 + r14*4]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
cvttss2si rax, xmm0
ucomiss xmm0, xmm6
mov ecx, 0
cmovb eax, ecx
ucomiss xmm0, xmm7
mov ecx, 0xffffffff
ja 0x180047090
mov ecx, eax
jmp 0x180047090
mov rcx, rdi
and rcx, 0xfffffffffffffff8
xorps xmm0, xmm0
xor eax, eax
xorps xmm1, xmm1
mov r14, qword [rbp + 8]
mov r9, qword [rbp - 0x18]
nop dword [rax]
movdqu xmm2, xmmword [r13 + rax*4]
paddd xmm0, xmm2
movdqu xmm2, xmmword [r13 + rax*4 + 0x10]
paddd xmm1, xmm2
add rax, 8
cmp rcx, rax
jne 0x1800470e0
paddd xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd eax, xmm1
jmp 0x1800471bc
mov qword [rbp], rsi
mov ecx, 4
mov edx, 4
call fcn.180082720
jmp 0x18004716d
mov qword [rbp], rsi
mov ecx, 4
mov rdx, r13
call fcn.180082720
jmp 0x18004716d
call fcn.18006c380
jmp 0x18004716d
mov ecx, 4
mov rdx, rsi
call fcn.180082720
jmp 0x18004716d
mov qword [rbp - 0x40], r15
mov ecx, 4
mov rdx, rsi
call fcn.180082720
ud2
shl rdx, 2
mov r8d, 4
mov rcx, rbx
call fcn.1800458e0
mov rax, r14
movaps xmm6, xmmword [rbp + 0x20]
movaps xmm7, xmmword [rbp + 0x30]
movaps xmm8, xmmword [rbp + 0x40]
movaps xmm9, xmmword [rbp + 0x50]
movaps xmm10, xmmword [rbp + 0x60]
movaps xmm11, xmmword [rbp + 0x70]
add rsp, 0x108
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
add eax, dword [r13 + rcx*4]
inc rcx
cmp rdi, rcx
jne 0x1800471b4
cmp eax, r12d
jbe 0x180047208
xor ecx, ecx
jmp 0x1800471d8
inc rcx
cmp eax, r12d
jbe 0x180047208
cmp rdi, rcx
je 0x180047646
mov edx, dword [r13 + rcx*4]
cmp edx, 1
jbe 0x1800471d0
mov r8d, edx
xorps xmm0, xmm0
cvtsi2ss xmm0, r8
ucomiss xmm0, dword [r15 + rcx*4]
jbe 0x1800471d0
dec edx
mov dword [r13 + rcx*4], edx
dec eax
jmp 0x1800471d0
mov qword [rbp + 8], r13
cmp eax, r12d
jae 0x1800475ea
movzx ecx, byte [rbp + 0x17]
mov r13d, ecx
mov rcx, r10
mov qword [rbp - 8], r10
xor ecx, ecx
mov r8, qword [rbp + 8]
jmp 0x180047238
inc rcx
cmp eax, r12d
jae 0x180047262
cmp rdi, rcx
je 0x18004760b
mov edx, dword [r8 + rcx*4]
xorps xmm0, xmm0
cvtsi2ss xmm0, rdx
movss xmm1, dword [r15 + rcx*4]
ucomiss xmm1, xmm0
jbe 0x180047230
inc edx
mov dword [r8 + rcx*4], edx
inc eax
jmp 0x180047230
mov r12d, r13d
mov rcx, qword [rbp - 0x10]
cmp r9, rcx
je 0x180047283
mov r8d, 4
mov rcx, r15
mov rdx, r10
call fcn.1800458e0
mov rcx, qword [rbp - 0x10]
cmp qword [rbp - 0x38], 0
je 0x180047299
mov r8d, 4
mov rdx, qword [rbp - 0x30]
call fcn.1800458e0
test r13b, r13b
jne 0x180047670
mov r11, qword [rbp + 8]
mov eax, dword [r11]
test eax, eax
je 0x1800472c7
tzcnt r9d, eax
movabs rax, 0x3fffffffffffffff
cmp rdi, 1
jne 0x1800472e1
jmp 0x180047509
mov r9d, 0x20
movabs rax, 0x3fffffffffffffff
cmp rdi, 1
je 0x180047509
lea r8, [rdi + rax]
mov rcx, r8
and rcx, rax
cmp rcx, 8
jae 0x1800472f8
xor edx, edx
jmp 0x1800475d8
and r8d, 7
mov rdx, rcx
sub rdx, r8
movd xmm0, r9d
pshufd xmm1, xmm0, 0
xor r9d, r9d
pcmpeqd xmm2, xmm2
movdqa xmm3, xmmword [str.UUUUUUUUUUUUUUUU3333333333333333]
movdqa xmm5, xmmword [0x1800856d0]
movdqa xmm6, xmmword [0x1800856e0]
xorps xmm7, xmm7
movdqa xmm0, xmmword [0x1800837a0]
movdqa xmm4, xmm1
nop word [rax + rax]
movdqu xmm10, xmmword [r11 + r9*4 + 4]
movdqu xmm9, xmmword [r11 + r9*4 + 0x14]
movdqa xmm8, xmm10
paddd xmm8, xmm2
pandn xmm10, xmm8
movdqa xmm8, xmm10
psrlw xmm8, 1
pand xmm8, xmm3
psubb xmm10, xmm8
movdqa xmm8, xmm10
pand xmm8, xmm5
psrlw xmm10, 2
pand xmm10, xmm5
paddb xmm10, xmm8
movdqa xmm8, xmm10
psrlw xmm8, 4
paddb xmm8, xmm10
pand xmm8, xmm6
movdqa xmm10, xmm8
punpckhdq xmm10, xmm7
psadbw xmm10, xmm7
punpckldq xmm8, xmm7
psadbw xmm8, xmm7
packuswb xmm8, xmm10
movdqa xmm10, xmm9
paddd xmm10, xmm2
pandn xmm9, xmm10
movdqa xmm10, xmm9
psrlw xmm10, 1
pand xmm10, xmm3
psubb xmm9, xmm10
movdqa xmm10, xmm9
pand xmm10, xmm5
psrlw xmm9, 2
pand xmm9, xmm5
paddb xmm9, xmm10
movdqa xmm10, xmm9
psrlw xmm10, 4
paddb xmm10, xmm9
pand xmm10, xmm6
movdqa xmm9, xmm10
punpckhdq xmm9, xmm7
psadbw xmm9, xmm7
punpckldq xmm10, xmm7
psadbw xmm10, xmm7
packuswb xmm10, xmm9
movdqa xmm9, xmm1
movdqa xmm11, xmm8
por xmm11, xmm0
pxor xmm1, xmm0
pcmpgtd xmm11, xmm1
pand xmm9, xmm11
pandn xmm11, xmm8
movdqa xmm1, xmm11
por xmm1, xmm9
movdqa xmm8, xmm4
movdqa xmm9, xmm10
por xmm9, xmm0
pxor xmm4, xmm0
pcmpgtd xmm9, xmm4
pand xmm8, xmm9
pandn xmm9, xmm10
movdqa xmm4, xmm9
por xmm4, xmm8
add r9, 8
cmp rdx, r9
jne 0x180047340
movdqa xmm2, xmm1
pxor xmm2, xmm0
movdqa xmm3, xmm4
pxor xmm3, xmm0
pcmpgtd xmm3, xmm2
pand xmm1, xmm3
pandn xmm3, xmm4
por xmm3, xmm1
pshufd xmm1, xmm3, 0xee
movdqa xmm2, xmm3
pxor xmm2, xmm0
movdqa xmm4, xmm1
pxor xmm4, xmm0
pcmpgtd xmm4, xmm2
pand xmm3, xmm4
pandn xmm4, xmm1
por xmm4, xmm3
pshufd xmm1, xmm4, 0x55
movdqa xmm2, xmm4
pxor xmm2, xmm0
pxor xmm0, xmm1
pcmpgtd xmm0, xmm2
pand xmm4, xmm0
pandn xmm0, xmm1
por xmm0, xmm4
movd r9d, xmm0
test r8, r8
jne 0x1800475d8
mov ecx, r9d
and ecx, 0x1f
lea rdx, [rdi - 1]
and rdx, rax
mov rax, r11
cmp rdx, 7
jb 0x180047570
inc rdx
mov r8, rdx
and r8, 0xfffffffffffffff8
lea rax, [r11 + r8*4]
movd xmm1, ecx
xor r10d, r10d
pxor xmm0, xmm0
movss xmm0, xmm1
nop dword [rax]
movdqu xmm1, xmmword [r11 + r10*4]
movdqu xmm2, xmmword [r11 + r10*4 + 0x10]
psrld xmm1, xmm0
psrld xmm2, xmm0
movdqu xmmword [r11 + r10*4], xmm1
movdqu xmmword [r11 + r10*4 + 0x10], xmm2
add r10, 8
cmp r8, r10
jne 0x180047540
cmp rdx, r8
je 0x18004758b
lea rdx, [r11 + rdi*4]
nop word cs:[rax + rax]
shr dword [rax], cl
add rax, 4
cmp rax, rdx
jne 0x180047580
mov eax, dword [rbp - 0x24]
sub eax, r9d
mov qword [r14 + 8], r11
mov qword [r14 + 0x10], rdi
mov qword [r14 + 0x18], rdi
mov dword [r14], eax
mov rdx, qword [rsi + 8]
test rdx, rdx
jne 0x18004716f
jmp 0x180047181
tzcnt r8d, r8d
cmp r9d, r8d
cmovae r9d, r8d
inc rdx
cmp rcx, rdx
je 0x180047509
mov r8d, dword [r11 + rdx*4 + 4]
test r8d, r8d
jne 0x1800475c0
mov r8d, 0x20
jmp 0x1800475c5
xor r13d, r13d
mov rax, r10
mov qword [rbp - 8], r10
movzx r12d, byte [rbp + 0x17]
mov rcx, qword [rbp - 0x10]
cmp r9, rcx
jne 0x18004726e
jmp 0x180047283
mov qword [rbp - 0x20], r10
mov qword [rbp - 0x18], r9
mov qword [rbp], rsi
mov byte [rbp + 0x16], r13b
mov rax, qword [rbp - 8]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], r15
mov rax, qword [rbp + 8]
mov qword [rbp - 0x58], rax
lea r8, [0x180086a60]
mov rcx, rdi
mov rdx, rdi
call fcn.180082960
jmp 0x18004716d
movzx eax, byte [rbp + 0x17]
mov byte [rbp + 0x16], al
mov qword [rbp - 0x48], r10
mov qword [rbp - 0x50], r15
mov qword [rbp - 0x58], r13
lea r8, [0x180086a78]
mov rcx, rdi
mov rdx, rdi
call fcn.180082960
jmp 0x18004716d
mov byte [rbp + 0x17], r12b
mov qword [rbp], rsi
lea rcx, [0x180086a90]
lea r8, [0x180086ac0]
mov edx, 0x2b
call fcn.1800828c0
jmp 0x18004716d