Function at 0x409b00
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x516843
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x5749c8]
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
mov dword [ebp - 0x24c], ecx
xor ebx, ebx
push 0x228
lea eax, [ebp - 0x238]
push ebx
push eax
mov dword [ebp - 4], ebx
mov byte [ebp - 0x23d], bl
mov dword [ebp - 0x23c], ebx
call fcn.00500800
add esp, 0xc
call fcn.0040ce35
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x409b74
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x244], esi
mov ecx, dword [ebp + 8]
mov edi, dword [ecx - 0xc]
mov byte [ebp - 4], 1
cmp edi, ebx
jge 0x409b9e
push 0x80070057
call fcn.004010e0
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
sub eax, edi
or eax, edx
jge 0x409bbb
push edi
lea ecx, [ebp + 8]
call fcn.00401630
mov ecx, dword [ebp + 8]
lea edx, [edi + 1]
push edx
push ecx
call fcn.005000ea
mov eax, dword [ebp + 8]
add esp, 8
cmp edi, dword [eax - 8]
jg 0x409b94
mov dword [eax - 0xc], edi
mov ecx, dword [ebp + 8]
push ebx
xor eax, eax
push 2
mov word [ecx + edi*2], ax
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
mov dword [ebp - 0x248], edi
cmp edi, 0xffffffff
je 0x409d20
lea edx, [ebp - 0x23c]
push edx
push edi
mov dword [ebp - 0x23c], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x409d19
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x409c20
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x244]
call fcn.004019a0
mov esi, dword [ebp - 0x244]
mov edi, dword [esi - 0xc]
cmp edi, ebx
jl 0x409b94
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x409c76
push edi
lea ecx, [ebp - 0x244]
call fcn.00401630
mov esi, dword [ebp - 0x244]
lea ecx, [edi + 1]
push ecx
push esi
call fcn.005000ea
add esp, 8
cmp edi, dword [esi - 8]
jg 0x409b94
xor edx, edx
mov dword [esi - 0xc], edi
mov word [esi + edi*2], dx
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x409cf8
cmp dword [esi - 0xc], ebx
jl 0x409cf8
push eax
push esi
call fcn.004ffee7
add esp, 8
cmp eax, ebx
je 0x409cf8
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x409cf8
mov eax, dword [ebp - 0x234]
push eax
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
cmp edi, ebx
je 0x409cef
mov ecx, dword [ebp - 0x24c]
push edi
call fcn.00404a30
test al, al
jne 0x409ce8
mov byte [ebp - 0x23d], 1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x23d], 1
je 0x409d13
mov edx, dword [ebp - 0x248]
lea ecx, [ebp - 0x23c]
push ecx
push edx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x409c14
mov edi, dword [ebp - 0x248]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409d3f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409d65
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [ebp - 0x23d]
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.004ffd80
mov esp, ebp
pop ebp
ret 4