Function at 0x413530
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rbp, qword [rsp + 0xb8]
mov r13d, dword [rsp + 0xc8]
cmp rbp, 0x40
mov qword [rsp + 0x98], rdx
mov r15, r8
mov r14, r9
seta dl
mov qword [rsp + 0x90], rcx
cmp qword [rsp + 0x98], 0x100
seta al
or dl, al
jne 0x413589
cmp r9, 0x100
jbe 0x41359f
mov eax, 1
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea ecx, [r13 + 0xd]
mov ebx, 1
mov rax, rbx
mov rsi, rbx
shl rax, cl
mov rcx, rax
mov qword [rsp + 0x38], rax
call sub.msvcrt.dll_malloc
lea ecx, [r13 + 8]
shl rsi, cl
mov r12, rax
lea ecx, [r13 + 9]
sub rsi, 1
shl rbx, cl
mov qword [rsp + 0x30], rbx
sub rbx, 1
test r14, r14
je 0x4135ef
mov r8, r14
mov rdx, r15
mov rcx, rax
call sub.msvcrt.dll_memcpy
test rbp, rbp
je 0x413608
mov rdx, qword [rsp + 0xb0]
lea rcx, [r12 + r14]
mov r8, rbp
call sub.msvcrt.dll_memcpy
lea rdx, [r14 + rbp]
mov eax, 0x180
sub rax, rdx
add rdx, r12
mov ecx, eax
mov rdi, rdx
mov qword [rdx + rcx - 8], 0
lea ecx, [rax - 1]
xor eax, eax
shr ecx, 3
rep stosq qword [rdi], rax
mov byte [r12 + 0x182], bpl
mov word [r12 + 0x180], r14w
mov byte [r12 + 0x19d], 0x2f
mov r11, qword [rsp + 0x30]
movzx eax, word [rsp + 0x98]
mov byte [r12 + 0x19e], 0xf1
mov byte [r12 + 0x19f], 0x20
mov word [r12 + 0x183], ax
movabs rax, 0x503020101000000
mov qword [r12 + 0x185], rax
movabs rax, 0xe990593722150d08
mov qword [r12 + 0x18d], rax
movabs rax, 0xc26d55183ddb6279
mov qword [r12 + 0x195], rax
cmp r11, 0x1a
jbe 0x413782
mov eax, 0x1a
nop word [rax + rax]
lea rdx, [rax - 0x1a]
mov r10, rbx
lea rcx, [rax - 0xe]
and r10, rax
and rdx, rbx
lea r9, [rax - 6]
shl r10, 4
and rcx, rbx
lea r8, [rax - 4]
and r9, rbx
shl rdx, 4
and r8, rbx
shl rcx, 4
add rax, 2
shl r9, 4
shl r8, 4
lea rdi, [r12 + r10]
vmovdqu xmm5, xmmword [r12 + r9]
vpxor xmm0, xmm5, xmmword [r12 + r8]
vpaddq xmm0, xmm0, xmmword [r12 + rcx]
vpxor xmm0, xmm0, xmmword [r12 + rdx]
vmovups xmmword [rdi], xmm0
vpslldq xmm2, xmm0, 8
vmovdqu xmm1, xmmword [r12 + r9 + 0x10]
vpxor xmm1, xmm1, xmmword [r12 + r8 + 0x10]
vpaddq xmm1, xmm1, xmmword [r12 + rcx + 0x10]
vpxor xmm1, xmm1, xmmword [r12 + rdx + 0x10]
vpsrldq xmm4, xmm1, 8
vpsrldq xmm3, xmm0, 8
vpslldq xmm0, xmm1, 8
vpxor xmm1, xmm2, xmm4
vpsrlq xmm2, xmm1, 0x2f
vpxor xmm0, xmm0, xmm3
vpsllq xmm1, xmm1, 0x11
vpxor xmm1, xmm2, xmm1
vmovups xmmword [rdi], xmm1
vpsrlq xmm1, xmm0, 0x2f
vpsllq xmm0, xmm0, 0x11
vpxor xmm0, xmm1, xmm0
vmovups xmmword [r12 + r10 + 0x10], xmm0
cmp r11, rax
ja 0x4136c0
add r13d, dword [rsp + 0xc0]
mov eax, 1
lea ecx, [r13 + 8]
mov dword [rsp + 0x28], r13d
shl rax, cl
mov qword [rsp + 0x20], rax
test rax, rax
je 0x413cc2
mov r13d, 0x40
mov eax, 0x75bcd15
xor r15d, r15d
movabs r14, 0x2b992ddfa23249d6
nop dword [rax]
mov rbp, rax
mov rcx, r15
shr rbp, 0x10
and rbp, rsi
add rbp, rbp
nop dword [rax + rax]
lea r9, [rcx - 0x1a]
mov r8, rbx
add rbp, 2
lea r10, [rcx - 0xe]
and r8, rcx
and r9, rbx
lea r11, [rcx - 6]
shl r8, 4
and r10, rbx
lea rdi, [rcx - 4]
and r11, rbx
shl r9, 4
and rdi, rbx
shl r10, 4
and rbp, rbx
lea rdx, [r12 + r8]
shl r11, 4
lea r8, [r12 + r8 + 0x10]
shl rdi, 4
vmovdqu xmm5, xmmword [r12 + rdi]
vpxor xmm0, xmm5, xmmword [r12 + r11]
vpaddq xmm0, xmm0, xmmword [r12 + r10]
vpxor xmm0, xmm0, xmmword [r12 + r9]
vpaddq xmm0, xmm0, xmmword [rdx]
vmovups xmmword [rdx], xmm0
vmovdqu xmm0, xmmword [r12 + rdi + 0x10]
vpxor xmm0, xmm0, xmmword [r12 + r11 + 0x10]
vpaddq xmm0, xmm0, xmmword [r12 + r10 + 0x10]
mov r10, rax
vpxor xmm0, xmm0, xmmword [r12 + r9 + 0x10]
mov r9, rcx
vpaddq xmm0, xmm0, xmmword [r8]
vmovdqu xmm1, xmmword [rdx]
lea rax, [rax + rax*4]
shr r9, 1
add rcx, 2
and r10d, 0x1fff
vpsrldq xmm2, xmm0, 8
rol rax, 0x13
lea r9, [r10 + r9 - 0x1000]
vpslldq xmm3, xmm1, 8
xor rax, r14
and r9, rsi
vpsrldq xmm1, xmm1, 8
vpxor xmm2, xmm2, xmm3
shl r9, 5
vpslldq xmm0, xmm0, 8
lea r10, [r12 + r9]
vpsrlq xmm3, xmm2, 0x2f
vpxor xmm0, xmm1, xmm0
vpsllq xmm2, xmm2, 0x11
lea r9, [r12 + r9 + 0x10]
vpsrlq xmm1, xmm0, 0x2f
vpxor xmm2, xmm3, xmm2
vmovups xmmword [rdx], xmm2
vpsllq xmm0, xmm0, 0x11
vpxor xmm0, xmm1, xmm0
vmovups xmmword [r8], xmm0
vmovdqu xmm4, xmmword [r10]
vpsllq xmm0, xmm4, 1
vpaddq xmm0, xmm0, xmmword [rdx]
vmovups xmmword [rdx], xmm0
vmovdqu xmm5, xmmword [r9]
vpsllq xmm0, xmm5, 1
vpaddq xmm0, xmm0, xmmword [r8]
vmovups xmmword [r8], xmm0
vmovdqu xmm4, xmmword [rdx]
vpsllq xmm0, xmm4, 2
vpaddq xmm0, xmm0, xmmword [r10]
vmovups xmmword [r10], xmm0
vmovdqu xmm5, xmmword [r8]
vpsllq xmm0, xmm5, 2
vpaddq xmm0, xmm0, xmmword [r9]
vmovups xmmword [r9], xmm0
mov r9, rbp
shl r9, 4
lea r10, [r12 + r9]
vmovdqu xmm4, xmmword [r10]
lea r9, [r12 + r9 + 0x10]
vpsllq xmm0, xmm4, 1
vpaddq xmm0, xmm0, xmmword [rdx]
vmovups xmmword [rdx], xmm0
vmovdqu xmm5, xmmword [r9]
vpsllq xmm0, xmm5, 1
vpaddq xmm0, xmm0, xmmword [r8]
vmovups xmmword [r8], xmm0
vmovdqu xmm0, xmmword [rdx]
vpsllq xmm0, xmm0, 3
vpaddq xmm0, xmm0, xmmword [r10]
vmovups xmmword [r10], xmm0
vmovdqu xmm0, xmmword [r8]
vpsllq xmm0, xmm0, 3
vpaddq xmm0, xmm0, xmmword [r9]
vmovups xmmword [r9], xmm0
cmp r13, rcx
jne 0x4137e0
add r15, 0x40
add r13, 0x40
cmp qword [rsp + 0x20], r15
ja 0x4137c8
mov ecx, dword [rsp + 0x28]
mov edx, 1
add ecx, 9
shl rdx, cl
mov rcx, qword [rsp + 0x20]
mov qword [rsp + 0x28], rdx
cmp rdx, rcx
jbe 0x413ba5
lea r14, [rcx + 0x40]
mov r13, r14
nop word [rax + rax]
mov rbp, rax
shr rbp, 0x10
and rbp, rsi
add rbp, rbp
nop dword [rax]
lea r10, [rcx - 0xe]
mov r8, rbx
and eax, 0x1fff
lea r9, [rcx - 0x1a]
and r8, rcx
and r10, rbx
lea rdi, [rcx - 6]
shl r10, 4
and r9, rbx
lea r15, [rcx - 4]
shl r8, 4
and rdi, rbx
and r15, rbx
shl r9, 4
add rbp, 2
lea rdx, [r12 + r8]
shl rdi, 4
and rbp, rbx
lea r11, [r12 + r10]
shl r15, 4
vmovdqu xmm4, xmmword [r12 + r15]
vpxor xmm0, xmm4, xmmword [r12 + rdi]
vpaddq xmm0, xmm0, xmmword [r11]
vpxor xmm0, xmm0, xmmword [r12 + r9]
lea r8, [r12 + r8 + 0x10]
vpaddq xmm0, xmm0, xmmword [rdx]
vmovups xmmword [rdx], xmm0
vmovdqu xmm0, xmmword [r12 + r15 + 0x10]
vpxor xmm0, xmm0, xmmword [r12 + rdi + 0x10]
vpaddq xmm0, xmm0, xmmword [r12 + r10 + 0x10]
vpxor xmm0, xmm0, xmmword [r12 + r9 + 0x10]
mov r9, rcx
vmovdqu xmm1, xmmword [rdx]
vpaddq xmm0, xmm0, xmmword [r8]
shr r9, 1
add rcx, 2
lea rax, [rax + r9 - 0x1000]
vpslldq xmm3, xmm1, 8
and rax, rsi
vpsrldq xmm2, xmm0, 8
vpsrldq xmm1, xmm1, 8
shl rax, 5
vpxor xmm2, xmm2, xmm3
vpslldq xmm0, xmm0, 8
lea r9, [r12 + rax]
vpsrlq xmm3, xmm2, 0x2f
vpxor xmm0, xmm1, xmm0
lea rax, [r12 + rax + 0x10]
vpsrlq xmm1, xmm0, 0x2f
vpsllq xmm2, xmm2, 0x11
vpsllq xmm0, xmm0, 0x11
vpxor xmm2, xmm2, xmm3
vmovups xmmword [rdx], xmm2
vpxor xmm0, xmm0, xmm1
vmovups xmmword [r8], xmm0
vmovdqu xmm5, xmmword [r9]
vpsllq xmm0, xmm5, 1
vpaddq xmm0, xmm0, xmmword [rdx]
vmovups xmmword [rdx], xmm0
vmovdqu xmm4, xmmword [rax]
vpsllq xmm0, xmm4, 1
vpaddq xmm0, xmm0, xmmword [r8]
vmovups xmmword [r8], xmm0
vmovdqu xmm3, xmmword [rdx]
vpsllq xmm0, xmm3, 2
vpaddq xmm0, xmm0, xmmword [r9]
vmovups xmmword [r9], xmm0
vmovdqu xmm5, xmmword [r8]
vpsllq xmm0, xmm5, 2
vpaddq xmm0, xmm0, xmmword [rax]
vmovups xmmword [rax], xmm0
mov rax, rbp
shl rax, 4
lea r9, [r12 + rax]
vmovdqu xmm4, xmmword [r9]
lea rax, [r12 + rax + 0x10]
vpsllq xmm0, xmm4, 1
vpaddq xmm0, xmm0, xmmword [rdx]
vmovups xmmword [rdx], xmm0
vmovdqu xmm3, xmmword [rax]
vpsllq xmm0, xmm3, 1
vpaddq xmm0, xmm0, xmmword [r8]
vmovups xmmword [r8], xmm0
vmovdqu xmm0, xmmword [rdx]
vpsllq xmm0, xmm0, 3
vpaddq xmm0, xmm0, xmmword [r9]
vmovups xmmword [r9], xmm0
vmovdqu xmm0, xmmword [r8]
vpsllq xmm0, xmm0, 3
vpaddq xmm0, xmm0, xmmword [rax]
vmovups xmmword [rax], xmm0
mov rax, qword [r11]
cmp r13, rcx
jne 0x4139e8
mov rcx, r14
add r13, 0x40
cmp qword [rsp + 0x28], r14
jbe 0x413ba5
add r14, 0x40
jmp 0x4139d8
mov rsi, qword [rsp + 0x30]
test rsi, rsi
je 0x413c8e
xor eax, eax
nop dword [rax]
lea rdx, [rax - 0x1a]
mov r11, rbx
lea rcx, [rax - 0xe]
and r11, rax
and rdx, rbx
lea r8, [rax - 6]
shl r11, 4
and rcx, rbx
lea r9, [rax - 4]
and r8, rbx
shl rdx, 4
and r9, rbx
shl rcx, 4
add rax, 2
lea r10, [r12 + r11]
shl r8, 4
lea r11, [r12 + r11 + 0x10]
shl r9, 4
vmovdqu xmm4, xmmword [r12 + r9]
vpxor xmm0, xmm4, xmmword [r12 + r8]
vpaddq xmm0, xmm0, xmmword [r12 + rcx]
vpxor xmm0, xmm0, xmmword [r12 + rdx]
vpaddq xmm0, xmm0, xmmword [r10]
vmovups xmmword [r10], xmm0
vmovdqu xmm1, xmmword [r10]
vmovdqu xmm0, xmmword [r12 + r9 + 0x10]
vpxor xmm0, xmm0, xmmword [r12 + r8 + 0x10]
vpaddq xmm0, xmm0, xmmword [r12 + rcx + 0x10]
vpxor xmm0, xmm0, xmmword [r12 + rdx + 0x10]
vpaddq xmm0, xmm0, xmmword [r11]
vpslldq xmm3, xmm1, 8
vpsrldq xmm1, xmm1, 8
vpsrldq xmm2, xmm0, 8
vpslldq xmm0, xmm0, 8
vpxor xmm2, xmm2, xmm3
vpxor xmm0, xmm1, xmm0
vpsrlq xmm3, xmm2, 0x2f
vpsrlq xmm1, xmm0, 0x2f
vpsllq xmm2, xmm2, 0x11
vpsllq xmm0, xmm0, 0x11
vpxor xmm2, xmm2, xmm3
vmovups xmmword [r10], xmm2
vpxor xmm0, xmm0, xmm1
vmovups xmmword [r11], xmm0
cmp rsi, rax
ja 0x413bb8
mov rdx, qword [rsp + 0x38]
sub rdx, qword [rsp + 0x98]
mov r8, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
add rdx, r12
call sub.msvcrt.dll_memcpy
mov rcx, r12
call sub.msvcrt.dll_free
xor eax, eax
jmp 0x41358e
mov eax, 0x75bcd15
jmp 0x4139a9