Function at 0x408ed0
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x531036
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x581e60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
push 0x228
lea eax, [ebp - 0x238]
push edi
push eax
mov esi, ecx
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x23c], edi
call fcn.0050f160
add esp, 0xc
cmp esi, edi
je 0x40912f
xor ecx, ecx
cmp cx, word [esi]
je 0x40912f
push esi
lea ecx, [ebp - 0x240]
call fcn.00407f10
mov dword [ebp - 4], edi
call fcn.00409ea0
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x408f5f
push 0x80004005
call fcn.00404b40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x244], esi
push edi
push 2
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x408fd7
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408fa4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408fcd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x409131
lea ecx, [ebp - 0x23c]
push ecx
push ebx
mov dword [ebp - 0x23c], 0x22c
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
lea ecx, [ebp - 0x240]
mov edi, eax
call fcn.00409280
test edi, edi
je 0x4090d3
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409010
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x244]
call fcn.004049c0
mov esi, dword [ebp - 0x244]
mov edi, dword [esi - 0xc]
test edi, edi
js 0x4090bf
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x409066
push edi
lea ecx, [ebp - 0x244]
call fcn.004048f0
mov esi, dword [ebp - 0x244]
lea eax, [edi + 1]
push eax
push esi
call fcn.0050ccb7
add esp, 8
cmp edi, dword [esi - 8]
jg 0x4090bf
mov dword [esi - 0xc], edi
xor ecx, ecx
mov word [esi + edi*2], cx
mov eax, dword [ebp - 0x240]
cmp dword [eax - 0xc], ecx
jl 0x4090a7
push esi
push eax
call fcn.0050c47b
add esp, 8
test eax, eax
je 0x4090a7
sub eax, dword [ebp - 0x240]
sar eax, 1
cmp eax, 0xffffffff
jne 0x4090c9
lea edx, [ebp - 0x23c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x409004
jmp 0x4090d3
push 0x80070057
call fcn.00404b40
mov dword [ebp - 0x248], 1
test ebx, ebx
je 0x4090de
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4090fe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409127
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x248]
jmp 0x409131
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050ba00
mov esp, ebp
pop ebp
ret