Function at 0x180012820
Capabilities:
Allocate or change rwx memory
Create thread
Inject pe
Inject thread
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x98
mov rdi, rcx
mov rdx, rcx
lea rcx, [rbp - 0x11]
call fcn.180012630
nop
movsxd rsi, dword [0x1801a663c]
lea r12, [0x1801a6600]
mov r8d, dword [rsi + r12 + 0x50]
mov dword [rsp + 0x20], 0x40
mov r14d, 0x3000
mov r9d, r14d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r15, rax
mov qword [rbp - 0x39], rax
xor ebx, ebx
test rax, rax
jne 0x1800128a0
lea rax, str.Failed_to_allocate_memory_in_
mov ecx, 0xc8
jmp 0x180012ce5
mov edx, dword [rsi + r12 + 0x50]
mov r9d, 4
mov r8d, r14d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
test rax, rax
jne 0x1800128ec
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rax, str.Failed_to_allocate_memory_for_module_in_
mov qword [rbp - 0x31], 0x2a
mov ecx, 0xc8
jmp 0x180012ced
mov r8d, dword [rsi + r12 + 0x54]
mov rdx, r12
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
movsxd rsi, dword [r14 + 0x3c]
add rsi, r14
movzx ecx, word [rsi + 0x14]
add rcx, rsi
mov r13d, ebx
cmp bx, word [rsi + 6]
jae 0x180012959
mov r12, rbx
mov rdi, rcx
lea r15, [0x1801a6600]
cmp dword [rdi + r12 + 0x28], ebx
je 0x180012941
mov edx, dword [rdi + r12 + 0x2c]
add rdx, r15
mov r8d, dword [rdi + r12 + 0x28]
mov ecx, dword [rdi + r12 + 0x24]
add rcx, r14
call sub.VCRUNTIME140.dll_memcpy
inc r13d
add r12, 0x28
movzx eax, word [rsi + 6]
cmp r13d, eax
jl 0x180012920
mov rdi, qword [rbp + 0x67]
mov r15, qword [rbp - 0x39]
mov r10, r15
sub r10, qword [rsi + 0x30]
je 0x1800129c0
mov edx, dword [rsi + 0xb0]
add rdx, r14
jmp 0x1800129bc
lea r11, [rdx + 8]
mov r8d, dword [rdx + 4]
sub r8, 8
shr r8, 1
mov r12d, ebx
je 0x1800129b6
movzx r9d, word [r11]
mov eax, r9d
shr eax, 0xc
cmp eax, 0xa
jne 0x1800129a3
and r9d, 0xfff
mov ecx, dword [rdx]
lea rax, [r14 + r9]
add qword [rcx + rax], r10
jmp 0x1800129a7
test eax, eax
jne 0x180012a0a
inc r12d
add r11, 2
movsxd rax, r12d
cmp rax, r8
jb 0x180012981
mov eax, dword [rdx + 4]
add rdx, rax
cmp dword [rdx], ebx
jne 0x18001296d
mov r9d, dword [rsi + 0x50]
mov qword [rsp + 0x20], rbx
mov r8, r14
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x180012a30
mov r9d, 0x8000
xor r8d, r8d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rax, str.Failed_to_write_stage2_to_
mov qword [rbp - 0x31], 0x1c
mov ecx, 0xca
jmp 0x180012ced
lea rax, str.Failed_to_relocate_module
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x31], 0x19
lea rdx, [rbp - 0x39]
mov ecx, 0xc9
call fcn.18000b3f4
jmp 0x180012cfe
mov esi, 0x8000
mov r8d, esi
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r14, qword [rbp + 0x6f]
mov r8, qword [r14 + 8]
sub r8, qword [r14]
mov dword [rsp + 0x20], 4
xor edx, edx
mov r9d, 0x3000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r12, rax
mov qword [rbp + 0x7f], rax
mov rcx, rdi
test rax, rax
jne 0x180012a99
mov r9d, esi
xor r8d, r8d
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rax, str.Failed_to_allocate_memory_for_data_in_
mov qword [rbp - 0x31], 0x28
jmp 0x1800128e2
mov r9, qword [r14 + 8]
sub r9, qword [r14]
mov qword [rsp + 0x20], rbx
mov r8, qword [r14]
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x180012ae5
mov r9d, esi
xor r8d, r8d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, esi
xor r8d, r8d
mov rdx, r12
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rax, str.Failed_to_write_fumo_data_to_
jmp 0x180012ce0
mov dword [rbp - 0x15], ebx
mov qword [rbp - 0x29], r15
mov qword [rbp - 0x21], r12
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rbp - 0x19], eax
lea r13, [0x180012f30]
lea rax, [0x180012d20]
sub r13, rax
lea r8, [r13 + 0x18]
mov dword [rsp + 0x20], 0x40
xor edx, edx
mov r9d, 0x3000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r14, rax
mov rcx, rdi
test rax, rax
jne 0x180012b67
mov r9d, esi
xor r8d, r8d
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, esi
xor r8d, r8d
mov rdx, r12
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rax, str.Failed_to_allocate_memory_for_shellcode_in_
mov qword [rbp - 0x31], 0x2d
jmp 0x1800128e2
add rax, r13
mov qword [rbp - 0x39], rax
mov qword [rsp + 0x20], rbx
mov r9, r13
lea r8, [0x180012d20]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x180012ca3
mov qword [rsp + 0x20], rbx
mov r9d, 0x18
lea r8, [rbp - 0x29]
mov r13, qword [rbp - 0x39]
mov rdx, r13
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x180012ca3
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], r13
mov r9, r14
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov r12, rax
test rax, rax
jne 0x180012c2c
mov r9d, esi
xor r8d, r8d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, esi
xor r8d, r8d
mov rdx, qword [rbp + 0x7f]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, esi
xor r8d, r8d
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rax, str.Failed_to_execute_shellcode_in_
mov qword [rbp - 0x31], 0x21
mov ecx, 0xcb
jmp 0x180012ced
or edx, 0xffffffff
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, r12
test eax, eax
je 0x180012c47
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180012bdc
mov dword [rbp + 0x77], ebx
lea rdx, [rbp + 0x77]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r9d, esi
xor r8d, r8d
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp dword [rbp + 0x77], ebx
je 0x180012d00
lea rax, str.Failed_to_execute_shellcode_in___error_code:_
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x31], 0x31
lea r9, [rbp + 0x77]
lea r8, [rbp - 0x11]
lea rdx, [rbp - 0x39]
mov ecx, 0xcb
call fcn.180012104
jmp 0x180012cfe
mov r9d, esi
xor r8d, r8d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, esi
xor r8d, r8d
mov rdx, r12
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, esi
xor r8d, r8d
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea rax, str.Failed_to_write_shellcode_to_
mov ecx, 0xca
mov qword [rbp - 0x31], 0x1f
mov qword [rbp - 0x39], rax
lea r8, [rbp - 0x11]
lea rdx, [rbp - 0x39]
call fcn.18000b4c0
mov ebx, eax
lea rcx, [rbp - 0x11]
call fcn.18000df34
mov eax, ebx
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret