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

Disassembly:
push 0x8a4
mov eax, 0x434c18
call fcn.0041aa70
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.00403231
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 0x406584
call fcn.0040bd69
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.0041bf90
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x40653e
lea eax, [ebp - 0x218]
push eax
call fcn.0041fc2e
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x84c]
call fcn.004035ee
mov esi, str.explorer.exe
push esi
call fcn.0041fc2e
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.00405dff
add esp, 0xc
mov edi, eax
jmp 0x406579
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.00403231
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov ecx, dword [ebp - 0x84c]
jmp 0x406c21
push esi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
jne 0x4065d9
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.00403231
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov eax, esi
jmp 0x406c2b
lea eax, [ebp - 0x844]
mov dword [ebp - 0x844], 0x22c
push eax
push edi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x40663c
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.00403231
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 0x4065d2
xor esi, esi
inc esi
push dword [ebp - 0x83c]
call fcn.00406c31
mov ebx, eax
pop ecx
mov dword [ebp - 0x854], ebx
lea ecx, [ebx - 0x2000]
cmp ecx, 0xfff
ja 0x406b5a
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 0x406bc9
cmp ebx, 0xffffffff
je 0x4069bb
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 0x406b3c
cmp dword [ebp - 0x848], 0
jne 0x40672b
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.00402aef
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 0x406bc9
push 0x200
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.0041bf90
push 0x200
lea eax, [ebp - 0x618]
push 0
push eax
call fcn.0041bf90
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.00406ce1
add esp, 0x2c
test eax, eax
jne 0x406808
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.00402aef
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 0x406720
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x8ac]
call fcn.004020dd
push eax
push dword [ebp - 0x8a8]
call fcn.00404031
pop ecx
pop ecx
mov ecx, dword [ebp - 0x8ac]
mov bl, al
add ecx, 0xfffffff0
call fcn.00401a54
test bl, bl
je 0x406ad0
lea eax, [ebp - 0x848]
push eax
call fcn.00406ef1
test eax, eax
lea eax, [ebp - 0x820]
pop ecx
push eax
je 0x4068c0
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.00402aef
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 0x40692e
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.00402aef
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.00405885
pop ecx
mov ebx, eax
lea eax, [ebp - 0x820]
push eax
test ebx, ebx
jne 0x4069c7
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.00402aef
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 0x4069b5
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 0x406bc0
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.00402aef
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 0x406ab5
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.00402aef
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 0x406aca
cmp eax, ebx
je 0x406aca
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
jmp 0x4069af
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.00402aef
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 0x4069b5
cmp dword [ebp - 0x848], 0
je 0x4069bb
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4069bb
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.00403278
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 0x406bde
lea eax, [ebp - 0x844]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40663f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x854]
test edi, edi
je 0x406c29
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.00403231
mov ecx, dword [ebp - 0x854]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a54
mov eax, edi
call fcn.0041aa1a
ret