Function at 0x40ed70
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x17c
mov eax, dword [0x459074]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x134], 0
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x12c], 0x128
lea eax, [ebp - 0x12c]
push eax
mov ecx, dword [ebp - 0x138]
push ecx
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
jne 0x40ee3a
mov dword [ebp - 0x150], 0x450560
push 0x5c
mov edx, dword [ebp - 0x150]
push edx
call fcn.00423220
add esp, 8
mov dword [ebp - 0x14c], eax
cmp dword [ebp - 0x14c], 0
je 0x40edfa
mov eax, dword [ebp - 0x14c]
add eax, 1
mov dword [ebp - 0x154], eax
jmp 0x40ee06
mov ecx, dword [ebp - 0x150]
mov dword [ebp - 0x154], ecx
push 0x45052c
push 0x27e
mov edx, dword [ebp - 0x154]
push edx
push 1
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x10
xor eax, eax
jne 0x40edbf
mov ecx, dword [ebp - 0x138]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40f0d7
mov edx, dword [ebp + 8]
mov dword [ebp - 0x140], edx
lea eax, [ebp - 0x108]
mov dword [ebp - 0x13c], eax
mov ecx, dword [ebp - 0x13c]
mov dl, byte [ecx]
mov byte [ebp - 0x12d], dl
mov eax, dword [ebp - 0x140]
cmp dl, byte [eax]
jne 0x40eead
cmp byte [ebp - 0x12d], 0
je 0x40eea1
mov ecx, dword [ebp - 0x13c]
mov dl, byte [ecx + 1]
mov byte [ebp - 0x12e], dl
mov eax, dword [ebp - 0x140]
cmp dl, byte [eax + 1]
jne 0x40eead
add dword [ebp - 0x13c], 2
add dword [ebp - 0x140], 2
cmp byte [ebp - 0x12e], 0
jne 0x40ee4f
mov dword [ebp - 0x158], 0
jmp 0x40eeb8
sbb ecx, ecx
or ecx, 1
mov dword [ebp - 0x158], ecx
mov edx, dword [ebp - 0x158]
mov dword [ebp - 0x178], edx
cmp dword [ebp - 0x178], 0
jne 0x40eef1
mov eax, dword [ebp - 0x124]
mov dword [ebp - 0x134], eax
mov ecx, dword [ebp - 0x138]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x134]
jmp 0x40f0d7
lea edx, [ebp - 0x12c]
push edx
mov eax, dword [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
je 0x40f037
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x148], ecx
lea edx, [ebp - 0x108]
mov dword [ebp - 0x144], edx
mov eax, dword [ebp - 0x144]
mov cl, byte [eax]
mov byte [ebp - 0x12f], cl
mov edx, dword [ebp - 0x148]
cmp cl, byte [edx]
jne 0x40ef80
cmp byte [ebp - 0x12f], 0
je 0x40ef74
mov eax, dword [ebp - 0x144]
mov cl, byte [eax + 1]
mov byte [ebp - 0x130], cl
mov edx, dword [ebp - 0x148]
cmp cl, byte [edx + 1]
jne 0x40ef80
add dword [ebp - 0x144], 2
add dword [ebp - 0x148], 2
cmp byte [ebp - 0x130], 0
jne 0x40ef22
mov dword [ebp - 0x15c], 0
jmp 0x40ef8b
sbb eax, eax
or eax, 1
mov dword [ebp - 0x15c], eax
mov ecx, dword [ebp - 0x15c]
mov dword [ebp - 0x17c], ecx
cmp dword [ebp - 0x17c], 0
jne 0x40f032
mov dword [ebp - 0x164], 0x4505c8
push 0x5c
mov edx, dword [ebp - 0x164]
push edx
call fcn.00423220
add esp, 8
mov dword [ebp - 0x160], eax
cmp dword [ebp - 0x160], 0
je 0x40efdf
mov eax, dword [ebp - 0x160]
add eax, 1
mov dword [ebp - 0x168], eax
jmp 0x40efeb
mov ecx, dword [ebp - 0x164]
mov dword [ebp - 0x168], ecx
push str.proccess_exist__get_handle
push 0x289
mov edx, dword [ebp - 0x168]
push edx
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x10
xor eax, eax
jne 0x40efa4
mov ecx, dword [ebp - 0x124]
mov dword [ebp - 0x134], ecx
mov edx, dword [ebp - 0x134]
push edx
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
jmp 0x40f037
jmp 0x40eef1
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
jne 0x40f0c4
cmp dword [ebp - 0x134], 0
je 0x40f0c4
mov dword [ebp - 0x170], 0x450630
push 0x5c
mov eax, dword [ebp - 0x170]
push eax
call fcn.00423220
add esp, 8
mov dword [ebp - 0x16c], eax
cmp dword [ebp - 0x16c], 0
je 0x40f087
mov ecx, dword [ebp - 0x16c]
add ecx, 1
mov dword [ebp - 0x174], ecx
jmp 0x40f093
mov edx, dword [ebp - 0x170]
mov dword [ebp - 0x174], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.get_pro_handle_fail_:__d
push 0x291
mov eax, dword [ebp - 0x174]
push eax
push 1
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor ecx, ecx
jne 0x40f04c
mov dword [ebp - 0x134], 0
mov edx, dword [ebp - 0x138]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x134]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421720
mov esp, ebp
pop ebp
ret