Function at 0x401cb0
Capabilities:
Enumerate services

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
sub esp, 0x88
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov ebx, dword [ecx]
mov esi, dword [ecx + 4]
cmp ebx, 1
jle 0x401e90
mov eax, str.help
mov edi, 0xffffffff
mov dword [esp + 0x10], eax
mov eax, 0xffffffff
mov dword [esp + 0x14], edi
mov edi, dword [sym.imp.kernel32.dll_CompareStringW]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 4]
mov dword [esp], 0x400
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401de0
cmp ebx, 3
jg 0x401e90
cmp ebx, 2
je 0x401db5
mov eax, 0xffffffff
mov edx, 0xffffffff
mov dword [esp + 0x14], eax
mov eax, str.start
mov ecx, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov eax, dword [esi + 8]
mov dword [esp + 4], ecx
mov dword [esp], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
je 0x401f68
mov eax, str.stop
mov ebx, 0xffffffff
mov dword [esp + 0x10], eax
mov eax, 0xffffffff
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], eax
mov eax, dword [esi + 8]
mov dword [esp], 0x400
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call edi
sub esp, 0x18
cmp eax, 2
je 0x401f50
mov dword [esp], 0x65
call sym._output_string
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
lea esp, [ecx - 4]
ret
mov eax, 0xffffffff
mov edx, 0xffffffff
mov dword [esp + 0x14], eax
mov eax, str.start
mov ecx, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov eax, dword [esi + 4]
mov dword [esp + 4], ecx
mov dword [esp], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401eb0
cmp ebx, 3
jg 0x4021a0
cmp ebx, 2
je 0x402000
mov eax, 0xffffffff
mov edx, str._help
mov dword [esp + 0x14], eax
mov ecx, 0xffffffff
mov ebx, 1
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov eax, dword [esi + 8]
mov dword [esp + 4], ebx
mov dword [esp], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
je 0x401f68
mov edx, dword [esi + 8]
mov eax, 1
call sym._net_service
test eax, eax
sete al
movzx eax, al
jmp 0x401dc3
mov dword [esp], 0x65
call sym._output_string
mov eax, 1
jmp 0x401dc3
mov eax, 0xffffffff
mov dword [esp + 0x14], eax
mov eax, str.stop
mov dword [esp + 0x10], eax
mov eax, 0xffffffff
mov dword [esp + 0xc], eax
mov eax, dword [esi + 4]
mov dword [esp], 0x400
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401f80
cmp ebx, 3
jne 0x401fe8
mov eax, 0xffffffff
mov edx, 0xffffffff
mov dword [esp + 0x14], eax
mov eax, str._help
mov ecx, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov eax, dword [esi + 8]
mov dword [esp + 4], ecx
mov dword [esp], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
je 0x401f50
mov edx, dword [esi + 8]
mov eax, 2
call sym._net_service
test eax, eax
sete al
movzx eax, al
jmp 0x401dc3
mov dword [esp], 0x67
call sym._output_string
xor eax, eax
jmp 0x401dc3
mov dword [esp], 0x66
call sym._output_string
xor eax, eax
jmp 0x401dc3
mov eax, 0x40509e
mov ecx, 0xffffffff
mov dword [esp + 0x10], eax
mov eax, 0xffffffff
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], eax
mov eax, dword [esi + 4]
mov dword [esp], 0x400
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401db5
mov dword [ebp - 0x34], 0
cmp ebx, 2
mov dword [ebp - 0x40], 0
je 0x40220b
mov eax, 1
jmp 0x401dc3
mov dword [esp], 0x67
call sym._output_string
mov eax, 1
jmp 0x401dc3
mov dword [esp], 0
mov eax, 0xf003f
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
call sym._OpenSCManagerW_12
sub esp, 0xc
test eax, eax
mov ebx, eax
je 0x4021f5
xor eax, eax
mov edx, 1
mov dword [esp + 0x24], eax
xor eax, eax
mov ecx, 0x30
mov dword [esp + 0x20], eax
lea edi, [ebp - 0x34]
xor eax, eax
mov dword [esp + 0x14], eax
lea esi, [ebp - 0x38]
xor eax, eax
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], edx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], esi
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._EnumServicesStatusExW_40
mov edx, dword fs:[0x18]
sub esp, 0x28
cmp dword [edx + 0x34], 0xea
jne 0x4021c0
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
xor ecx, ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x50], eax
sub esp, 0xc
mov edx, eax
mov dword [esp + 0x1c], edi
lea eax, [ebp - 0x30]
mov edi, 0x30
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x18], esi
mov esi, 1
mov dword [esp + 0x10], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._EnumServicesStatusExW_40
mov edx, dword [ebp - 0x4c]
sub esp, 0x28
test eax, eax
je 0x4021c0
mov dword [esp], 0x7c
xor edi, edi
call sym._output_string
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x50]
test eax, eax
je 0x4021e3
mov dword [ebp - 0x50], ebx
jmp 0x402135
inc edi
add esi, 0x2c
cmp edi, dword [ebp - 0x34]
jae 0x4021e0
mov eax, dword [esi + 4]
mov dword [esp], str._____1_n
mov dword [esp + 4], eax
call sym._output_printf.constprop.0
test byte [section..data], 8
je 0x402128
mov ecx, dword [esi + 0x10]
mov eax, dword [esi]
mov ebx, dword [esi + 0xc]
mov dword [ebp - 0x4c], ecx
call sym._wine_dbgstr_wn.constprop.0
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 0x14], ebx
mov dword [esp], 3
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
mov eax, str.service_s_state_d_controls_x_n
mov dword [esp + 0xc], eax
mov eax, str.net_enum_services
mov dword [esp + 8], eax
mov eax, section..data
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0
jmp 0x402128
mov dword [esp], 0x66
call sym._output_string
mov eax, 1
jmp 0x401dc3
mov eax, dword [edx + 0x34]
call sym._output_error_string
mov dword [esp], ebx
call sym._CloseServiceHandle_4
mov eax, 1
sub esp, 4
jmp 0x401dc3
mov ebx, dword [ebp - 0x50]
mov dword [esp], ebx
call sym._CloseServiceHandle_4
xor eax, eax
sub esp, 4
jmp 0x401dc3
mov dword [esp], 0x6a
call sym._output_string
mov eax, 1
jmp 0x401dc3
mov dword [esp], 0
mov ebx, 0x76
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov edi, dword fs:[0x18]
sub esp, 4
mov esi, eax
lea esi, [esi]
mov eax, 0x800
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, 0x400
mov dword [ebp + ebx*4 - 0x208], eax
sub esp, 0xc
mov dword [esp + 4], ebx
inc ebx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp], esi
call sym._LoadStringW_16
sub esp, 0x10
cmp ebx, 0x7c
jne 0x402230
lea esi, [esi]
lea eax, [ebp - 0x34]
mov ebx, 0x800
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x38]
mov esi, 2
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x40]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], 0
call sym._NetUseEnum_28
sub esp, 0x1c
cmp eax, 0xea
mov edi, eax
je 0x4022ca
test eax, eax
jne 0x402343
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x40238b
mov dword [esp], 0x74
call sym._output_string
mov edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
test edx, edx
je 0x402328
xor esi, esi
lea esi, [esi]
mov eax, dword [ebx + 0x14]
inc esi
add ebx, 0x24
mov dword [esp + 0x10], eax
mov eax, dword [ebx - 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [ebx - 0x24]
mov dword [esp + 8], eax
mov eax, dword [ebx - 0x18]
mov dword [esp], 0x75
mov eax, dword [ebp + eax*4 - 0x30]
mov dword [esp + 4], eax
call sym._output_string
cmp esi, dword [ebp - 0x3c]
jb 0x4022f0
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x402337
mov dword [esp], ebx
call sym._NetApiBufferFree_4
sub esp, 4
cmp edi, 0xea
je 0x402280
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
lea ebx, [ebp - 0x30]
mov edi, dword fs:[0x18]
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebx]
add ebx, 4
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
lea eax, [ebp - 0x18]
sub esp, 0xc
cmp eax, ebx
jne 0x402360
xor eax, eax
jmp 0x401dc3
mov dword [esp], 0x73
call sym._output_string
jmp 0x402343