Function at 0x406453
Capabilities:
Enumerate processes
Get common file path

Disassembly:
push 0x8a4
mov eax, 0x434c58
call fcn.0041aab0
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x84c]
mov ebx, dword [ebp + 0xc]
push str.GetTokenFromValidUserProcess...
mov dword [ebp - 0x8b0], edi
mov dword [ebp - 0x8a8], ebx
call fcn.004020dd
xor esi, esi
lea eax, [ebp - 0x84c]
push esi
push eax
push 2
mov dword [ebp - 4], esi
call fcn.00403273
mov ecx, dword [ebp - 0x84c]
add esp, 0xc
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov eax, dword [ebx]
mov dword [ebp - 0x848], esi
mov dword [ebp - 0x89c], esi
cmp dword [eax - 0xc], esi
jne 0x4065a6
call fcn.0040bda9
push eax
lea ecx, [ebp - 0x84c]
call fcn.00401320
push 0x208
lea eax, [ebp - 0x218]
inc esi
push 0
push eax
mov dword [ebp - 4], esi
call fcn.0041bfd0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x406560
lea eax, [ebp - 0x218]
push eax
call fcn.0041fc6e
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x84c]
call fcn.0040360e
mov esi, str.explorer.exe
push esi
call fcn.0041fc6e
pop ecx
push eax
push esi
lea ecx, [ebp - 0x84c]
call fcn.00402366
and dword [ebp - 0x854], 0
lea eax, [ebp - 0x854]
push eax
lea eax, [ebp - 0x84c]
push eax
push edi
call fcn.00405e21
add esp, 0xc
mov edi, eax
jmp 0x40659b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.GetWindowsDirectory_failed:
lea ecx, [ebp - 0x850]
mov edi, eax
call fcn.004020dd
push edi
lea eax, [ebp - 0x850]
mov byte [ebp - 4], 2
push eax
push esi
call fcn.00403273
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x84c]
jmp 0x406c43
push esi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
jne 0x4065fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.CreateToolhelp32Snapshot_failed
lea ecx, [ebp - 0x850]
mov esi, eax
call fcn.004020dd
push esi
lea eax, [ebp - 0x850]
mov dword [ebp - 4], 3
push eax
push 1
call fcn.00403273
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov eax, esi
jmp 0x406c4d
lea eax, [ebp - 0x844]
mov dword [ebp - 0x844], 0x22c
push eax
push edi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x40665e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Process32First_failed
lea ecx, [ebp - 0x850]
mov esi, eax
call fcn.004020dd
push esi
lea eax, [ebp - 0x850]
mov dword [ebp - 4], 4
push eax
push 1
call fcn.00403273
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a54
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4065f4
xor esi, esi
inc esi
push dword [ebp - 0x83c]
call fcn.00406c53
mov ebx, eax
pop ecx
mov dword [ebp - 0x854], ebx
lea ecx, [ebx - 0x2000]
cmp ecx, 0xfff
ja 0x406b7c
push dword [ebp - 0x83c]
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
mov dword [ebp - 0x84c], ebx
test ebx, ebx
je 0x406beb
cmp ebx, 0xffffffff
je 0x4069dd
and dword [ebp - 0x848], 0
lea eax, [ebp - 0x848]
push eax
push 0xa
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x406b5e
cmp dword [ebp - 0x848], 0
jne 0x40674d
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x858]
call fcn.004020dd
push str.null_token
lea ecx, [ebp - 0x850]
mov dword [ebp - 4], 7
call fcn.004020dd
push 0
lea eax, [ebp - 0x858]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x850]
push eax
push esi
call fcn.00402b31
mov ecx, dword [ebp - 0x850]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x858]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406beb
push 0x200
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.0041bfd0
push 0x200
lea eax, [ebp - 0x618]
push 0
push eax
call fcn.0041bfd0
mov eax, 0x100
mov dword [ebp - 0x8a4], eax
mov dword [ebp - 0x8a0], eax
lea eax, [ebp - 0x8a0]
push eax
lea eax, [ebp - 0x618]
push eax
lea eax, [ebp - 0x8a4]
push eax
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 0x848]
call fcn.00406d03
add esp, 0x2c
test eax, eax
jne 0x40682a
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x860]
call fcn.004020dd
push str.GetUserNameAndDomainNameFromToken_failed
lea ecx, [ebp - 0x85c]
mov dword [ebp - 4], 9
call fcn.004020dd
push 0
lea eax, [ebp - 0x860]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x85c]
push eax
push esi
call fcn.00402b31
mov ecx, dword [ebp - 0x85c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x860]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x848]
jmp 0x406742
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x8ac]
call fcn.004020dd
push eax
push dword [ebp - 0x8a8]
call fcn.00404051
pop ecx
pop ecx
mov ecx, dword [ebp - 0x8ac]
mov bl, al
add ecx, 0xfffffff0
call fcn.00401a54
test bl, bl
je 0x406af2
lea eax, [ebp - 0x848]
push eax
call fcn.00406f13
test eax, eax
lea eax, [ebp - 0x820]
pop ecx
push eax
je 0x4068e2
lea ecx, [ebp - 0x868]
call fcn.004020dd
push str.Using_primary_token_from_elevated_process
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xb
call fcn.004020dd
push 0
lea eax, [ebp - 0x868]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x864]
push eax
push 2
call fcn.00402b31
mov ecx, dword [ebp - 0x864]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x868]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ebx, dword [ebp - 0x848]
jmp 0x406950
lea ecx, [ebp - 0x870]
call fcn.004020dd
push str.Using_linked_token_from_not_elevated_process
lea ecx, [ebp - 0x86c]
mov dword [ebp - 4], 0xd
call fcn.004020dd
push 0
lea eax, [ebp - 0x870]
mov byte [ebp - 4], 0xe
push eax
lea eax, [ebp - 0x86c]
push eax
push 2
call fcn.00402b31
mov ecx, dword [ebp - 0x86c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x870]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
push dword [ebp - 0x848]
call fcn.004058a5
pop ecx
mov ebx, eax
lea eax, [ebp - 0x820]
push eax
test ebx, ebx
jne 0x4069e9
lea ecx, [ebp - 0x878]
call fcn.004020dd
push str.GetLinkedToken_failed
lea ecx, [ebp - 0x874]
mov dword [ebp - 4], 0xf
call fcn.004020dd
mov byte [ebp - 4], 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x878]
push eax
lea eax, [ebp - 0x874]
push eax
push esi
call fcn.00402b31
mov ecx, dword [ebp - 0x874]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x878]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
cmp dword [ebp - 0x848], ebx
je 0x4069d7
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x84c]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406be2
lea ecx, [ebp - 0x880]
call fcn.004020dd
push str.Linked_token_created
lea ecx, [ebp - 0x87c]
mov dword [ebp - 4], 0x11
call fcn.004020dd
push 0
lea eax, [ebp - 0x880]
mov byte [ebp - 4], 0x12
push eax
lea eax, [ebp - 0x87c]
push eax
push 2
call fcn.00402b31
mov ecx, dword [ebp - 0x87c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x880]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
push dword [ebp - 0x8b0]
push esi
push esi
push 0
push 0x2000000
push ebx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x406ad7
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x888]
call fcn.004020dd
push str.User_Token_with_privileges_found
lea ecx, [ebp - 0x884]
mov dword [ebp - 4], 0x13
call fcn.004020dd
push 0
lea eax, [ebp - 0x888]
mov byte [ebp - 4], 0x14
push eax
lea eax, [ebp - 0x884]
push eax
push 2
call fcn.00402b31
mov ecx, dword [ebp - 0x884]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x888]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
and dword [ebp - 0x854], 0
mov dword [ebp - 0x89c], esi
mov eax, dword [ebp - 0x848]
test eax, eax
je 0x406aec
cmp eax, ebx
je 0x406aec
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
jmp 0x4069d1
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x890]
call fcn.004020dd
push str.User_did_not_match__skipping
lea ecx, [ebp - 0x88c]
mov dword [ebp - 4], 0x15
call fcn.004020dd
push 0
lea eax, [ebp - 0x890]
mov byte [ebp - 4], 0x16
push eax
lea eax, [ebp - 0x88c]
push eax
push 2
call fcn.00402b31
mov ecx, dword [ebp - 0x88c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x890]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
jmp 0x4069d7
cmp dword [ebp - 0x848], 0
je 0x4069dd
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4069dd
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x898]
call fcn.004020dd
push str.skipping_disallowed_process
lea ecx, [ebp - 0x894]
mov dword [ebp - 4], 5
call fcn.004020dd
push ebx
lea eax, [ebp - 0x898]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x894]
push eax
push 2
call fcn.004032ba
mov ecx, dword [ebp - 0x894]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x898]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a54
cmp dword [ebp - 0x89c], 0
jne 0x406c00
lea eax, [ebp - 0x844]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x406661
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x854]
test edi, edi
je 0x406c4b
push str.finished_without_valid_token
lea ecx, [ebp - 0x854]
call fcn.004020dd
push 0x373
lea eax, [ebp - 0x854]
mov dword [ebp - 4], 0x17
push eax
push esi
call fcn.00403273
mov ecx, dword [ebp - 0x854]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov eax, edi
call fcn.0041aa5a
ret