Function at 0x4022f0
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 0x402530
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 0x402530
cmp dword [ebp - 0xc], 0
je 0x402530
mov eax, dword [ebp - 8]
test eax, eax
je 0x40253e
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 0x40253e
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 0x40253e
push 0x228
lea eax, [ebp - 0x2ac]
push 0
push eax
call fcn.004310e0
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 0x40253e
lea eax, [ebp - 0x2b0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x4023ee
push ebx
jmp 0x402538
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 0x402466
lea eax, [ebp - 8]
push eax
push 8
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402463
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 0x40245e
mov eax, dword [ebp - 0x40]
cmp dword [ebp - 0x78], eax
jne 0x40245e
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x74], eax
je 0x40251d
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 0x402400
xor edi, edi
push ebx
call esi
test edi, edi
je 0x40253e
push edi
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40253e
lea eax, [ebp - 8]
push eax
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x402509
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 0x402504
push dword [ebp - 0xc]
push 0
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x4024ff
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.00409360
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.0042f23c
mov esp, ebp
pop ebp
ret
push dword [ebp - 8]
call esi
push edi
call esi
mov edi, dword [ebp - 0x2a8]
jmp 0x40247a
mov eax, dword [ebp - 8]
test eax, eax
je 0x40253e
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.0042f23c
mov esp, ebp
pop ebp
ret