Function at 0x41d480
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x108
movaps xmmword [rsp + 0xb0], xmm6
movaps xmmword [rsp + 0xc0], xmm7
movaps xmmword [rsp + 0xd0], xmm8
movaps xmmword [rsp + 0xe0], xmm9
movaps xmmword [rsp + 0xf0], xmm10
mov r14d, dword [rsp + 0x178]
mov rdi, rcx
mov r13, rdx
mov rbx, r8
mov r12d, r9d
cmp r9d, 1
je 0x41dab0
mov eax, dword [rcx]
lea rdx, [rsp + 0x90]
mov esi, dword [rsp + 0x1a0]
pxor xmm6, xmm6
mov dword [rsp + 0x60], eax
mov rax, qword [rcx + 0x20]
mov dword [rsp + 0x20], r9d
mov r9, r8
mov r8, r13
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x1a0]
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x188]
mov dword [rsp + 0x48], 1
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x170]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x38], r14d
mov dword [rsp + 0x30], r14d
call fcn.0041b0d0
pxor xmm0, xmm0
cvtsi2ss xmm6, dword [rsp + 0x94]
movss xmm7, dword [0x0046eea8]
cvtsi2ss xmm0, dword [rsp + 0x98]
mov r15d, dword [rsp + 0x90]
mov r11d, dword [rsp + 0xa0]
mov eax, dword [rsp + 0xa4]
mulss xmm6, xmm7
mulss xmm7, xmm0
cmp r12d, 2
je 0x41d930
mov ebp, dword [rsp + 0x170]
mov r10d, dword [rdi + 0x28]
mov dword [rsp + 0x78], r11d
mov edx, ebp
sub edx, dword [rsp + 0x9c]
mov esi, edx
shr esi, 0x1f
add esi, edx
mov edx, 0
sar esi, 1
cmp esi, ebp
cmovg esi, ebp
test esi, esi
cmovs esi, edx
sub r10d, eax
mov eax, dword [rsp + 0x1a0]
mov dword [rdi + 0x28], r10d
sub ebp, esi
mov dword [rsp + 0x68], r10d
cmp esi, ebp
jl 0x41d700
mov dword [rsp + 0x50], eax
mov r9d, esi
mov r8d, r12d
mov rdx, r13
mov rax, qword [rsp + 0x198]
mov dword [rsp + 0x20], r14d
mov rcx, rdi
movss xmm8, dword [0x0046ee7c]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x190]
movss dword [rsp + 0x40], xmm8
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x188]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x180]
mov qword [rsp + 0x28], rax
call fcn.0041ce20
mov r10d, dword [rsp + 0x68]
sub r10d, dword [rdi + 0x28]
sub esi, r10d
mov dword [rsp + 0x60], eax
cmp esi, 0x18
jle 0x41d65c
mov r11d, dword [rsp + 0x78]
mov eax, ebp
lea ebp, [rbp + rsi - 0x18]
test r11d, r11d
cmove ebp, eax
mov eax, dword [rsp + 0x1a0]
mov ecx, r14d
mov r9d, ebp
mov r8d, r12d
mov qword [rsp + 0x48], 0
mov rdx, rbx
sar eax, cl
mov dword [rsp + 0x20], r14d
mov rcx, rdi
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x188]
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], 0
movss dword [rsp + 0x40], xmm7
call fcn.0041ce20
mov esi, dword [rsp + 0x60]
or esi, eax
mov eax, dword [rdi + 4]
test eax, eax
jne 0x41d7e9
movaps xmm6, xmmword [rsp + 0xb0]
mov eax, esi
movaps xmm7, xmmword [rsp + 0xc0]
movaps xmm8, xmmword [rsp + 0xd0]
movaps xmm9, xmmword [rsp + 0xe0]
movaps xmm10, xmmword [rsp + 0xf0]
add rsp, 0x108
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, r14d
mov dword [rsp + 0x20], r14d
mov r9d, ebp
mov r8d, r12d
sar eax, cl
mov rdx, rbx
mov rcx, rdi
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x188]
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], 0
movss dword [rsp + 0x40], xmm7
call fcn.0041ce20
mov r10d, dword [rsp + 0x68]
sub r10d, dword [rdi + 0x28]
sub ebp, r10d
mov dword [rsp + 0x60], eax
cmp ebp, 0x18
jle 0x41d775
mov r11d, dword [rsp + 0x78]
mov eax, esi
lea esi, [rsi + rbp - 0x18]
cmp r11d, 0x4000
cmove esi, eax
mov eax, dword [rsp + 0x1a0]
mov r9d, esi
mov r8d, r12d
mov rdx, r13
movss xmm8, dword [0x0046ee7c]
mov dword [rsp + 0x20], r14d
mov rcx, rdi
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x198]
movss dword [rsp + 0x40], xmm8
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x190]
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x188]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x180]
mov qword [rsp + 0x28], rax
call fcn.0041ce20
mov esi, dword [rsp + 0x60]
or esi, eax
mov eax, dword [rdi + 4]
test eax, eax
je 0x41d6bf
mov r9d, r12d
mov r8, rbx
mov rdx, r13
mov rcx, rbx
lea rax, [rsp + 0x8c]
mov dword [rsp + 0x88], 0
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x88]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x8c], 0
call fcn.0040be00
movaps xmm0, xmm6
movss xmm7, dword [rsp + 0x88]
mulss xmm0, xmm6
addss xmm0, dword [rsp + 0x8c]
mulss xmm7, xmm6
movaps xmm1, xmm0
movss dword [rsp + 0x88], xmm7
addss xmm7, xmm7
subss xmm1, xmm7
addss xmm7, xmm0
movss xmm0, dword [0x0046eee8]
comiss xmm0, xmm7
ja 0x41db60
comiss xmm0, xmm1
ja 0x41db60
pxor xmm10, xmm10
cvtss2sd xmm1, xmm1
sqrtsd xmm9, xmm1
ucomisd xmm10, xmm1
ja 0x41dbeb
movaps xmm4, xmm8
cvtsd2ss xmm9, xmm9
pxor xmm0, xmm0
divss xmm4, xmm9
cvtss2sd xmm0, xmm7
ucomisd xmm10, xmm0
sqrtsd xmm7, xmm0
movaps xmm9, xmm4
ja 0x41dbf9
cvtsd2ss xmm7, xmm7
lea ecx, [r12 - 1]
divss xmm8, xmm7
xor eax, eax
test r12d, r12d
jg 0x41d8d5
jmp 0x41d90f
mov rax, rdx
movss xmm0, dword [r13 + rax*4]
movss xmm2, dword [rbx + rax*4]
lea rdx, [rax + 1]
mulss xmm0, xmm6
movaps xmm1, xmm0
addss xmm0, xmm2
subss xmm1, xmm2
mulss xmm0, xmm8
mulss xmm1, xmm9
movss dword [r13 + rax*4], xmm1
movss dword [rbx + rax*4], xmm0
cmp rcx, rax
jne 0x41d8d2
test r15d, r15d
je 0x41d6bf
test r12d, r12d
jg 0x41da78
jmp 0x41d6bf
mov r9d, dword [rsp + 0x170]
mov edx, dword [rdi + 0x28]
test r11d, 0xffffbfff
jne 0x41dac4
sub edx, eax
mov dword [rdi + 0x28], edx
cmp r11d, 0x2000
jle 0x41db80
mov dword [rsp + 0x78], 1
mov rbp, rbx
mov r10, r13
mov dword [rsp + 0x68], 0xffffffff
mov dword [rsp + 0x50], esi
mov rdx, rbp
mov r8d, 2
mov rcx, rdi
mov rax, qword [rsp + 0x198]
mov dword [rsp + 0x40], 0x3f800000
mov dword [rsp + 0x20], r14d
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x190]
mov qword [rsp + 0x60], r10
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x188]
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x180]
mov qword [rsp + 0x28], rax
call fcn.0041ce20
pxor xmm0, xmm0
mov r10, qword [rsp + 0x60]
mov edx, dword [rdi + 4]
cvtsi2ss xmm0, dword [rsp + 0x68]
mulss xmm0, dword [rbp + 4]
mov esi, eax
movss dword [r10], xmm0
pxor xmm0, xmm0
cvtsi2ss xmm0, dword [rsp + 0x78]
mulss xmm0, dword [rbp]
movss dword [r10 + 4], xmm0
test edx, edx
je 0x41d6bf
movss xmm0, dword [r13]
mulss xmm0, xmm6
mulss xmm6, dword [r13 + 4]
movss dword [r13], xmm0
movss dword [r13 + 4], xmm6
movss xmm1, dword [rbx]
mulss xmm1, xmm7
mulss xmm7, dword [rbx + 4]
movss dword [rbx], xmm1
movss dword [rbx + 4], xmm7
movss xmm0, dword [r13]
movaps xmm3, xmm0
subss xmm3, xmm1
movss dword [r13], xmm3
addss xmm0, dword [rbx]
movss dword [rbx], xmm0
movss xmm0, dword [r13 + 4]
movaps xmm1, xmm0
subss xmm1, dword [rbx + 4]
movss dword [r13 + 4], xmm1
addss xmm0, dword [rbx + 4]
movss dword [rbx + 4], xmm0
test r15d, r15d
je 0x41d6bf
lea eax, [r12 - 1]
movss xmm1, dword [0x0046ee90]
lea rax, [rbx + rax*4 + 4]
nop word [rax + rax]
movss xmm0, dword [rbx]
add rbx, 4
xorps xmm0, xmm1
movss dword [rbx - 4], xmm0
cmp rax, rbx
jne 0x41da90
jmp 0x41d6bf
mov r9, qword [rsp + 0x190]
call fcn.0041ae60
mov esi, eax
jmp 0x41d6bf
add eax, 8
sub r9d, 8
sub edx, eax
mov dword [rdi + 0x28], edx
cmp r11d, 0x2000
jg 0x41dbe0
mov rbp, r13
mov r10, rbx
mov ecx, dword [rsp + 0x60]
test ecx, ecx
je 0x41dba0
movss xmm0, dword [rbp]
movss xmm1, dword [rbp + 4]
xor eax, eax
mov r8d, 1
mulss xmm1, dword [r10]
mov rcx, qword [rsp + 0x68]
mov dword [rsp + 0x7c], r9d
mulss xmm0, dword [r10 + 4]
mov qword [rsp + 0x70], r10
subss xmm0, xmm1
pxor xmm1, xmm1
comiss xmm1, xmm0
seta al
mov edx, eax
mov dword [rsp + 0x60], eax
call fcn.00428f40
mov eax, dword [rsp + 0x60]
mov edx, 1
mov r10, qword [rsp + 0x70]
mov r9d, dword [rsp + 0x7c]
add eax, eax
lea ecx, [rax - 1]
sub edx, eax
mov dword [rsp + 0x68], ecx
mov dword [rsp + 0x78], edx
jmp 0x41d970
movsxd r8, r12d
mov rdx, r13
mov rcx, rbx
shl r8, 2
call sub.msvcrt.dll_memcpy
jmp 0x41d90f
mov rbp, r13
mov r10, rbx
mov dword [rsp + 0x78], 1
mov dword [rsp + 0x68], 0xffffffff
jmp 0x41d970
mov rcx, qword [rsp + 0x68]
mov edx, 1
mov qword [rsp + 0x70], r10
mov dword [rsp + 0x60], r9d
call fcn.00428a60
mov edx, 1
mov r9d, dword [rsp + 0x60]
mov r10, qword [rsp + 0x70]
add eax, eax
lea ecx, [rax - 1]
sub edx, eax
mov dword [rsp + 0x68], ecx
mov dword [rsp + 0x78], edx
jmp 0x41d970
mov rbp, rbx
mov r10, r13
jmp 0x41dae3
movapd xmm0, xmm1
call fcn.00458570
jmp 0x41d892
call fcn.00458570
jmp 0x41d8bb