Function at 0x140004040
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call

Disassembly:
sub rsp, 0xa8
mov rax, qword [0x14004f040]
xor rax, rsp
mov qword [rsp + 0x40], rax
movsd xmm1, qword [rcx]
xorps xmm5, xmm5
movd xmm4, dword [0x140079014]
xorps xmm3, xmm3
movaps xmmword [rsp + 0x90], xmm6
xorps xmm2, xmm2
movd xmm6, dword [0x140079010]
movaps xmmword [rsp + 0x70], xmm8
movss xmm8, dword [0x14004f0b8]
movaps xmmword [rsp + 0x60], xmm9
movsd xmm9, qword [rcx + 8]
cvtpd2ps xmm1, xmm1
cvtdq2pd xmm6, xmm6
cvtdq2pd xmm4, xmm4
mulsd xmm6, qword [0x140047508]
mulsd xmm4, qword [0x140047508]
movaps xmmword [rsp + 0x50], xmm10
xorps xmm10, xmm10
ucomiss xmm1, xmm10
cvtpd2ps xmm9, xmm9
jp 0x1400040c9
je 0x140004134
movaps xmmword [rsp + 0x80], xmm7
cvtps2pd xmm7, xmm1
comisd xmm7, xmm6
jbe 0x140004107
movaps xmm3, xmm6
subsd xmm3, xmm7
cvtps2pd xmm0, xmm8
xorps xmm3, xmmword [0x1400478a0]
divsd xmm3, xmm0
movaps xmm0, xmm6
movaps xmm1, xmm3
addsd xmm0, xmm6
addsd xmm1, xmm6
comisd xmm1, xmm0
jbe 0x140004107
xorps xmm3, xmm3
comisd xmm6, xmm7
jbe 0x14000412c
movaps xmm3, xmm7
cvtps2pd xmm0, xmm8
subsd xmm3, xmm6
divsd xmm3, xmm0
movaps xmm0, xmm3
addsd xmm0, xmm6
comisd xmm5, xmm0
jbe 0x14000412c
xorps xmm3, xmm3
movaps xmm7, xmmword [rsp + 0x80]
ucomiss xmm9, xmm10
movaps xmm10, xmmword [rsp + 0x50]
jp 0x140004142
je 0x14000419e
cvtps2pd xmm6, xmm9
comisd xmm6, xmm4
jbe 0x140004179
movaps xmm2, xmm4
subsd xmm2, xmm6
cvtps2pd xmm0, xmm8
xorps xmm2, xmmword [0x1400478a0]
divsd xmm2, xmm0
movaps xmm0, xmm4
movaps xmm1, xmm2
addsd xmm0, xmm4
addsd xmm1, xmm4
comisd xmm1, xmm0
jbe 0x140004179
xorps xmm2, xmm2
comisd xmm4, xmm6
jbe 0x14000419e
movaps xmm2, xmm6
cvtps2pd xmm0, xmm8
subsd xmm2, xmm4
divsd xmm2, xmm0
movaps xmm0, xmm2
addsd xmm0, xmm4
comisd xmm5, xmm0
jbe 0x14000419e
xorps xmm2, xmm2
movaps xmm9, xmmword [rsp + 0x60]
movaps xmm8, xmmword [rsp + 0x70]
movaps xmm6, xmmword [rsp + 0x90]
cvttsd2si ecx, xmm3
cvttsd2si eax, xmm2
test ecx, ecx
jne 0x1400041c6
test eax, eax
je 0x1400042d3
mov dword [rsp + 0x20], ecx
mov edx, 0x1000
xor ecx, ecx
mov qword [rsp + 0xa0], rbx
xorps xmm0, xmm0
mov qword [rsp + 0x38], 0
mov r8d, edx
mov dword [rsp + 0x24], eax
movdqu xmmword [rsp + 0x28], xmm0
lea r9d, [rcx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test rax, rax
je 0x1400042cb
movdqu xmm0, xmmword [0x140078dc0]
lea r9, [0x140078dc0]
mov ecx, 0x10
movdqa xmm1, xmmword [0x1400478c0]
mov edx, ecx
xorps xmm1, xmm0
movdqu xmmword [0x140078dc0], xmm1
xor byte [rdx + r9], 0xfa
inc rdx
cmp rdx, 0x1e
jb 0x140004231
movups xmm0, xmmword [0x140078dc0]
movups xmmword [rax], xmm0
movsd xmm1, qword [0x140078dd0]
movsd qword [rax + 0x10], xmm1
mov eax, dword [0x140078dd8]
movdqa xmm1, xmmword [0x1400478c0]
mov dword [rbx + 0x18], eax
movzx eax, word [0x140078ddc]
mov word [rbx + 0x1c], ax
movdqu xmm0, xmmword [0x140078dc0]
xorps xmm1, xmm0
movdqu xmmword [0x140078dc0], xmm1
nop word [rax + rax]
xor byte [rcx + r9], 0xfa
inc rcx
cmp rcx, 0x1e
jb 0x140004290
mov edx, 1
lea rcx, [rsp + 0x20]
call rbx
xor edx, edx
mov r8d, 0x1000
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14003e580
add rsp, 0xa8
ret