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

Disassembly:
push 0x8a4
mov eax, 0x439017
call fcn.0041ea10
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.004020ed
xor esi, esi
lea eax, [ebp - 0x84c]
push esi
push eax
push 2
mov dword [ebp - 4], esi
call fcn.00403025
mov ecx, dword [ebp - 0x84c]
add esp, 0xc
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov eax, dword [ebx]
mov dword [ebp - 0x848], esi
mov dword [ebp - 0x89c], esi
cmp dword [eax - 0xc], esi
jne 0x4070d2
call fcn.0040fd19
push eax
lea ecx, [ebp - 0x84c]
call main
push 0x208
lea eax, [ebp - 0x218]
inc esi
push 0
push eax
mov dword [ebp - 4], esi
call fcn.0041ff30
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x40708c
lea eax, [ebp - 0x218]
push eax
call main
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x84c]
call main
mov esi, str.explorer.exe
push esi
call main
pop ecx
push eax
push esi
lea ecx, [ebp - 0x84c]
call main
and dword [ebp - 0x854], 0
lea eax, [ebp - 0x854]
push eax
lea eax, [ebp - 0x84c]
push eax
push edi
call fcn.00406954
add esp, 0xc
mov edi, eax
jmp 0x4070c7
call dword [sym.imp.kernel32.dll_GetLastError]
push str.GetWindowsDirectory_failed:
lea ecx, [ebp - 0x850]
mov edi, eax
call fcn.004020ed
push edi
lea eax, [ebp - 0x850]
mov byte [ebp - 4], 2
push eax
push esi
call fcn.00403025
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x84c]
jmp 0x40776f
push esi
push 2
call sub.kernel32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
jne 0x407127
call dword [sym.imp.kernel32.dll_GetLastError]
push str.CreateToolhelp32Snapshot_failed
lea ecx, [ebp - 0x850]
mov esi, eax
call fcn.004020ed
push esi
lea eax, [ebp - 0x850]
mov dword [ebp - 4], 3
push eax
push 1
call fcn.00403025
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov eax, esi
jmp 0x407779
lea eax, [ebp - 0x844]
mov dword [ebp - 0x844], 0x22c
push eax
push edi
call sub.kernel32.dll_Process32FirstW
test eax, eax
jne 0x40718a
call dword [sym.imp.kernel32.dll_GetLastError]
push str.Process32First_failed
lea ecx, [ebp - 0x850]
mov esi, eax
call fcn.004020ed
push esi
lea eax, [ebp - 0x850]
mov dword [ebp - 4], 4
push eax
push 1
call fcn.00403025
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x407120
xor esi, esi
inc esi
push dword [ebp - 0x83c]
call main
mov ebx, eax
pop ecx
mov dword [ebp - 0x854], ebx
lea ecx, [ebx - 0x2000]
cmp ecx, 0xfff
ja 0x4076a8
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 0x407717
cmp ebx, 0xffffffff
je 0x407509
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 0x40768a
cmp dword [ebp - 0x848], 0
jne 0x407279
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x858]
call fcn.004020ed
push str.null_token
lea ecx, [ebp - 0x850]
mov dword [ebp - 4], 7
call fcn.004020ed
push 0
lea eax, [ebp - 0x858]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x850]
push eax
push esi
call fcn.00402ada
mov ecx, dword [ebp - 0x850]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x858]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x407717
push 0x200
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.0041ff30
push 0x200
lea eax, [ebp - 0x618]
push 0
push eax
call fcn.0041ff30
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.0040782f
add esp, 0x2c
test eax, eax
jne 0x407356
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x860]
call fcn.004020ed
push str.GetUserNameAndDomainNameFromToken_failed
lea ecx, [ebp - 0x85c]
mov dword [ebp - 4], 9
call fcn.004020ed
push 0
lea eax, [ebp - 0x860]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x85c]
push eax
push esi
call fcn.00402ada
mov ecx, dword [ebp - 0x85c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x860]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
push dword [ebp - 0x848]
jmp 0x40726e
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x8ac]
call fcn.004020ed
push eax
push dword [ebp - 0x8a8]
call main
pop ecx
pop ecx
mov ecx, dword [ebp - 0x8ac]
mov bl, al
add ecx, 0xfffffff0
call fcn.00401a64
test bl, bl
je 0x40761e
lea eax, [ebp - 0x848]
push eax
call fcn.0040797e
test eax, eax
lea eax, [ebp - 0x820]
pop ecx
push eax
je 0x40740e
lea ecx, [ebp - 0x868]
call fcn.004020ed
push str.Using_primary_token_from_elevated_process
lea ecx, [ebp - 0x864]
mov dword [ebp - 4], 0xb
call fcn.004020ed
push 0
lea eax, [ebp - 0x868]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x864]
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x864]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x868]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ebx, dword [ebp - 0x848]
jmp 0x40747c
lea ecx, [ebp - 0x870]
call fcn.004020ed
push str.Using_linked_token_from_not_elevated_process
lea ecx, [ebp - 0x86c]
mov dword [ebp - 4], 0xd
call fcn.004020ed
push 0
lea eax, [ebp - 0x870]
mov byte [ebp - 4], 0xe
push eax
lea eax, [ebp - 0x86c]
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x86c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x870]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
push dword [ebp - 0x848]
call main
pop ecx
mov ebx, eax
lea eax, [ebp - 0x820]
push eax
test ebx, ebx
jne 0x407515
lea ecx, [ebp - 0x878]
call fcn.004020ed
push str.GetLinkedToken_failed
lea ecx, [ebp - 0x874]
mov dword [ebp - 4], 0xf
call fcn.004020ed
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.00402ada
mov ecx, dword [ebp - 0x874]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x878]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
cmp dword [ebp - 0x848], ebx
je 0x407503
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 0x40770e
lea ecx, [ebp - 0x880]
call fcn.004020ed
push str.Linked_token_created
lea ecx, [ebp - 0x87c]
mov dword [ebp - 4], 0x11
call fcn.004020ed
push 0
lea eax, [ebp - 0x880]
mov byte [ebp - 4], 0x12
push eax
lea eax, [ebp - 0x87c]
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x87c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x880]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
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 0x407603
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x888]
call fcn.004020ed
push str.User_Token_with_privileges_found
lea ecx, [ebp - 0x884]
mov dword [ebp - 4], 0x13
call fcn.004020ed
push 0
lea eax, [ebp - 0x888]
mov byte [ebp - 4], 0x14
push eax
lea eax, [ebp - 0x884]
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x884]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x888]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
and dword [ebp - 0x854], 0
mov dword [ebp - 0x89c], esi
mov eax, dword [ebp - 0x848]
test eax, eax
je 0x407618
cmp eax, ebx
je 0x407618
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push ebx
jmp 0x4074fd
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x890]
call fcn.004020ed
push str.User_did_not_match__skipping
lea ecx, [ebp - 0x88c]
mov dword [ebp - 4], 0x15
call fcn.004020ed
push 0
lea eax, [ebp - 0x890]
mov byte [ebp - 4], 0x16
push eax
lea eax, [ebp - 0x88c]
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x88c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x890]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
jmp 0x407503
cmp dword [ebp - 0x848], 0
je 0x407509
push dword [ebp - 0x848]
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x407509
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x898]
call fcn.004020ed
push str.skipping_disallowed_process
lea ecx, [ebp - 0x894]
mov dword [ebp - 4], 5
call fcn.004020ed
push ebx
lea eax, [ebp - 0x898]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x894]
push eax
push 2
call main
mov ecx, dword [ebp - 0x894]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x898]
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
cmp dword [ebp - 0x89c], 0
jne 0x40772c
lea eax, [ebp - 0x844]
push eax
push edi
call sub.kernel32.dll_Process32NextW
test eax, eax
jne 0x40718d
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov edi, dword [ebp - 0x854]
test edi, edi
je 0x407777
push str.finished_without_valid_token
lea ecx, [ebp - 0x854]
call fcn.004020ed
push 0x373
lea eax, [ebp - 0x854]
mov dword [ebp - 4], 0x17
push eax
push esi
call fcn.00403025
mov ecx, dword [ebp - 0x854]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov eax, edi
call fcn.0041e9ba
ret