Function at 0x18004fe50
Capabilities:
Encode data using xor
Manually build aes constants

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r13
push r14
sub rsp, 0x800
mov r9d, 1
xor r8d, r8d
lea r10, [rsp + 0x400]
mov edx, r9d
mov r11d, pe_nt_image_headers64
nop dword [rax + rax]
movsxd rax, edx
mov dword [r10], edx
mov dword [rsp + rax*4], r8d
mov eax, edx
and al, 0x80
neg al
lea eax, [rdx + rdx]
sbb ecx, ecx
inc r8d
add r10, 4
and ecx, 0x1b
xor ecx, eax
xor ecx, edx
cmp r8d, r11d
movzx edx, cl
jl 0x18004fe90
mov edx, r9d
lea r8, [0x180162ec0]
mov r10d, 0xa
nop dword [rax + rax]
mov eax, edx
mov dword [r8], edx
and al, 0x80
neg al
lea eax, [rdx + rdx]
sbb ecx, ecx
add r8, 4
and ecx, 0x1b
xor ecx, eax
sub r10, r9
movzx edx, cl
jne 0x18004fed0
mov byte [0x180164753], r10b
mov byte [0x1801625c0], 0x63
lea r8, [0x1801625c1]
lea r10, [rsp + 4]
lea r14, [0x180000000]
movsxd rcx, dword [r10]
lea rax, [rsp + 0x7fc]
add r10, 4
shl rcx, 2
inc r8
sub rax, rcx
mov edx, dword [rax]
mov ecx, edx
sar ecx, 7
lea eax, [rdx + rdx]
or ecx, eax
movzx eax, cl
xor edx, eax
mov ecx, eax
add eax, eax
sar ecx, 7
or ecx, eax
movzx eax, cl
xor edx, eax
mov ecx, eax
add eax, eax
sar ecx, 7
or ecx, eax
movzx eax, cl
xor edx, eax
mov ecx, eax
add eax, eax
sar ecx, 7
or ecx, eax
xor ecx, 0x63
movzx eax, cl
xor edx, eax
movsxd rax, edx
mov byte [r8 - 1], dl
mov byte [rax + r14 + 0x1646f0], r9b
inc r9d
cmp r9d, r11d
jl 0x18004ff10
mov esi, dword [rsp + 0x38]
mov ebp, dword [rsp + 0x34]
mov r12d, dword [rsp + 0x2c]
mov r13d, dword [rsp + 0x24]
xor r9d, r9d
nop word [rax + rax]
movzx edx, byte [r9 + r14 + 0x1625c0]
mov eax, edx
and al, 0x80
neg al
lea eax, [rdx + rdx]
sbb ecx, ecx
and ecx, 0x1b
xor ecx, eax
movzx eax, cl
mov ecx, eax
xor ecx, edx
shl ecx, 8
xor ecx, edx
shl ecx, 8
xor ecx, edx
shl ecx, 8
xor ecx, eax
movzx eax, byte [r9 + r14 + 0x1646f0]
mov dword [r14 + r9*4 + 0x1642f0], ecx
rol ecx, 8
mov dword [r14 + r9*4 + 0x163ef0], ecx
rol ecx, 8
mov dword [r14 + r9*4 + 0x163af0], ecx
rol ecx, 8
mov dword [r14 + r9*4 + 0x1636f0], ecx
test eax, eax
je 0x1800500b4
mov r8d, dword [rsp + rax*4]
mov eax, 0x80808081
lea ecx, [r8 + rsi]
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xff
sub ecx, edx
movsxd rax, ecx
lea ecx, [r8 + r13]
mov r10d, dword [rsp + rax*4 + 0x400]
mov eax, 0x80808081
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xff
sub ecx, edx
movsxd rax, ecx
lea ecx, [r8 + rbp]
mov ebx, dword [rsp + rax*4 + 0x400]
mov eax, 0x80808081
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xff
sub ecx, edx
movsxd rax, ecx
lea ecx, [r8 + r12]
mov edi, dword [rsp + rax*4 + 0x400]
mov eax, 0x80808081
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xff
sub ecx, edx
movsxd rax, ecx
mov ecx, dword [rsp + rax*4 + 0x400]
jmp 0x1800500bd
xor r10d, r10d
xor ebx, ebx
xor edi, edi
xor ecx, ecx
shl ecx, 8
inc r9
xor ecx, edi
shl ecx, 8
xor ecx, ebx
shl ecx, 8
xor ecx, r10d
mov dword [r14 + r9*4 + 0x1632ec], ecx
rol ecx, 8
mov dword [r14 + r9*4 + 0x162eec], ecx
rol ecx, 8
mov dword [r14 + r9*4 + 0x162abc], ecx
rol ecx, 8
sub r11, 1
mov dword [r14 + r9*4 + 0x1626bc], ecx
jne 0x18004ffa0
lea r11, [rsp + 0x800]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
ret