Function at 0x404e80
Capabilities:
Spoof parent pid

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x104
mov eax, dword [0x5c7004]
xor eax, esp
mov dword [esp + 0x100], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
push edi
mov edi, dword [ebp + 8]
push str.EnableWarnings
mov dword [esp + 0x38], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x98], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov byte [esp + 0x1b], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x30], ebx
call sym.ProcessHacker.exe_PhGetIntegerSetting
test eax, eax
je 0x404f2d
mov eax, dword ds:[esi + 0x18]
push ebx
push str.The_process_will_be_restarted_with_the_same_command_line__working_directory_and_privileges.
push dword [eax + 4]
push str.restart
push edi
call sym.ProcessHacker.exe_PhShowConfirmMessage
test al, al
je 0x405505
mov eax, dword fs:[0x18]
mov esi, dword [esi + 0x10]
cmp esi, dword [eax + 0x20]
je 0x405505
push 0x48
lea eax, [esp + 0xa4]
push 0
push eax
call fcn.00536b00
add esp, 0xc
mov dword [esp + 0xa0], 0x48
mov eax, 1
mov dword [esp + 0xcc], 1
mov edx, 0x1010
mov word [esp + 0xd0], ax
lea ecx, [esp + 0x94]
push esi
call fcn.004d3720
mov edi, eax
test edi, edi
js 0x405434
lea eax, ds:[esp + 0x1c]
push eax
push dword [esp + 0x98]
call sym.ProcessHacker.exe_PhGetProcessCommandLine
mov edi, eax
test edi, edi
js 0x405434
mov esi, dword [esp + 0x1c]
push esi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
lea eax, [esp + 0x28]
push eax
push 0
push dword [esp + 0x9c]
call sym.ProcessHacker.exe_PhGetProcessPebString
mov edi, eax
test edi, edi
js 0x405434
push dword [esp + 0x28]
call sym.ProcessHacker.exe_PhAutoDereferenceObject
push dword [esp + 0x94]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x94], ebx
push dword [eax + 0x10]
lea eax, [esp + 0x44]
push ecx
push eax
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
add esp, 4
lea ecx, [esp + 0x98]
mov edx, 0x81
test byte [eax + 4], 1
mov eax, 0x21081
cmovne edx, eax
call fcn.004d3720
mov edi, eax
test edi, edi
js 0x405434
lea eax, ds:[esp + 0x9c]
push eax
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
test eax, eax
jne 0x405077
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x405077
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [esp + 0x10]
mov edi, eax
test edi, edi
jle 0x405438
movzx edi, di
or edi, 0xc0070000
jmp 0x405438
push dword [esp + 0x9c]
push 4
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
lea ecx, [esp + 0x9c]
mov dword [esp + 0xe4], eax
push ecx
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
test eax, eax
je 0x405055
push 0
push 0
push 4
lea eax, [esp + 0xa0]
push eax
push 0x20000
push 0
push dword [esp + 0xfc]
call dword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
test eax, eax
je 0x405055
lea eax, [esp + 0x50]
push eax
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
test byte ds:[eax + 4], 1
je 0x4050f5
lea eax, [esp + 0x24]
push eax
push 0x15
push dword [esp + 0x9c]
call sym.ProcessHacker.exe_PhGetObjectSecurity
lea eax, [esp + 0x90]
push eax
push ecx
lea eax, [esp + 0x68]
push eax
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
mov ecx, dword ds:[esp + 0x9c]
add esp, 4
mov edx, dword [eax + 4]
and edx, 1
shl edx, 0x11
or edx, 8
call fcn.004d39c0
test eax, eax
js 0x405244
lea eax, [esp + 0x70]
push eax
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
test byte [eax + 4], 1
je 0x405150
lea eax, [esp + 0x20]
push eax
push 0x15
push dword [esp + 0x98]
call sym.ProcessHacker.exe_PhGetObjectSecurity
call fcn.004e0900
test eax, eax
je 0x405189
push 0
push dword [esp + 0x94]
lea eax, [esp + 0xa0]
push eax
call fcn.004e0900
mov esi, eax
mov ecx, eax
call dword [0x55890c]
call esi
test eax, eax
mov ecx, 2
cmovne ebx, ecx
mov dword [esp + 0x2c], ebx
mov esi, dword [esp + 0x90]
lea eax, [esp + 0xf0]
push eax
push 4
lea eax, [esp + 0xf4]
push eax
push 0x1d
push esi
call dword [sym.imp.ntdll.dll_NtQueryInformationToken]
test eax, eax
js 0x4051b9
cmp dword [esp + 0xec], 0
jne 0x405228
lea eax, [esp + 0x30]
mov edx, 0x27
push eax
mov ecx, esi
call fcn.004d54e0
test eax, eax
js 0x405228
mov esi, dword [esp + 0x30]
xor edi, edi
cmp dword [esi + 4], edi
jbe 0x405219
xor ebx, ebx
jmp 0x4051e0
mov ecx, dword [esi + 8]
cmp word [ecx + ebx + 8], 3
jne 0x405210
movzx eax, word [ecx + ebx]
mov dword [esp + 0x38], eax
mov eax, dword [ecx + ebx + 4]
push 0
mov dword [esp + 0x40], eax
lea eax, [esp + 0x3c]
push 0x5cb784
push eax
call sym.ProcessHacker.exe_PhEqualStringRef
test al, al
jne 0x405258
inc edi
add ebx, 0x18
cmp edi, dword [esi + 4]
jb 0x4051e0
push esi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [esp + 0x90]
call dword [sym.imp.ntdll.dll_NtClose]
mov dword [esp + 0x90], 0
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4052d7
mov edx, dword [eax + 4]
jmp 0x4052d9
push esi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [esp + 0x90]
call dword [sym.imp.ntdll.dll_NtClose]
mov esi, dword [esp + 0x94]
lea eax, [esp + 0x90]
push eax
push 0xe
push esi
mov dword [esp + 0x9c], 0
call dword [sym.imp.ntdll.dll_NtOpenProcessToken]
cmp eax, 0xc0000022
jne 0x4052bb
cmp byte [0x5cd02b], 0
je 0x405240
lea eax, [esp + 0x90]
mov edx, 0xe
push eax
mov ecx, esi
call fcn.004dd120
test eax, eax
js 0x405240
mov edx, dword [esp + 0x90]
call fcn.004dc240
test eax, eax
setns byte [esp + 0x17]
jmp 0x405240
xor edx, edx
test esi, esi
je 0x4052e2
mov ecx, dword [esi + 4]
jmp 0x4052e4
xor ecx, ecx
mov ebx, dword [esp + 0x10]
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x4052f4
mov eax, dword [eax + 4]
jmp 0x4052f6
xor eax, eax
push 0
lea esi, [esp + 0x1c]
push esi
mov esi, dword [esp + 0x34]
push 0
push 0
or esi, 0x194
push esi
lea esi, [esp + 0xb4]
push esi
push edx
push dword [esp + 0xb4]
push ecx
push eax
call sym.ProcessHacker.exe_PhCreateProcessWin32Ex
mov edi, eax
mov eax, dword [esp + 0x90]
test eax, eax
je 0x40534c
cmp byte [esp + 0x17], 0
je 0x405345
call fcn.004dc330
mov eax, dword [esp + 0x90]
push eax
call dword [sym.imp.ntdll.dll_NtClose]
test edi, edi
js 0x405438
lea eax, ds:[esp + 0x80]
push eax
call sym.ProcessHacker.exe_PhGetOwnTokenAttributes
test byte [eax + 4], 1
je 0x4053f3
mov eax, dword [esp + 0x24]
test eax, eax
je 0x405386
push eax
push 0x15
push dword [esp + 0x20]
call dword [sym.imp.ntdll.dll_NtSetSecurityObject]
cmp dword [esp + 0x20], 0
je 0x4053f3
mov esi, dword ds:[esp + 0x18]
lea eax, [esp + 0x90]
push eax
push 0xc0000
push esi
call dword [sym.imp.ntdll.dll_NtOpenProcessToken]
cmp eax, 0xc0000022
jne 0x4053ca
cmp byte [0x5cd02b], 0
je 0x4053f3
lea eax, [esp + 0x90]
mov edx, 0xc0000
push eax
mov ecx, esi
call fcn.004dd120
test eax, eax
js 0x4053f3
push dword ds:[esp + 0x20]
push 0x15
push dword [esp + 0x98]
call dword [sym.imp.ntdll.dll_NtSetSecurityObject]
push dword [esp + 0x90]
call dword [sym.imp.ntdll.dll_NtClose]
push 0
push 0x18
lea eax, [esp + 0xfc]
push eax
push 0
push dword [esp + 0x28]
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
js 0x405417
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
mov ecx, dword [esp + 0x94]
mov edx, 1
call fcn.004d3bc0
push dword [esp + 0x18]
call dword [sym.imp.ntdll.dll_NtResumeProcess]
jmp 0x405438
mov ebx, dword [esp + 0x10]
cmp dword [esp + 0x98], 0
je 0x405468
call fcn.004e0a60
test eax, eax
je 0x405468
push dword [esp + 0x98]
call fcn.004e0a60
mov esi, eax
mov ecx, eax
call dword [0x55890c]
call esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40547f
push eax
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x405496
push eax
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword ds:[esp + 0xe4]
test eax, eax
je 0x4054c6
push eax
call dword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
push dword ds:[esp + 0xe4]
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov esi, dword [esp + 0x18]
test esi, esi
je 0x4054d5
push esi
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword ds:[esp + 0x94]
test eax, eax
je 0x4054eb
push eax
call dword [sym.imp.ntdll.dll_NtClose]
test edi, edi
jns 0x40551e
push ecx
mov ecx, dword [esp + 0x38]
mov edx, str.restart
push edi
push ebx
lfence
call fcn.00403960
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x100]
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esp + 0x10c]
mov al, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00534c91
mov esp, ebp
pop ebp
ret 8