Function at 0x406954
Capabilities:
Enumerate processes

Disassembly:
push 0x24c
mov eax, 0x438ee7
call fcn.0041ea10
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x244]
mov ebx, dword [ebp + 0xc]
push str.GetTokenFromSpecificProcess:
mov dword [ebp - 0x258], eax
call fcn.004020ed
and dword [ebp - 4], 0
lea eax, [ebp - 0x244]
push 0
push ebx
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x244]
add esp, 0x10
or dword [ebp - 4], 0xffffffff
lea ecx, [ecx - 0x10]
call fcn.00401a64
push 0x5c
push dword [ebx]
call fcn.00421374
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
je 0x406f76
mov eax, dword [ebx]
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
je 0x406f76
mov eax, dword [eax - 0xc]
sub eax, ecx
mov ecx, ebx
dec eax
push eax
lea eax, [ebp - 0x250]
push eax
call fcn.0040333e
push str.adobearm.exe
push dword [ebp - 0x250]
mov dword [ebp - 4], 1
call fcn.00426578
pop ecx
pop ecx
test eax, eax
jne 0x406a6a
and dword [ebp - 0x244], eax
lea eax, [ebp - 0x244]
push eax
push str.iSkipAdobeArmExe
push dword [0x451880]
push 0x80000002
call fcn.00406656
add esp, 0x10
cmp dword [ebp - 0x244], 1
jne 0x406a6a
push str.get_token_from_adobearm.exe_disabled_for_testing
lea ecx, [ebp - 0x248]
call fcn.004020ed
push 0
lea eax, [ebp - 0x248]
mov byte [ebp - 4], 2
push eax
push 2
call fcn.00403025
mov ecx, dword [ebp - 0x248]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
push 0xd
pop esi
jmp 0x406cf8
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
jne 0x406ab3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.CreateToolhelp32Snapshot_failed
lea ecx, [ebp - 0x244]
mov esi, eax
call fcn.004020ed
push esi
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 3
push eax
push 1
call fcn.00403025
mov ecx, dword [ebp - 0x244]
add esp, 0xc
jmp 0x406cf0
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x23c], 0x22c
push eax
push edi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x406b0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Process32First_failed
lea ecx, [ebp - 0x244]
mov esi, eax
call fcn.004020ed
push esi
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 4
push eax
push 1
call fcn.00403025
mov ecx, dword [ebp - 0x244]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
jmp 0x406f6a
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x250]
call fcn.00426578
pop ecx
pop ecx
test eax, eax
jne 0x406c76
push str.found
lea ecx, [ebp - 0x248]
call fcn.004020ed
push 0
lea eax, [ebp - 0x250]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x248]
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x248]
add esp, 0x10
mov byte [ebp - 4], 1
lea ecx, [ecx - 0x10]
call fcn.00401a64
push dword [ebp - 0x234]
call fcn.0040777f
mov esi, eax
pop ecx
lea eax, [esi - 0x2000]
cmp eax, 0xfff
ja 0x406c13
push dword [ebp - 0x234]
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x244], eax
test eax, eax
je 0x406c76
cmp eax, 0xffffffff
je 0x406c06
lea eax, [ebp - 0x244]
push ebx
push eax
call fcn.00407e2e
pop ecx
pop ecx
test eax, eax
jne 0x406d0d
push str.installed_and_found_processes_are_not_the_same
lea ecx, [ebp - 0x254]
call fcn.004020ed
push 0
lea eax, [ebp - 0x254]
mov byte [ebp - 4], 0x11
push eax
push 2
call fcn.00403025
mov ecx, dword [ebp - 0x254]
add esp, 0xc
mov byte [ebp - 4], 1
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov eax, dword [ebp - 0x244]
test eax, eax
je 0x406c76
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406c76
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x240]
call fcn.004020ed
push str.skipping_disallowed_process
lea ecx, [ebp - 0x24c]
mov byte [ebp - 4], 6
call fcn.004020ed
push esi
lea eax, [ebp - 0x240]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x24c]
push eax
push 2
call fcn.0040306c
mov ecx, dword [ebp - 0x24c]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x240]
mov byte [ebp - 4], 1
lea ecx, [ecx - 0x10]
call fcn.00401a64
lea eax, [ebp - 0x23c]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x406b0f
test edi, edi
je 0x406c96
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x43bfd8
lea ecx, [ebp - 0x24c]
call fcn.004020ed
push str.finished_without_process_token
lea ecx, [ebp - 0x240]
mov byte [ebp - 4], 0x12
call fcn.004020ed
mov esi, 0x373
mov byte [ebp - 4], 0x13
push esi
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x240]
push eax
push 1
call fcn.00402ada
mov ecx, dword [ebp - 0x240]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x24c]
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x250]
add ecx, 0xfffffff0
call fcn.00401a64
mov eax, esi
jmp 0x406f79
and dword [ebp - 0x248], 0
lea eax, [ebp - 0x248]
push eax
push 0xa
push dword [ebp - 0x244]
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x406ee2
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
jne 0x406d94
lea eax, [ebp - 0x248]
push eax
call fcn.0040797e
pop ecx
test eax, eax
jne 0x406d94
push str.Using_linked_token_from_not_elevated_process
lea ecx, [ebp - 0x240]
call fcn.004020ed
push 0
push ebx
lea eax, [ebp - 0x240]
mov byte [ebp - 4], 9
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x240]
add esp, 0x10
mov byte [ebp - 4], 1
lea ecx, [ecx - 0x10]
call fcn.00401a64
push dword [ebp - 0x248]
call fcn.00406043
pop ecx
mov ebx, eax
jmp 0x406dd4
push str.Using_primary_token_from_elevated_process_or_ordered_by_caller
lea ecx, [ebp - 0x240]
call fcn.004020ed
push 0
push ebx
lea eax, [ebp - 0x240]
mov byte [ebp - 4], 8
push eax
push 2
call fcn.00402ada
mov ecx, dword [ebp - 0x240]
add esp, 0x10
mov byte [ebp - 4], 1
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ebx, dword [ebp - 0x248]
test ebx, ebx
jne 0x406e0e
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x24c]
call fcn.004020ed
push str.GetLinkedToken_failed
lea ecx, [ebp - 0x240]
mov byte [ebp - 4], 0xa
call fcn.004020ed
mov byte [ebp - 4], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x406f15
push dword [ebp - 0x258]
push 1
push 1
push 0
push 0x2000000
push ebx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x406e63
push str.DuplicateTokenEx_success
lea ecx, [ebp - 0x240]
call fcn.004020ed
push 0
lea eax, [ebp - 0x240]
mov byte [ebp - 4], 0xc
push eax
push 2
call fcn.00403025
mov ecx, dword [ebp - 0x240]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00401a64
xor esi, esi
jmp 0x406eca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea ecx, [ebp - 0x24c]
lea eax, [ebp - 0x218]
push eax
call fcn.004020ed
push str.DuplicateTokenEx_failed
lea ecx, [ebp - 0x240]
mov byte [ebp - 4], 0xd
call fcn.004020ed
push esi
lea eax, [ebp - 0x24c]
mov byte [ebp - 4], 0xe
push eax
lea eax, [ebp - 0x240]
push eax
push 1
call fcn.00402ada
mov ecx, dword [ebp - 0x240]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x24c]
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov eax, dword [ebp - 0x248]
test eax, eax
je 0x406edf
cmp eax, ebx
je 0x406edf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
jmp 0x406f58
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea ecx, [ebp - 0x24c]
lea eax, [ebp - 0x218]
push eax
call fcn.004020ed
push str.OpenProcessToken_failed
lea ecx, [ebp - 0x240]
mov byte [ebp - 4], 0xf
call fcn.004020ed
mov byte [ebp - 4], 0x10
push esi
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x240]
push eax
push 1
call fcn.00402ada
mov ecx, dword [ebp - 0x240]
add esp, 0x10
lea ecx, [ecx - 0x10]
call fcn.00401a64
mov ecx, dword [ebp - 0x24c]
lea ecx, [ecx - 0x10]
call fcn.00401a64
cmp dword [ebp - 0x248], 0
je 0x406f5e
push dword [ebp - 0x248]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x244]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406cf8
push 0xd
pop eax
call fcn.0041e9ba
ret