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

Disassembly:
push 0x8a4
mov eax, 0x4395ba
call fcn.0041ef30
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.00403241
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 0x4074ed
call fcn.00410229
push eax
lea ecx, [ebp - 0x84c]
call fcn.00401330
push 0x208
lea eax, [ebp - 0x218]
inc esi
push 0
push eax
mov dword [ebp - 4], esi
call fcn.00420450
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x4074a7
lea eax, [ebp - 0x218]
push eax
call fcn.0042410e
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x84c]
call fcn.004035fe
mov esi, str.explorer.exe
push esi
call fcn.0042410e
pop ecx
push eax
push esi
lea ecx, [ebp - 0x84c]
call fcn.00402376
and dword [ebp - 0x854], 0
lea eax, [ebp - 0x854]
push eax
lea eax, [ebp - 0x84c]
push eax
push edi
call fcn.00406d6f
add esp, 0xc
mov edi, eax
jmp 0x4074e2
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.00403241
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x84c]
jmp 0x407b8a
push esi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
jne 0x407542
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.00403241
mov ecx, dword [ebp - 0x850]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov eax, esi
jmp 0x407b94
lea eax, [ebp - 0x844]
mov dword [ebp - 0x844], 0x22c
push eax
push edi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x4075a5
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.00403241
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 0x40753b
xor esi, esi
inc esi
push dword [ebp - 0x83c]
call fcn.00407b9a
mov ebx, eax
pop ecx
mov dword [ebp - 0x854], ebx
lea ecx, [ebx - 0x2000]
cmp ecx, 0xfff
ja 0x407ac3
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 0x407b32
cmp ebx, 0xffffffff
je 0x407924
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 0x407aa5
cmp dword [ebp - 0x848], 0
jne 0x407694
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.00402aff
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 0x407b32
push 0x200
lea eax, [ebp - 0x418]
push 0
push eax
call fcn.00420450
push 0x200
lea eax, [ebp - 0x618]
push 0
push eax
call fcn.00420450
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.00407c4a
add esp, 0x2c
test eax, eax
jne 0x407771
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.00402aff
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 0x407689
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x8ac]
call fcn.004020ed
push eax
push dword [ebp - 0x8a8]
call fcn.00404041
pop ecx
pop ecx
mov ecx, dword [ebp - 0x8ac]
mov bl, al
add ecx, 0xfffffff0
call fcn.00401a64
test bl, bl
je 0x407a39
lea eax, [ebp - 0x848]
push eax
call fcn.00407e5a
test eax, eax
lea eax, [ebp - 0x820]
pop ecx
push eax
je 0x407829
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.00402aff
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 0x407897
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.00402aff
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 fcn.0040645e
pop ecx
mov ebx, eax
lea eax, [ebp - 0x820]
push eax
test ebx, ebx
jne 0x407930
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.00402aff
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 0x40791e
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 0x407b29
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.00402aff
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 0x407a1e
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.00402aff
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 0x407a33
cmp eax, ebx
je 0x407a33
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
jmp 0x407918
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.00402aff
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 0x40791e
cmp dword [ebp - 0x848], 0
je 0x407924
push dword [ebp - 0x848]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407924
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 fcn.00403288
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 0x407b47
lea eax, [ebp - 0x844]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4075a8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x854]
test edi, edi
je 0x407b92
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.00403241
mov ecx, dword [ebp - 0x854]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov eax, edi
call fcn.0041eeda
ret