Function at 0x140018aec
Capabilities:
Create process on windows
Query environment variable
Spoof parent pid

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x78]
sub rsp, 0x150
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14002a7b8]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov r12d, r8d
mov r14, rdx
xor r13d, r13d
mov ebx, r13d
lea rdx, str.SystemSetting
mov rcx, qword [r14 + 0x28]
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x140018bb8
mov rcx, qword [r14 + 0x18]
call qword [sym.imp.msvcrt.dll__wtoi]
cmp eax, 0x16
jae 0x140018be0
mov r9, qword [r14]
mov ecx, eax
shl rcx, 5
lea r10, str.filterkeys
mov rax, qword [rcx + r10]
sub r9, rax
movzx edx, word [rax]
movzx r8d, word [rax + r9]
sub edx, r8d
jne 0x140018b86
add rax, 2
test r8d, r8d
jne 0x140018b70
test edx, edx
jne 0x140018be0
cmp dword [rcx + r10 + 0x10], 2
jne 0x140018be0
mov edx, dword [rcx + r10 + 0x14]
mov dword [rbp], edx
xor r9d, r9d
lea r8, [rbp]
mov ecx, dword [rcx + r10 + 8]
call qword [sym.imp.USER32.dll_SystemParametersInfoW]
test eax, eax
je 0x140018be0
mov ebx, dword [rbp + 4]
and ebx, 1
jmp 0x140018be0
mov rcx, qword [r14 + 0x38]
cmp dword [rcx - 0x10], r13d
je 0x140018beb
lea rdx, [rsp + 0x50]
call fcn.14001a948
test eax, eax
je 0x140018be0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 1
test ebx, ebx
je 0x140018beb
xor eax, eax
jmp 0x140018f1f
mov ecx, 0x7fffffff
mov eax, ecx
lea rdx, str._SystemRoot_System32ATBroker.exe
cmp word [rdx], r13w
je 0x140018c09
add rdx, 2
sub rax, 1
jne 0x140018bf9
test rax, rax
je 0x140018c13
sub rcx, rax
jmp 0x140018c16
mov rcx, r13
test rax, rax
je 0x140018f1a
lea rax, [rcx + 0x104]
or r15, 0xffffffffffffffff
mov rbx, r15
cmp rax, rcx
cmovae rbx, rax
jb 0x140018f1a
mov rdi, r13
test rbx, rbx
jne 0x140018c47
mov rcx, r13
jmp 0x140018c5d
xor edx, edx
mov rax, r15
div rbx
cmp rax, 2
jb 0x140018f07
lea rcx, [rbx + rbx]
call qword [sym.imp.msvcrt.dll_malloc]
mov rdi, rax
test rax, rax
je 0x140018f07
mov r8d, ebx
mov rdx, rax
lea rcx, str._SystemRoot_System32ATBroker.exe
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x140018c9f
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x140018f0c
mov eax, eax
cmp rax, rbx
jbe 0x140018cb0
mov esi, 0x8007007a
jmp 0x140018f0c
lea rcx, [rbx + 0x16]
cmp rcx, rbx
jb 0x140018ccc
lea rax, [rcx + 0x104]
mov rsi, r15
cmp rax, rcx
cmovae rsi, rax
jae 0x140018cd6
mov esi, 0x80004005
jmp 0x140018f0c
mov rbx, r13
test rsi, rsi
jne 0x140018ce3
mov rcx, r13
jmp 0x140018cf9
xor edx, edx
mov rax, r15
div rsi
cmp rax, 2
jb 0x140018ef6
lea rcx, [rsi + rsi]
call qword [sym.imp.msvcrt.dll_malloc]
mov rbx, rax
test rax, rax
je 0x140018ef6
mov r8, qword [r14]
lea rdx, str._launchquickstart
lea rcx, [0x140020460]
mov rax, rcx
cmp byte [r14 + 0x51], r13b
cmovne rax, rdx
lea rdx, [0x140021b90]
cmp byte [r14 + 0x50], r13b
cmovne rcx, rdx
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r8
mov r9, rdi
lea r8, str._s__start__s__s__s
mov rdx, rsi
mov rcx, rbx
call fcn.140004524
test eax, eax
jns 0x140018d68
mov esi, 0x80004005
jmp 0x140018efb
mov esi, 0x70
mov r8d, esi
xor edx, edx
lea rcx, [rbp - 0x70]
call sub.msvcrt.dll_memset
mov dword [rbp - 0x70], esi
mov r15d, r13d
mov r14, r13
mov qword [rsp + 0x58], r13
mov esi, r13d
test r12d, r12d
je 0x140018e70
mov qword [rsp + 0x60], r13
call qword [sym.imp.USER32.dll_GetShellWindow]
test rax, rax
je 0x140018e70
lea rdx, [rsp + 0x50]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x140018e70
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov ecx, 0x80
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x60], rax
test rax, rax
je 0x140018e70
lea r9, [rsp + 0x58]
xor r8d, r8d
lea edx, [r8 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, qword [rsp + 0x58]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
mov eax, r13d
test r14, r14
setne al
test r14, r14
je 0x140018e2f
lea r9, [rsp + 0x58]
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
test eax, eax
je 0x140018e70
mov r15d, 1
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], 8
lea r9, [rsp + 0x60]
xor edx, edx
mov r8d, 0x20000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
mov rcx, qword [rbp - 8]
test eax, eax
cmovne rcx, r14
mov qword [rbp - 8], rcx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x1080000
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x140018ec8
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140018ecd
mov esi, 0x80004005
test r15d, r15d
je 0x140018edb
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
test r14, r14
je 0x140018efb
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, r14
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140018efb
mov esi, 0x8007000e
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_free]
nop
jmp 0x140018f0c
mov esi, 0x8007000e
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_free]
nop
mov eax, esi
jmp 0x140018f1f
mov eax, 0x80004005
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.14001d6c0
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret