Function at 0x140015890
Capabilities:
Impersonate user

Disassembly:
jmp 0x140182e10
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 0x140182ea1
mov eax, dword [rsp + 0x308]
and eax, 0x2000
test eax, eax
je 0x140182ea1
mov eax, 0xc00000f0
jmp 0x140183705
mov rax, qword [rsp + 0x300]
cmp qword [rax], 0
jne 0x140182ec8
mov rax, qword [rsp + 0x300]
cmp qword [rax + 8], 0
jne 0x140182ec8
mov eax, 0xc0000030
jmp 0x140183705
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 0x1401831fd
mov byte [rsp + 0x135], 1
mov eax, dword [rsp + 0x308]
and eax, 0x3000
test eax, eax
je 0x140182f28
mov byte [rsp + 0x135], 0
mov eax, dword [rsp + 0x308]
and eax, 0x10000
test eax, eax
je 0x140182f40
mov byte [rsp + 0x135], 0
mov eax, dword [rsp + 0x308]
and eax, 0x20000
test eax, eax
je 0x140182f8b
mov dword [rsp + 0x144], 0xffffffff
lea rdx, [rsp + 0x144]
mov rcx, 0xffffffffffffffff
call fcn.1400118e0
mov rax, qword [rsp + 0x300]
mov ecx, dword [rsp + 0x144]
cmp dword [rax + 0x28], ecx
je 0x140182f8b
mov byte [rsp + 0x135], 0
mov rax, qword [rsp + 0x300]
cmp dword [rax + 0x48], 0
je 0x140182faf
mov rax, qword [rsp + 0x300]
cmp dword [rax + 0x48], 2
je 0x140182faf
mov byte [rsp + 0x135], 0
movzx eax, byte [rsp + 0x135]
test eax, eax
je 0x1401831fd
mov rax, qword [rsp + 0x300]
cmp qword [rax + 8], 0
je 0x140182fe9
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 8]
call sym.ProcessHacker.exe_PhCreateString
mov qword [rsp + 0x158], rax
jmp 0x140182ff5
mov qword [rsp + 0x158], 0
mov rax, qword [rsp + 0x300]
cmp qword [rax + 0x18], 0
jne 0x140183015
mov eax, dword [rsp + 0x308]
or eax, 2
mov dword [rsp + 0x308], eax
mov dword [rsp + 0x194], 0
mov r9d, 8
lea r8, [0x1404ddcf0]
mov edx, dword [rsp + 0x308]
lea rcx, [rsp + 0x194]
call sym.ProcessHacker.exe_PhMapFlags1
mov rcx, qword [rsp + 0x158]
call fcn.140008600
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 0x1401830e8
mov dword [rsp + 0x60], 0
jmp 0x1401830f1
call fcn.140010ff0
mov dword [rsp + 0x60], eax
cmp qword [rsp + 0x158], 0
je 0x140183109
mov rcx, qword [rsp + 0x158]
call sym.ProcessHacker.exe_PhDereferenceObject
cmp dword [rsp + 0x60], 0
jl 0x1401831c2
cmp qword [rsp + 0x310], 0
je 0x14018314e
mov ecx, dword [rsp + 0x178]
call fcn.14000baa0
mov rcx, qword [rsp + 0x310]
mov qword [rcx], rax
mov ecx, dword [rsp + 0x17c]
call fcn.14000baa0
mov rcx, qword [rsp + 0x310]
mov qword [rcx + 8], rax
cmp qword [rsp + 0x318], 0
je 0x14018316e
mov rax, qword [rsp + 0x318]
mov rcx, qword [rsp + 0x168]
mov qword [rax], rcx
jmp 0x140183187
cmp qword [rsp + 0x168], 0
je 0x140183187
mov rcx, qword [rsp + 0x168]
call qword [sym.imp.ntdll.dll_NtClose]
cmp qword [rsp + 0x320], 0
je 0x1401831a7
mov rax, qword [rsp + 0x320]
mov rcx, qword [rsp + 0x170]
mov qword [rax], rcx
jmp 0x1401831c0
cmp qword [rsp + 0x170], 0
je 0x1401831c0
mov rcx, qword [rsp + 0x170]
call qword [sym.imp.ntdll.dll_NtClose]
jmp 0x1401831f4
cmp qword [rsp + 0x168], 0
je 0x1401831db
mov rcx, qword [rsp + 0x168]
call qword [sym.imp.ntdll.dll_NtClose]
cmp qword [rsp + 0x170], 0
je 0x1401831f4
mov rcx, qword [rsp + 0x170]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [rsp + 0x60]
jmp 0x140183705
mov eax, dword [rsp + 0x308]
and eax, 0x1000
test eax, eax
je 0x140183299
mov rax, qword [rsp + 0x300]
mov r8, qword [rax + 0x30]
mov edx, 0x1000
lea rcx, [rsp + 0x1b8]
call fcn.140011f10
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x140183243
mov eax, dword [rsp + 0x60]
jmp 0x140183705
lea r8, [rsp + 0x78]
mov edx, 0xf01ff
mov rcx, qword [rsp + 0x1b8]
call fcn.1400067b0
mov dword [rsp + 0x60], eax
mov rcx, qword [rsp + 0x1b8]
call qword [sym.imp.ntdll.dll_NtClose]
cmp dword [rsp + 0x60], 0
jge 0x14018327c
mov eax, dword [rsp + 0x60]
jmp 0x140183705
mov eax, dword [rsp + 0x308]
and eax, 0x20000
test eax, eax
je 0x140183294
mov byte [rsp + 0x134], 1
jmp 0x140183448
mov eax, dword [rsp + 0x308]
and eax, 0x2000
test eax, eax
je 0x140183333
call fcn.140014a50
test rax, rax
jne 0x1401832c1
mov eax, 0xc000007a
jmp 0x140183705
call fcn.140014a50
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 0x140183309
call fcn.140010ff0
jmp 0x140183705
mov rax, qword [rsp + 0x1e8]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x308]
and eax, 0x20000
test eax, eax
je 0x14018332e
mov byte [rsp + 0x134], 1
jmp 0x140183448
mov rax, qword [rsp + 0x300]
cmp dword [rax + 0x48], 0
je 0x140183358
mov rax, qword [rsp + 0x300]
mov eax, dword [rax + 0x48]
mov dword [rsp + 0x214], eax
jmp 0x1401833f6
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.140007eb0
movzx eax, al
test eax, eax
je 0x1401833f6
mov r8b, 1
lea rdx, str.SYSTEM
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x38]
call fcn.140007eb0
movzx eax, al
test eax, eax
jne 0x1401833eb
mov r8b, 1
lea rdx, str.LOCAL_SERVICE
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x38]
call fcn.140007eb0
movzx eax, al
test eax, eax
jne 0x1401833eb
mov r8b, 1
lea rdx, str.NETWORK_SERVICE
mov rax, qword [rsp + 0x300]
mov rcx, qword [rax + 0x38]
call fcn.140007eb0
movzx eax, al
test eax, eax
je 0x1401833f6
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 0x140183448
call fcn.140010ff0
jmp 0x140183705
mov eax, dword [rsp + 0x308]
and eax, 0x10000
test eax, eax
je 0x1401834de
lea rdx, [rsp + 0x228]
mov rcx, qword [rsp + 0x78]
call fcn.14000cb40
test eax, eax
jl 0x1401834de
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 0x1401834d0
cmp dword [rsp + 0x244], 1
jne 0x1401834d0
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 0x1401834de
mov rcx, qword [rsp + 0x228]
call qword [sym.imp.ntdll.dll_NtClose]
movzx eax, byte [rsp + 0x134]
test eax, eax
je 0x140183590
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 0x140183583
mov eax, dword [rsp + 0x60]
jmp 0x140183705
mov rax, qword [rsp + 0x288]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x308]
and eax, 0x20000
test eax, eax
je 0x1401835d4
mov rax, qword [rsp + 0x300]
mov edx, dword [rax + 0x28]
mov rcx, qword [rsp + 0x78]
call sym.ProcessHacker.exe_PhSetTokenSessionId
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jge 0x1401835d4
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [rsp + 0x60]
jmp 0x140183705
mov rax, qword [rsp + 0x300]
cmp qword [rax + 0x18], 0
jne 0x140183620
call fcn.1400106c0
test rax, rax
je 0x140183620
call fcn.1400106c0
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x98]
call rax
cmp qword [rsp + 0x98], 0
je 0x140183620
mov eax, dword [rsp + 0x308]
or eax, 2
mov dword [rsp + 0x308], eax
mov rax, qword [rsp + 0x300]
cmp qword [rax + 0x18], 0
je 0x140183645
mov rax, qword [rsp + 0x300]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x2e8], rax
jmp 0x140183655
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.ProcessHacker.exe_PhCreateProcessWin32Ex
mov dword [rsp + 0x60], eax
call fcn.14000c360
test rax, rax
je 0x1401836f6
cmp qword [rsp + 0x98], 0
je 0x1401836f6
call fcn.14000c360
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, [0x1404dfe90]
call fcn.140015750
mov rax, rdi
add rsp, 0x2f0
pop rdi
ret