Function at 0x4022d0
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2b4
mov eax, dword [0x47c018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402510
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push 0x14
push dword [ebp - 8]
call ebx
test eax, eax
je 0x402510
cmp dword [ebp - 0xc], 0
je 0x402510
mov eax, dword [ebp - 8]
test eax, eax
je 0x40251e
lea ecx, [ebp - 0x10]
mov dword [ebp - 0xc], 0
push ecx
push 4
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x10], 0
push ecx
push 0x13
push eax
call ebx
test eax, eax
je 0x40251e
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x38
lea eax, [ebp - 0x48]
push eax
push 0xa
push dword [ebp - 0xc]
call ebx
test eax, eax
je 0x40251e
push 0x228
lea eax, [ebp - 0x2ac]
push 0
push eax
call fcn.00431040
add esp, 0xc
mov dword [ebp - 0x2b0], 0x22c
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40251e
lea eax, [ebp - 0x2b0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x4023ce
push ebx
jmp 0x402518
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [eax]
nop dword [eax + eax]
push dword [ebp - 0x2a8]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x402446
lea eax, [ebp - 8]
push eax
push 8
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402443
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0x38
lea eax, [ebp - 0x80]
push eax
push 0xa
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x40243e
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x78], eax
jne 0x40243e
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x74], eax
je 0x4024fd
push dword [ebp - 8]
call esi
push edi
call esi
lea eax, [ebp - 0x2b0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x4023e0
xor edi, edi
push ebx
call esi
test edi, edi
je 0x40251e
push edi
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40251e
lea eax, [ebp - 8]
push eax
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4024e9
lea eax, [ebp - 0xc]
push eax
push 2
push 2
push 0
push 0xf01ff
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x4024e4
push dword [ebp - 0xc]
push 0
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x4024df
push str.start_scan_with_ImpersonateProcessWithMatchingAuthID
push 0
push 0x463
push dword [0x4806e8]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp - 0xc]
call fcn.004092d0
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
push dword [ebp - 0xc]
call esi
push dword [ebp - 8]
call esi
push edi
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f19a
mov esp, ebp
pop ebp
ret
push dword [ebp - 8]
call esi
push edi
call esi
mov edi, dword [ebp - 0x2a8]
jmp 0x40245a
mov eax, dword [ebp - 8]
test eax, eax
je 0x40251e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042f19a
mov esp, ebp
pop ebp
ret