Function at 0x4015b0
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x144
mov dword [ebp - 0x138], 0
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x20]
test byte [section..data], 8
jne 0x401728
mov dword [esp + 4], 0
mov dword [esp], 2
call sub.kernel32.dll_CreateToolhelp32Snapshot
sub esp, 8
mov ebx, eax
cmp eax, 0xffffffff
je 0x401758
mov dword [ebp - 0x134], 0x128
lea edi, [ebp - 0x134]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.kernel32.dll_Process32First
sub esp, 8
test eax, eax
jne 0x401647
jmp 0x4016f0
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.kernel32.dll_Process32Next
sub esp, 8
test eax, eax
je 0x4016f0
cmp esi, dword [ebp - 0x12c]
jne 0x401630
mov eax, dword [ebp - 0x11c]
mov dword [esp + 4], 0
mov dword [esp], 0x100000
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_OpenProcess]
sub esp, 0xc
mov dword [ebp - 0x138], eax
test eax, eax
je 0x4017e0
lea eax, [ebp - 0x138]
mov dword [esp + 0x10], 0x1cff
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 1
call dword [sym.imp.user32.dll_MsgWaitForMultipleObjects]
sub esp, 0x14
test eax, eax
jne 0x401788
lea esi, [esi]
mov eax, dword [ebp - 0x138]
test eax, eax
je 0x4016d6
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
test ebx, ebx
jne 0x40176f
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [section..data], 4
je 0x4016c0
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.Unable_to_find_current_process_id__ld_when_listing_processes_n
mov dword [esp + 8], str.WaitForParentProcess
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401550
jmp 0x4016c0
mov dword [esp + 0xc], str.Waiting_for_parent_process_n
mov dword [esp + 8], str.WaitForParentProcess
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x4015dc
test byte [section..data], 2
jne 0x401830
mov eax, dword [ebp - 0x138]
test eax, eax
jne 0x4017d0
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], ebx
call esi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [section..data], 2
je 0x4016c0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.Unable_to_wait_for_parent_process__error__ld_n
mov dword [esp + 8], str.WaitForParentProcess
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401550
jmp 0x4016c0
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], eax
call esi
sub esp, 4
jmp 0x401775
test byte [section..data], 4
je 0x4016d6
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x11c]
mov dword [esp + 0xc], str.OpenProcess_failed_pid_ld__error__ld_n
mov dword [esp + 8], str.WaitForParentProcess
mov dword [esp + 4], 0x40c000
mov dword [esp + 0x10], eax
mov dword [esp], 2
call fcn.00401550
jmp 0x4016c0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.CreateToolhelp32Snapshot_failed__error__ld_n
mov dword [esp + 8], str.WaitForParentProcess
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401550
mov eax, dword [ebp - 0x138]
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
je 0x401775
mov dword [esp], eax
call esi
sub esp, 4
jmp 0x401775