Function at 0x413090
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov rbp, rcx
mov r12, rdx
mov rbx, r8
movsxd rdx, dword [r8 + 8]
lea rax, [0x00424020]
movsxd rdx, dword [rax + rdx*4]
mov rax, qword [r8]
mov rsi, qword [rax + rdx*8 + 0x18]
cmp dword [r12 + 0x74], 1
jg 0x4132b9
mov rdx, rsi
mov rcx, rbp
call sym.vertexdealloc
mov r11, qword [rbx]
mov r10d, dword [rbx + 8]
movsxd rdx, r10d
lea rax, [0x00424010]
mov edi, dword [rax + rdx*4]
movsxd rax, edi
lea rsi, [r11 + rax*8]
mov rax, qword [rsi]
mov edx, eax
and edx, 3
xor eax, edx
cmp r10d, edx
jne 0x413106
cmp r11, rax
je 0x413144
mov ecx, 1
lea r13, [0x00424010]
add ecx, 1
movsxd rdx, edx
movsxd rdx, dword [r13 + rdx*4]
mov rax, qword [rax + rdx*8]
mov edx, eax
and edx, 3
xor eax, edx
cmp r10d, edx
setne r9b
cmp r11, rax
setne r8b
or r9b, r8b
jne 0x413112
cmp ecx, 3
jg 0x4132e5
mov r11, qword [rbx]
lea rdx, [0x00424010]
movsxd rax, dword [rbx + 8]
mov ecx, dword [rdx + rax*4]
lea r15, [r11 + rax*8]
mov rsi, qword [r15]
mov eax, esi
and eax, 3
xor esi, eax
cdqe
mov r8d, dword [rdx + rax*4]
movsxd r13, r8d
mov rdx, qword [rsi + r13*8]
movsxd r10, ecx
lea rax, [r10*8]
mov qword [rsp + 0x48], rax
lea r14, [r11 + rax]
mov rdi, qword [r14]
mov eax, edi
and eax, 3
xor edi, eax
cdqe
lea r9, [0x00424020]
movsxd rax, dword [r9 + rax*4]
lea r9, [rax*8]
mov qword [rsp + 0x40], r9
mov rax, qword [rdi + rax*8]
mov r9d, edx
and r9d, 3
mov r10d, edx
mov qword [r15], r10
xor edx, r9d
movsxd r9, r9d
mov r15, qword [rbx]
or r15d, dword [rbx + 8]
mov r15d, r15d
mov qword [rdx + r9*8], r15
mov edx, eax
and edx, 3
mov r15d, eax
mov qword [r14], r15
or ecx, r11d
xor eax, edx
movsxd rdx, edx
mov qword [rax + rdx*8], rcx
mov rax, qword [rsi + r13*8 + 0x30]
mov r9, rax
and r9d, 0xfffffffc
cmp r9, qword [rbp + 0x14350]
je 0x413227
and eax, 1
mov edx, dword [rbx + 8]
add edx, 6
movsxd rdx, edx
mov r13, qword [rbx]
mov r14d, eax
or r14d, r9d
mov r14d, r14d
mov qword [r13 + rdx*8], r14
add eax, 6
cdqe
mov rdx, qword [rbx]
or edx, dword [rbx + 8]
mov edx, edx
mov qword [r9 + rax*8], rdx
mov rax, qword [rsp + 0x40]
mov rax, qword [rdi + rax + 0x30]
mov rdx, rax
and edx, 0xfffffffc
cmp rdx, qword [rbp + 0x14350]
je 0x41325f
and eax, 1
mov r9d, eax
or r9d, edx
mov r14d, r9d
mov r15, qword [rsp + 0x48]
mov qword [r11 + r15 + 0x30], r14
add eax, 6
cdqe
mov qword [rdx + rax*8], rcx
lea rax, [0x00424020]
movsxd r8, r8d
movsxd rdx, dword [rax + r8*4]
mov rcx, qword [rsi + rdx*8 + 0x18]
movsxd rdx, dword [rbx + 8]
movsxd rdx, dword [rax + rdx*4]
mov rax, qword [rbx]
mov qword [rax + rdx*8 + 0x18], rcx
cmp dword [r12 + 0x80], 0
je 0x413361
mov rdx, rsi
mov rcx, rbp
call sym.triangledealloc
mov rdx, rdi
mov rcx, rbp
call sym.triangledealloc
nop
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movsd xmm1, qword [rsi + 8]
movsd xmm0, qword [rsi]
movapd xmm2, xmm1
movq r8, xmm1
movapd xmm1, xmm0
movq rdx, xmm0
lea rcx, str.__Deleting___.12g___.12g_._n
call sym.printf
jmp 0x4130cc
mov qword [rsp + 0x60], r11
mov dword [rsp + 0x68], edi
mov rdx, qword [rsi]
mov eax, edx
and eax, 3
mov dword [rsp + 0x68], eax
xor eax, edx
mov eax, eax
mov qword [rsp + 0x60], rax
movsxd r10, r10d
mov rdx, qword [r11 + r10*8]
mov eax, edx
and eax, 3
xor edx, eax
mov edi, edx
mov qword [rsp + 0x50], rdi
cdqe
lea rdx, [0x00424020]
mov eax, dword [rdx + rax*4]
mov dword [rsp + 0x58], eax
cmp dword [r12 + 0x80], 0
sete al
movzx eax, al
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], ecx
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x60]
mov rdx, r12
mov rcx, rbp
call sym.triangulatepolygon
jmp 0x413144
mov r8, rbx
mov rdx, r12
mov rcx, rbp
call sym.testtriangle
jmp 0x413291