Function at 0x40c960
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a044
mov eax, dword fs:[0]
push eax
sub esp, 0x47c
mov eax, dword [0x53307c]
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 edi, ecx
xor ebx, ebx
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov dword [ebp - 0x484], eax
cmp eax, 0xffffffff
je 0x40c9ce
lea ecx, [ebp - 0x480]
mov dword [ebp - 0x480], 0x22c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x40c9d5
push dword [ebp - 0x484]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40cc1b
mov esi, dword [ebp - 0x484]
nop dword [eax + eax]
cmp dword [ebp - 0x478], 0xa
jb 0x40cbfc
xor eax, eax
mov dword [ebp - 0x250], 0
push eax
push 0x522d78
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
call fcn.00405140
xor eax, eax
mov dword [ebp - 4], 0
push eax
push 0x522d78
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
call fcn.00405140
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x45c]
mov eax, dword [ebp - 0x478]
lea edx, [ecx + 2]
mov dword [ebp - 0x24c], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ca80
sub ecx, edx
lea eax, [ebp - 0x45c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x248]
call fcn.00405140
push dword [ebp - 0x478]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x40cb1c
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004e7890
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_K32GetModuleFileNameExW]
test eax, eax
je 0x40cb15
lea eax, [ebp - 0x218]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40caf3
sub eax, edx
lea ecx, [ebp - 0x230]
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00405140
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [edi + 4]
cmp dword [edi + 8], esi
je 0x40cb63
mov eax, dword [ebp - 0x250]
lea ecx, [esi + 8]
mov dword [esi], eax
mov eax, dword [ebp - 0x24c]
mov dword [esi + 4], eax
lea eax, [ebp - 0x248]
push eax
mov dword [ebp - 0x488], esi
call fcn.00405b70
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 2
push eax
lea ecx, [esi + 0x20]
call fcn.00405b70
add dword [edi + 4], 0x38
jmp 0x40cb72
lea eax, [ebp - 0x250]
mov ecx, edi
push eax
push esi
call fcn.0040ddb0
mov dword [ebp - 4], 0xffffffff
inc ebx
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40cbba
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cbb0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cc37
push edx
push ecx
call fcn.0049e956
add esp, 8
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x40cbf6
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cbec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cc37
push edx
push ecx
call fcn.0049e956
add esp, 8
mov esi, dword [ebp - 0x484]
lea eax, [ebp - 0x480]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x40c9e0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
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.0049e964
mov esp, ebp
pop ebp
ret
call fcn.004e9a8c
int3