Function at 0x4ae7e0
Capabilities:
Create process on windows
Impersonate user

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
mov eax, dword [0x5ac004]
xor eax, esp
mov dword [esp + 0x88], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x18]
push 0x40
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x48]
push 0
push eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x4c], 0x44
call fcn.0051fd40
mov edx, ebx
mov byte [esp + 0x1c], 0
and edx, 0x3000
add esp, 0xc
cmp edx, 0x3000
jne 0x4ae86b
mov eax, 0xc00000f0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
cmp dword [edi], 0
jne 0x4ae892
cmp dword [edi + 4], 0
jne 0x4ae892
mov eax, 0xc0000030
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
mov dword [esp + 0x6c], 1
mov eax, 1
mov word [esp + 0x70], ax
mov eax, dword [edi + 0x10]
mov dword [esp + 0x48], eax
test ebx, 0x40000
je 0x4aeac4
test edx, edx
mov ecx, ebx
sete al
xor edx, edx
and ecx, 0x10000
movzx eax, al
cmove edx, eax
mov dword [esp + 0x88], edx
test ebx, 0x20000
je 0x4ae910
push 0
push 4
lea eax, [esp + 0x94]
or esi, 0xffffffff
push eax
push 0x18
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
mov eax, dword [esp + 0x88]
movzx edx, al
cmovns esi, dword [esp + 0x8c]
xor ecx, ecx
cmp dword [edi + 0x14], esi
cmovne edx, ecx
mov eax, dword [edi + 0x24]
test eax, eax
je 0x4ae929
jmp 0x4ae920
cmp eax, 2
jne 0x4aeac4
test dl, dl
je 0x4aeac4
mov eax, dword [edi + 4]
test eax, eax
je 0x4ae942
push eax
call sym.ProcessHacker.exe_PhCreateString
mov edi, edi
jmp 0x4ae944
xor eax, eax
mov esi, ebx
mov dword [esp + 0x10], eax
or esi, 2
cmp dword [edi + 0xc], 0
cmovne esi, ebx
mov ebx, dword [esp + 0x10]
mov ecx, esi
mov eax, esi
shr ecx, 5
and ecx, 1
mov edx, ecx
or edx, 2
and al, 0x40
mov eax, esi
cmove edx, ecx
mov ecx, edx
or ecx, 4
and al, 4
mov eax, esi
cmove ecx, edx
mov edx, ecx
or edx, 0x10
and al, 0x10
mov eax, esi
cmove edx, ecx
mov ecx, edx
or ecx, 0x400
and al, 2
mov eax, esi
cmove ecx, edx
mov edx, ecx
or edx, 0x80000
and al, 0x80
mov eax, esi
cmove edx, ecx
mov ecx, edx
or ecx, 0x1000000
and al, 8
cmove ecx, edx
mov edx, ecx
or edx, 0x4000000
and esi, 0x100
cmove edx, ecx
test ebx, ebx
je 0x4ae9cb
mov eax, dword [ebx + 4]
jmp 0x4ae9cd
xor eax, eax
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x44]
push ecx
push dword [edi + 8]
push dword [edi + 0xc]
push edx
push eax
push dword [edi]
push 1
push dword [edi + 0x20]
push dword [edi + 0x18]
push dword [edi + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
test eax, eax
je 0x4ae9fa
xor esi, esi
jmp 0x4aea15
lea ebx, [ebx]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4aea15
movzx esi, si
or esi, 0xc0070000
test ebx, ebx
je 0x4aea2c
lea ecx, [ebx - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4aea2c
call fcn.004b3960
test esi, esi
js 0x4aea8d
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x4aea45
mov eax, dword [esp + 0x2c]
mov dword [ecx], eax
mov eax, dword [esp + 0x30]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
test edx, edx
je 0x4aea55
mov dword [edx], eax
jmp 0x4aea66
test eax, eax
je 0x4aea66
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
test edx, edx
je 0x4aeaa0
mov dword [edx], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4aea9c
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4aeaab
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
test ebx, 0x1000
je 0x4aeb87
push dword ds:[edi + 0x18]
mov edx, 0x1000
lea ecx, [esp + 0x14]
call fcn.004c3180
test eax, eax
jns 0x4aeb03
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0xc]
push ecx
push 0xf01ff
push eax
mov dword [esp + 0x94], eax
call dword [sym.imp.ntdll.dll_NtOpenProcessToken]
mov esi, eax
cmp esi, 0xc0000022
jne 0x4aeb4a
cmp byte [0x5b18bb], 0
je 0x4aeb4a
mov ecx, dword [esp + 0x88]
lea eax, [esp + 0xc]
push eax
mov edx, 0xf01ff
call fcn.004cbfa0
mov esi, eax
push dword [esp + 0x10]
call dword [sym.imp.ntdll.dll_NtClose]
test esi, esi
jns 0x4aeb74
lfence
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
mov eax, ebx
shr eax, 0x11
and eax, 0xffffff01
mov dword [esp + 0x10], eax
jmp 0x4aecda
test ebx, 0x2000
je 0x4aec29
call fcn.004f5140
test eax, eax
jne 0x4aebb8
mov eax, 0xc000007a
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
lea eax, [esp + 0x88]
push eax
push 0xc
lea eax, [esp + 0x2c]
push eax
push 0xe
push dword [edi + 0x18]
push 0
call fcn.004f5140
mov esi, eax
mov ecx, eax
call dword [0x5404bc]
call esi
nop
test al, al
jne 0x4aec11
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4aeed4
movzx eax, ax
or eax, 0xc0070000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov eax, ebx
shr eax, 0x11
and al, 1
mov byte [esp + 0x10], al
jmp 0x4aecda
mov esi, dword [edi + 0x24]
test esi, esi
jne 0x4aecbb
mov ecx, dword [edi + 0x18]
mov esi, 2
mov al, byte [ecx]
xor al, 0xe
test al, 0x1f
jne 0x4aecbb
push str.NT_AUTHORITY
push ecx
call fcn.005220b3
add esp, 8
test eax, eax
jne 0x4aecbb
mov ecx, dword [edi + 0x1c]
mov al, byte [ecx]
xor al, 0xf3
test al, 0x1f
jne 0x4aec7a
push str.SYSTEM
push ecx
call fcn.005220b3
add esp, 8
test eax, eax
je 0x4aecb6
mov ecx, dword [edi + 0x1c]
mov al, byte ds:[ecx]
xor al, 0xc
test al, 0x1f
jne 0x4aec99
push str.LOCAL_SERVICE
push ecx
call fcn.005220b3
add esp, 8
test eax, eax
je 0x4aecb6
mov ecx, dword [edi + 0x1c]
mov al, byte ds:[ecx]
xor al, 0xe
test al, 0x1f
jne 0x4aecbb
push str.NETWORK_SERVICE
push ecx
call fcn.005220b3
add esp, 8
test eax, eax
jne 0x4aecbb
mov esi, 5
lea eax, [esp + 0xc]
push eax
push 0
push esi
push dword [edi + 0x20]
push dword [edi + 0x18]
push dword [edi + 0x1c]
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
test eax, eax
je 0x4aebe4
lea ebx, [ebx]
test ebx, 0x10000
je 0x4aed56
lea eax, [esp + 0x90]
push eax
push 4
lea eax, [esp + 0x90]
push eax
push 0x13
push dword [esp + 0x1c]
call dword [sym.imp.ntdll.dll_NtQueryInformationToken]
test eax, eax
js 0x4aed56
mov esi, dword [esp + 0x88]
lea eax, [esp + 0x3c]
push eax
push 4
lea eax, [esp + 0x94]
push eax
push 8
push esi
call dword [sym.imp.ntdll.dll_NtQueryInformationToken]
test eax, eax
js 0x4aed4f
cmp dword [esp + 0x8c], 1
jne 0x4aed4f
push dword ds:[esp + 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
mov dword [esp + 0xc], esi
jmp 0x4aedd9
push esi
call dword [sym.imp.ntdll.dll_NtClose]
cmp byte ds:[esp + 0x10], 0
je 0x4aedd9
lea eax, [esp + 0x88]
mov dword [esp + 0x24], 0x18
push eax
push 1
push 0
lea eax, [esp + 0x30]
mov dword [esp + 0x34], 0
push eax
push 0xf01ff
push dword [esp + 0x20]
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
call dword [sym.imp.ntdll.dll_NtDuplicateToken]
push dword ds:[esp + 0xc]
mov esi, eax
call dword [sym.imp.ntdll.dll_NtClose]
test esi, esi
js 0x4aeb58
mov eax, dword [esp + 0x88]
mov dword [esp + 0xc], eax
lea esp, [esp]
test ebx, 0x20000
je 0x4aee34
mov eax, dword [edi + 0x14]
push 4
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x8c]
push eax
push 0xc
push dword [esp + 0x18]
call dword [sym.imp.ntdll.dll_NtSetInformationToken]
mov esi, eax
test esi, esi
jns 0x4aee34
lfence
push dword [esp + 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14
cmp dword [edi + 0xc], 0
jne 0x4aee6c
call fcn.004f4c20
nop
test eax, eax
je 0x4aee6c
push 0
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
call fcn.004f4c20
mov esi, eax
mov ecx, eax
call dword [0x5404bc]
mov edi, edi
call esi
cmp dword [esp + 0x14], 0
je 0x4aee6c
or ebx, 2
mov edx, dword [esp + 0x18]
mov eax, dword [edi + 0xc]
test eax, eax
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x20]
cmovne ecx, eax
push edx
push dword [esp + 0x28]
lea eax, [esp + 0x4c]
push dword [esp + 0x18]
push ebx
push eax
push dword [edi + 8]
push ecx
push dword [edi + 4]
push dword [edi]
call sym.ProcessHacker.exe_PhCreateProcessWin32Ex
mov edi, eax
call fcn.004f4d60
test eax, eax
je 0x4aeec8
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4aeec8
push ecx
call fcn.004f4d60
mov esi, eax
mov ecx, eax
call dword [0x5404bc]
call esi
push dword [esp + 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, edi
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0051e068
mov esp, ebp
pop ebp
ret 0x14