Function at 0x401740
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov eax, dword fs:[0x18]
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x15c
mov esi, dword [eax + 0x20]
mov dword [ebp - 0x144], 0
test byte [0x40c000], 8
jne 0x4018b8
mov dword [esp + 4], 0
mov dword [esp], 2
call sym._CreateToolhelp32Snapshot_8
sub esp, 8
mov ebx, eax
cmp eax, 0xffffffff
je 0x4018e8
mov dword [ebp - 0x140], 0x128
lea edi, [ebp - 0x140]
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._Process32First_8
sub esp, 8
test eax, eax
jne 0x4017d7
jmp 0x401880
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._Process32Next_8
sub esp, 8
test eax, eax
je 0x401880
cmp esi, dword [ebp - 0x138]
jne 0x4017c0
mov eax, dword [ebp - 0x128]
mov dword [esp + 4], 0
mov dword [esp], 0x100000
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_OpenProcess]
mov dword [ebp - 0x144], eax
sub esp, 0xc
test eax, eax
je 0x401978
lea eax, [ebp - 0x144]
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 sym._MsgWaitForMultipleObjects_20
sub esp, 0x14
test eax, eax
jne 0x401930
lea esi, [esi]
nop
mov eax, dword [ebp - 0x144]
test eax, eax
je 0x401866
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
test ebx, ebx
jne 0x401910
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x40c000], 4
je 0x401850
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], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401850
mov dword [esp + 0xc], str.Waiting_for_parent_process_n
mov dword [esp + 8], str.WaitForParentProcess
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40176c
test byte [0x40c000], 2
jne 0x4019c8
mov eax, dword [ebp - 0x144]
test eax, eax
je 0x401910
mov dword [esp], eax
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
sub esp, 4
jmp 0x401916
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 [0x40c000], 2
je 0x401850
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 + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x401850
test byte [0x40c000], 4
je 0x401866
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x128]
mov dword [esp + 0xc], str.OpenProcess_failed_pid_ld__error__ld_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.WaitForParentProcess
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x401850
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 + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov eax, dword [ebp - 0x144]
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
test eax, eax
je 0x401916
mov dword [esp], eax
call esi
sub esp, 4
jmp 0x401916