Function at 0x140003220
Capabilities:
Create pipe
Create process on windows
Create thread
Create two anonymous pipes
Get session information

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x460]
sub rsp, 0x560
mov rax, qword [0x140019028]
xor rax, rsp
mov qword [rbp + 0x450], rax
mov rdi, rcx
mov esi, edx
lea rcx, str.ChildProcAgent::startChildProc_entry__sessionId___u
call fcn.14000d4b0
lea eax, [rsi - 1]
cmp eax, 0xfffffffd
ja 0x14000360d
lea rax, [rbp + 0x10]
mov qword [rsp + 0x598], r14
xor r14d, r14d
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x78]
mov qword [rsp + 0x60], r14
mov edx, esi
mov qword [rsp + 0x78], r14
xor ecx, ecx
mov dword [rbp + 0x10], r14d
lea r8d, [r14 + 8]
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
jne 0x1400032cc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.WTSQuerySessionInformation
lea rdx, str._s_failed_with_0x_08X
lea rcx, [rbp + 0x30]
call fcn.14000d550
lea ecx, [r14 + 1]
lea rdx, [rbp + 0x30]
call fcn.14000d2b0
jmp 0x140003605
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x590], rbx
mov ebx, dword [rcx]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
test ebx, ebx
je 0x1400032f6
lea rcx, str.Session_is_not_active__ignoring
call fcn.14000d4b0
jmp 0x1400035fd
lea rdx, [rsp + 0x60]
mov ecx, esi
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x14000333a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, [0x140011a20]
lea rdx, str._s_failed_with_0x_08X
lea rcx, [rbp + 0x30]
call fcn.14000d550
mov ecx, 1
lea rdx, [rbp + 0x30]
call fcn.14000d2b0
jmp 0x1400035fd
cmp qword [rsp + 0x60], r14
jne 0x140003352
lea rcx, str.hToken_is_NULL_despite_WTSQueryUserToken_succeeding
call fcn.14000d390
jmp 0x1400035fd
xorps xmm1, xmm1
lea rbx, [rdi + 0x170]
mov rcx, qword [rbx]
xor eax, eax
mov qword [rbp - 0x70], rax
xorps xmm0, xmm0
mov qword [rbp], rax
movups xmmword [rbp - 0x60], xmm1
mov dword [rbp - 0x60], 0x68
movups xmmword [rbp - 0x20], xmm1
mov word [rbp - 0x20], r14w
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x50], xmm1
movups xmmword [rbp - 0x40], xmm1
movups xmmword [rbp - 0x30], xmm1
movups xmmword [rbp - 0x10], xmm1
test rcx, rcx
je 0x1400033cd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi + 0x178]
mov qword [rbx], r14
test rcx, rcx
je 0x1400033cd
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rdi + 0x178]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x178], r14
xorps xmm0, xmm0
mov qword [rsp + 0x68], r14
xor eax, eax
lea r8, [rbp + 0x18]
movups xmmword [rbp + 0x18], xmm0
mov qword [rbp + 0x28], rax
lea rdx, [rsp + 0x68]
xor r9d, r9d
mov dword [rbp + 0x18], 0x18
mov rcx, rbx
mov dword [rbp + 0x28], 1
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x140003417
lea rcx, str.CreatePipe_failed
call fcn.14000d390
jmp 0x1400035f2
mov rcx, qword [rbx]
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
xor r9d, r9d
mov qword [rsp + 0x70], r14
lea r8, [rbp + 0x18]
lea rdx, [rdi + 0x168]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x140003471
lea rcx, str.CreatePipe_failed
call fcn.14000d390
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r14
jmp 0x1400035f2
mov rcx, qword [rdi + 0x168]
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov rax, qword [rsp + 0x68]
lea rcx, [rbp + 0x240]
or dword [rbp - 0x24], 0x100
xor edx, edx
mov qword [rbp - 8], rax
mov r8d, 0x208
mov rax, qword [rsp + 0x70]
mov qword [rbp - 0x10], rax
mov qword [rbp], 0xffffffffffffffff
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [rbp + 0x30]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x104
lea rdx, [rbp + 0x30]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, eax
lea rcx, [rbp + 0x30]
call qword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchRemoveFileSpec]
lea r9, str.amdpmfserviceuser.exe
mov edx, 0x104
lea r8, [rbp + 0x30]
lea rcx, [rbp + 0x240]
call qword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchCombine]
lea rcx, str.Spawning_child_process
call fcn.14000d4b0
mov rcx, qword [rsp + 0x60]
lea rax, [rbp - 0x80]
mov qword [rsp + 0x50], rax
lea rdx, [rbp + 0x240]
lea rax, [rbp - 0x60]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r8d, r8d
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], 0x8000000
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
cmp eax, 1
jne 0x1400035a4
mov rax, qword [rbp - 0x80]
lea r8, [0x140003630]
mov qword [rsp + 0x28], r14
mov r9, rdi
xor edx, edx
mov qword [rdi + 0x160], rax
xor ecx, ecx
mov dword [rsp + 0x20], r14d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0x178], rax
test rax, rax
jne 0x1400035d2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.ChildProcAgent::startChildProc:_CreateThread
jmp 0x1400035b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.CreateProcessAsUser
mov r9d, eax
lea rdx, str._s_failed_with_0x_08X
lea rcx, [rbp + 0x30]
call fcn.14000d550
lea rdx, [rbp + 0x30]
mov ecx, 1
call fcn.14000d2b0
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x590]
mov r14, qword [rsp + 0x598]
mov rcx, qword [rbp + 0x450]
xor rcx, rsp
call fcn.14000e120
add rsp, 0x560
pop rdi
pop rsi
pop rbp
ret