Function at 0x1400407e0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0xc8
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x30], xmm8
movaps xmmword [rbp + 0x20], xmm7
movaps xmmword [rbp + 0x10], xmm6
mov qword [rbp + 8], 0xfffffffffffffffe
mov rbx, rdx
mov rsi, rcx
lea rdi, [rdx + 0x28]
mov rcx, rdi
call fcn.140042c40
mov r12, rax
mov r15, rdx
mov r14, rdx
test rdx, rdx
je 0x14004086d
mov rax, r15
shr rax, 0x3e
jne 0x140040c46
add r15, r15
je 0x1400408a1
movzx eax, byte [0x1400a31c1]
mov edx, 2
mov rcx, r15
call fcn.140007930
mov r13, rax
test rax, rax
jne 0x1400408a7
mov ecx, 2
mov rdx, r15
call fcn.140077aa0
ud2
add r15, r15
mov ecx, 2
mov rdx, r12
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
mov qword [rbp - 0x18], 2
mov qword [rbp - 0x10], r14
mov qword [rbp - 8], r14
mov byte [rbp + 7], 1
lea rcx, [rbp - 0x18]
xor edx, edx
call fcn.140019dc0
jmp 0x1400408da
mov r13d, 2
mov rcx, r13
mov rdx, r12
mov r8, r15
call sub.VCRUNTIME140.dll_memcpy
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], r14
mov qword [rbp - 8], r14
cmp word [r13 + r14*2 - 2], 0
je 0x1400408ee
mov byte [rbp + 7], 1
lea rcx, [rbp - 0x18]
mov rdx, r14
call fcn.140019dc0
mov rax, qword [rbp - 8]
add rax, rax
add rax, qword [rbp - 0x18]
mov word [rax], 0
inc qword [rbp - 8]
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x40], rax
mov rax, qword [rbp - 0x10]
mov qword [rbp - 0x38], rax
mov r15, qword [rbp - 8]
mov qword [rbp - 0x30], r15
mov rcx, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x38]
cmp rdx, r15
jbe 0x140040957
add rdx, rdx
test r15, r15
je 0x140040947
lea r14, [r15 + r15]
mov r8d, 2
mov r9, r14
call fcn.140007950
mov rcx, rax
test rax, rax
jne 0x140040957
mov ecx, 2
mov rdx, r14
call fcn.140077aa0
jmp 0x140040c44
mov r8d, 2
call fcn.140007940
mov ecx, 2
mov qword [rbp - 0x58], rcx
mov qword [rbp - 0x20], r15
mov rdx, r15
call fcn.1400241a0
mov r14, rdx
sub r14, 1
jb 0x140040c33
mov r15, rax
mov qword [rbp - 0x18], 1
xorps xmm0, xmm0
movups xmmword [rbp - 0x10], xmm0
mov rax, r14
shr rax, 1
mov r8d, r14d
and r8d, 1
add r8, rax
je 0x1400409a3
lea rcx, [rbp - 0x18]
xor edx, edx
call fcn.140072340
lea rax, [r15 + r14*2]
mov qword [rbp - 0x40], r15
mov qword [rbp - 0x38], rax
mov word [rbp - 0x30], 0
lea rcx, [rbp - 0x40]
lea rdx, [rbp - 0x18]
call fcn.14002c1d0
mov r12, qword [rbp - 0x18]
mov rax, qword [rbp - 0x10]
mov qword [rbp - 0x50], rax
mov r15, qword [rbp - 8]
mov rcx, qword [rbp - 0x58]
mov word [rcx], 0
mov rdx, qword [rbp - 0x20]
test rdx, rdx
je 0x1400409f2
add rdx, rdx
mov r8d, 2
call fcn.140007940
imul eax, r15d, 0x27220a95
mov rcx, r15
rol eax, 5
shr rcx, 0x20
xor eax, ecx
imul r14d, eax, 0x27220a95
cmp r15, 4
jb 0x140040a57
lea rcx, [r15 - 4]
mov eax, ecx
shr eax, 2
inc eax
and eax, 3
je 0x140040a5c
shl rax, 2
xor edx, edx
nop dword [rax + rax]
rol r14d, 5
xor r14d, dword [r12 + rdx]
imul r14d, r14d, 0x27220a95
add rdx, 4
cmp rax, rdx
jne 0x140040a30
lea rax, [r12 + rdx]
sub r15, rdx
cmp rcx, 0xc
jae 0x140040a70
jmp 0x140040ab1
mov rax, r12
jmp 0x140040ab1
mov rax, r12
cmp rcx, 0xc
jb 0x140040ab1
nop word cs:[rax + rax]
rol r14d, 5
xor r14d, dword [rax]
imul ecx, r14d, 0x27220a95
rol ecx, 5
xor ecx, dword [rax + 4]
imul ecx, ecx, 0x27220a95
rol ecx, 5
xor ecx, dword [rax + 8]
imul ecx, ecx, 0x27220a95
rol ecx, 5
xor ecx, dword [rax + 0xc]
imul r14d, ecx, 0x27220a95
add rax, 0x10
add r15, 0xfffffffffffffff0
cmp r15, 3
ja 0x140040a70
test r15, r15
mov qword [rbp - 0x48], r12
je 0x140040b4e
mov rdx, r15
mov rcx, rax
and rdx, 3
je 0x140040aea
nop word [rax + rax]
movzx r8d, byte [rcx]
rol r14d, 5
inc rcx
xor r14d, r8d
imul r14d, r14d, 0x27220a95
dec rdx
jne 0x140040ad0
cmp r15, 4
jb 0x140040b4e
add rax, r15
nop word cs:[rax + rax]
rol r14d, 5
movzx edx, byte [rcx]
xor r14d, edx
imul edx, r14d, 0x27220a95
movzx r8d, byte [rcx + 1]
rol edx, 5
xor edx, r8d
imul edx, edx, 0x27220a95
movzx r8d, byte [rcx + 2]
rol edx, 5
xor edx, r8d
imul edx, edx, 0x27220a95
movzx r8d, byte [rcx + 3]
rol edx, 5
xor edx, r8d
imul r14d, edx, 0x27220a95
add rcx, 4
cmp rcx, rax
jne 0x140040b00
movq xmm6, qword [rbx + 4]
movq xmm7, qword [rbx + 0xc]
mov r15d, dword [rbx + 0x24]
lea rcx, [rbp - 0x40]
mov rdx, rdi
call fcn.140040f90
cmp dword [rbp - 0x40], 0
je 0x140040b76
xorps xmm8, xmm8
jne 0x140040b7e
jmp 0x140040b87
movss xmm8, dword [rbp - 0x3c]
je 0x140040b87
lea rcx, [rbp - 0x38]
call fcn.140042d60
mov rcx, rdi
mov rdx, rdi
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.GDI32.dll_CreateDCW]
mov qword [rbp - 0x20], rax
mov rcx, rax
mov edx, 8
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edi, eax
mov rcx, qword [rbp - 0x20]
mov edx, 0x76
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebx, eax
mov rcx, qword [rbp - 0x20]
call qword [sym.imp.GDI32.dll_DeleteDC]
cvtsi2ss xmm0, ebx
cvtsi2ss xmm1, edi
divss xmm0, xmm1
psubd xmm7, xmm6
cmp r15d, 1
mov dword [rsi], r14d
punpcklqdq xmm6, xmm7
movdqu xmmword [rsi + 4], xmm6
movss dword [rsi + 0x14], xmm8
movss dword [rsi + 0x18], xmm0
sete byte [rsi + 0x1c]
mov rdx, qword [rbp - 0x50]
test rdx, rdx
je 0x140040c0f
mov r8d, 1
mov rcx, qword [rbp - 0x48]
call fcn.140007940
mov rax, rsi
movaps xmm6, xmmword [rbp + 0x10]
movaps xmm7, xmmword [rbp + 0x20]
movaps xmm8, xmmword [rbp + 0x30]
add rsp, 0xc8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea r8, str.0U_b_
mov rcx, r14
xor edx, edx
call fcn.140078080
ud2
call fcn.14006a190
ud2