Function at 0x180014f50
Capabilities:
Impersonate user

Disassembly:
jmp 0x180173210
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x2f0
lea rdi, [rsp + 0x60]
mov ecx, 0xa4
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x300]
mov qword [rsp + 0x98], 0
mov dword [rsp + 0xc0], 0x68
lea rax, [rsp + 0xc8]
mov rdi, rax
xor eax, eax
mov ecx, 0x60
rep stosb byte [rdi], al
mov byte [rsp + 0x134], 0
mov eax, dword [rsp + 0x308]
and eax, 0x1000
test eax, eax
je 0x1801732a1
mov eax, dword [rsp + 0x308]
and eax, 0x2000
test eax, eax
je 0x1801732a1
mov eax, 0xc00000f0
jmp 0x180173b05
mov rax, qword [rsp + 0x300]
cmp qword [rax], 0
jne 0x1801732c8
mov rax, qword [rsp + 0x300]
cmp qword [rax + 8], 0
jne 0x1801732c8
mov eax, 0xc0000030
jmp 0x180173b05
mov dword [rsp + 0xfc], 1
mov eax, 1
mov word [rsp + 0x100], ax
mov rax, qword [rsp + 0x300]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0xd0], rax
mov eax, dword [rsp + 0x308]
and eax, 0x40000
test eax, eax
je 0x1801735fd
mov byte [rsp + 0x135], 1
mov eax, dword [rsp + 0x308]
and eax, 0x3000
test eax, eax
je 0x180173328
mov byte [rsp + 0x135], 0
mov eax, dword [rsp + 0x308]
and eax, 0x10000
test eax, eax
je 0x180173340
mov byte [rsp + 0x135], 0
mov eax, dword [rsp + 0x308]
and eax, 0x20000
test eax, eax
je 0x18017338b
mov dword [rsp + 0x144], 0xffffffff
lea rdx, [rsp + 0x144]
mov rcx, 0xffffffffffffffff
call fcn.180011120
mov rax, qword [rsp + 0x300]
mov ecx, dword [rsp + 0x144]
cmp dword [rax + 0x28], ecx
je 0x18017338b
mov byte [rsp + 0x135], 0
mov rax, qword [rsp + 0x300]
cmp dword [rax + 0x48], 0
je 0x1801733af
mov rax, qword [rsp + 0x300]
cmp dword [rax + 0x48], 2
je 0x1801733af
mov byte [rsp + 0x135], 0
movzx eax, byte [rsp + 0x135]
test eax, eax
je 0x1801735fd
mov rax, qword [rsp + 0x300]
cmp qword [rax + 8], 0
je 0x1801733e9
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 8]
call sym.ProcessMonitor.dll_PhCreateString
mov qword [rsp + 0x158], rax
jmp 0x1801733f5
mov qword [rsp + 0x158], 0
mov rax, qword [rsp + 0x300]
cmp qword [rax + 0x18], 0
jne 0x180173415
mov eax, dword [rsp + 0x308]
or eax, 2
mov dword [rsp + 0x308], eax
mov dword [rsp + 0x194], 0
mov r9d, 8
lea r8, [0x1804ade90]
mov edx, dword [rsp + 0x308]
lea rcx, [rsp + 0x194]
call sym.ProcessMonitor.dll_PhMapFlags1
mov rcx, qword [rsp + 0x158]
call fcn.1800082b0
lea rcx, [rsp + 0x168]
mov qword [rsp + 0x50], rcx
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x48], rcx
mov rcx, qword [rsp + 0x300]
mov rcx, qword [rcx + 0x10]
mov qword [rsp + 0x40], rcx
mov rcx, qword [rsp + 0x300]
mov rcx, qword [rcx + 0x18]
mov qword [rsp + 0x38], rcx
mov ecx, dword [rsp + 0x194]
mov dword [rsp + 0x30], ecx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x300]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
mov r9d, 1
mov rax, qword [rsp + 0x300]
mov r8, qword [rax + 0x40]
mov rax, qword [rsp + 0x300]
mov rdx, qword [rax + 0x30]
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x38]
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
test eax, eax
je 0x1801734e8
mov dword [rsp + 0x60], 0
jmp 0x1801734f1
call fcn.180010890
mov dword [rsp + 0x60], eax
cmp qword [rsp + 0x158], 0
je 0x180173509
mov rcx, qword [rsp + 0x158]
call sym.ProcessMonitor.dll_PhDereferenceObject
cmp dword [rsp + 0x60], 0
jl 0x1801735c2
cmp qword [rsp + 0x310], 0
je 0x18017354e
mov ecx, dword [rsp + 0x178]
call fcn.18000b5e0
mov rcx, qword [rsp + 0x310]
mov qword [rcx], rax
mov ecx, dword [rsp + 0x17c]
call fcn.18000b5e0
mov rcx, qword [rsp + 0x310]
mov qword [rcx + 8], rax
cmp qword [rsp + 0x318], 0
je 0x18017356e
mov rax, qword [rsp + 0x318]
mov rcx, qword [rsp + 0x168]
mov qword [rax], rcx
jmp 0x180173587
cmp qword [rsp + 0x168], 0
je 0x180173587
mov rcx, qword [rsp + 0x168]
call qword [sym.imp.ntdll.dll_NtClose]
cmp qword [rsp + 0x320], 0
je 0x1801735a7
mov rax, qword [rsp + 0x320]
mov rcx, qword [rsp + 0x170]
mov qword [rax], rcx
jmp 0x1801735c0
cmp qword [rsp + 0x170], 0
je 0x1801735c0
mov rcx, qword [rsp + 0x170]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x1801735f4
cmp qword [rsp + 0x168], 0
je 0x1801735db
mov rcx, qword [rsp + 0x168]
call qword [sym.imp.ntdll.dll_NtClose]
cmp qword [rsp + 0x170], 0
je 0x1801735f4
mov rcx, qword [rsp + 0x170]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [rsp + 0x60]
jmp 0x180173b05
mov eax, dword [rsp + 0x308]
and eax, 0x1000
test eax, eax
je 0x180173699
mov rax, qword [rsp + 0x300]
mov r8, qword [rax + 0x30]
mov edx, 0x1000
lea rcx, [rsp + 0x1b8]
call fcn.180011720
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x180173643
mov eax, dword [rsp + 0x60]
jmp 0x180173b05
lea r8, [rsp + 0x78]
mov edx, 0xf01ff
mov rcx, qword [rsp + 0x1b8]
call fcn.180006550
mov dword [rsp + 0x60], eax
mov rcx, qword [rsp + 0x1b8]
call qword [sym.imp.ntdll.dll_NtClose]
cmp dword [rsp + 0x60], 0
jge 0x18017367c
mov eax, dword [rsp + 0x60]
jmp 0x180173b05
mov eax, dword [rsp + 0x308]
and eax, 0x20000
test eax, eax
je 0x180173694
mov byte [rsp + 0x134], 1
jmp 0x180173848
mov eax, dword [rsp + 0x308]
and eax, 0x2000
test eax, eax
je 0x180173733
call fcn.180014180
test rax, rax
jne 0x1801736c1
mov eax, 0xc000007a
jmp 0x180173b05
call fcn.180014180
lea rcx, [rsp + 0x204]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 0x18
lea r9, [rsp + 0x1d8]
mov r8d, 0xe
mov rcx, qword [rsp + 0x300]
mov edx, dword [rcx + 0x30]
xor ecx, ecx
call rax
movzx eax, al
test eax, eax
jne 0x180173709
call fcn.180010890
jmp 0x180173b05
mov rax, qword [rsp + 0x1e8]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x308]
and eax, 0x20000
test eax, eax
je 0x18017372e
mov byte [rsp + 0x134], 1
jmp 0x180173848
mov rax, qword [rsp + 0x300]
cmp dword [rax + 0x48], 0
je 0x180173758
mov rax, qword [rsp + 0x300]
mov eax, dword [rax + 0x48]
mov dword [rsp + 0x214], eax
jmp 0x1801737f6
mov dword [rsp + 0x214], 2
mov r8b, 1
lea rdx, str.NT_AUTHORITY
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x30]
call fcn.180007b80
movzx eax, al
test eax, eax
je 0x1801737f6
mov r8b, 1
lea rdx, str.SYSTEM
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x38]
call fcn.180007b80
movzx eax, al
test eax, eax
jne 0x1801737eb
mov r8b, 1
lea rdx, str.LOCAL_SERVICE
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x38]
call fcn.180007b80
movzx eax, al
test eax, eax
jne 0x1801737eb
mov r8b, 1
lea rdx, str.NETWORK_SERVICE
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x38]
call fcn.180007b80
movzx eax, al
test eax, eax
je 0x1801737f6
mov dword [rsp + 0x214], 5
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x214]
mov rax, qword [rsp + 0x300]
mov r8, qword [rax + 0x40]
mov rax, qword [rsp + 0x300]
mov rdx, qword [rax + 0x30]
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x38]
call qword [sym.imp.ADVAPI32.dll_LogonUserW]
test eax, eax
jne 0x180173848
call fcn.180010890
jmp 0x180173b05
mov eax, dword [rsp + 0x308]
and eax, 0x10000
test eax, eax
je 0x1801738de
lea rdx, [rsp + 0x228]
mov rcx, qword [rsp + 0x78]
call fcn.18000c5f0
test eax, eax
jl 0x1801738de
lea rax, [rsp + 0x264]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x244]
mov edx, 8
mov rcx, qword [rsp + 0x228]
call qword [sym.imp.ntdll.dll_NtQueryInformationToken]
test eax, eax
jl 0x1801738d0
cmp dword [rsp + 0x244], 1
jne 0x1801738d0
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntdll.dll_NtClose]
mov rax, qword [rsp + 0x228]
mov qword [rsp + 0x78], rax
mov byte [rsp + 0x134], 0
jmp 0x1801738de
mov rcx, qword [rsp + 0x228]
call qword [sym.imp.ntdll.dll_NtClose]
movzx eax, byte [rsp + 0x134]
test eax, eax
je 0x180173990
mov dword [rsp + 0x2a8], 0x30
mov qword [rsp + 0x2b0], 0
mov dword [rsp + 0x2c0], 0
mov qword [rsp + 0x2b8], 0
mov qword [rsp + 0x2c8], 0
mov qword [rsp + 0x2d0], 0
lea rax, [rsp + 0x288]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
xor r9d, r9d
lea r8, [rsp + 0x2a8]
mov edx, 0xf01ff
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntdll.dll_NtDuplicateToken]
mov dword [rsp + 0x60], eax
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntdll.dll_NtClose]
cmp dword [rsp + 0x60], 0
jge 0x180173983
mov eax, dword [rsp + 0x60]
jmp 0x180173b05
mov rax, qword [rsp + 0x288]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x308]
and eax, 0x20000
test eax, eax
je 0x1801739d4
mov rax, qword [rsp + 0x300]
mov edx, dword [rax + 0x28]
mov rcx, qword [rsp + 0x78]
call sym.ProcessMonitor.dll_PhSetTokenSessionId
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x1801739d4
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [rsp + 0x60]
jmp 0x180173b05
mov rax, qword [rsp + 0x300]
cmp qword [rax + 0x18], 0
jne 0x180173a20
call fcn.18000ffe0
test rax, rax
je 0x180173a20
call fcn.18000ffe0
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x98]
call rax
cmp qword [rsp + 0x98], 0
je 0x180173a20
mov eax, dword [rsp + 0x308]
or eax, 2
mov dword [rsp + 0x308], eax
mov rax, qword [rsp + 0x300]
cmp qword [rax + 0x18], 0
je 0x180173a45
mov rax, qword [rsp + 0x300]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x2e8], rax
jmp 0x180173a55
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x2e8], rax
mov rax, qword [rsp + 0x320]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x318]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x310]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x308]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x300]
mov r9, qword [rax + 0x10]
mov r8, qword [rsp + 0x2e8]
mov rax, qword [rsp + 0x300]
mov rdx, qword [rax + 8]
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax]
call sym.ProcessMonitor.dll_PhCreateProcessWin32Ex
mov dword [rsp + 0x60], eax
call fcn.18000be60
test rax, rax
je 0x180173af6
cmp qword [rsp + 0x98], 0
je 0x180173af6
call fcn.18000be60
mov rcx, qword [rsp + 0x98]
call rax
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [rsp + 0x60]
mov rdi, rax
mov rcx, rsp
lea rdx, [0x1804b0020]
call fcn.180014e20
mov rax, rdi
add rsp, 0x2f0
pop rdi
ret