Function at 0x402930
Capabilities:
Enumerate services

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x78
mov ebx, dword [ecx]
mov esi, dword [ecx + 4]
cmp ebx, 1
jle 0x402ae0
mov dword [esp + 0x14], 0xffffffff
mov edi, dword [sym.imp.kernel32.dll_CompareStringW]
mov dword [esp + 0x10], str.help
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call edi
sub esp, 0x18
cmp eax, 2
jne 0x402a38
cmp ebx, 3
jg 0x402ae0
cmp ebx, 2
je 0x402b00
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str.start
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call edi
sub esp, 0x18
cmp eax, 2
je 0x402ac2
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str.stop
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call edi
sub esp, 0x18
cmp eax, 2
jne 0x402b00
mov dword [esp], 0x67
call sym._output_string
xor eax, eax
jmp 0x402af1
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str.start
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call edi
sub esp, 0x18
cmp eax, 2
jne 0x402b20
cmp ebx, 3
jg 0x402db0
cmp ebx, 2
je 0x402c00
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str._help
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call edi
sub esp, 0x18
cmp eax, 2
jne 0x402bc0
mov dword [esp], 0x66
call sym._output_string
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], 0x65
call sym._output_string
mov eax, 1
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], 0x65
call sym._output_string
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str.stop
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call edi
sub esp, 0x18
cmp eax, 2
jne 0x402dd0
cmp ebx, 3
jne 0x402be0
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str._help
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call edi
sub esp, 0x18
cmp eax, 2
je 0x402a1e
mov edx, dword [esi + 8]
mov eax, 2
call sym._net_service
test eax, eax
sete al
movzx eax, al
jmp 0x402af1
mov edx, dword [esi + 8]
mov eax, 1
call sym._net_service
test eax, eax
sete al
movzx eax, al
jmp 0x402af1
mov dword [esp], 0x67
call sym._output_string
mov eax, 1
jmp 0x402af1
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.advapi32.dll_OpenSCManagerW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x402e66
mov dword [esp], eax
lea edi, [ebp - 0x34]
lea esi, [ebp - 0x38]
mov eax, dword [sym.imp.advapi32.dll_EnumServicesStatusExW]
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x30
mov dword [esp + 4], 0
mov dword [ebp - 0x4c], eax
call eax
sub esp, 0x28
mov edx, dword fs:[0x18]
cmp dword [edx + 0x34], 0xea
jne 0x402e30
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], 0
mov dword [ebp - 0x50], edx
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x30], 0
sub esp, 0xc
mov edx, eax
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x30]
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], esi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x30
mov dword [esp + 4], 0
mov dword [esp], ebx
call eax
mov edx, dword [ebp - 0x50]
sub esp, 0x28
test eax, eax
je 0x402e30
mov dword [esp], 0x7c
xor edi, edi
call sym._output_string
mov ecx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x54]
test ecx, ecx
je 0x402e53
mov dword [ebp - 0x50], ebx
jmp 0x402d45
inc edi
add esi, 0x2c
cmp edi, dword [ebp - 0x34]
jae 0x402e50
mov eax, dword [esi + 4]
mov dword [esp], str._____1_n
mov dword [esp + 4], eax
call sym._output_printf.constprop.0
test byte [0x404010], 8
je 0x402d38
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 + 0x10], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], str.service_s_state_ld_controls_lx_n
mov dword [esp + 8], str.net_enum_services
mov dword [esp + 4], 0x404010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402d38
mov dword [esp], 0x66
call sym._output_string
mov eax, 1
jmp 0x402af1
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x4050a4
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call edi
sub esp, 0x18
cmp eax, 2
jne 0x402b00
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x40], 0
cmp ebx, 2
je 0x402e7c
mov eax, 1
jmp 0x402af1
mov eax, dword [edx + 0x34]
call sym._output_error_string
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov eax, 1
sub esp, 4
jmp 0x402af1
mov ebx, dword [ebp - 0x50]
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
xor eax, eax
sub esp, 4
jmp 0x402af1
mov dword [esp], 0x6a
call sym._output_string
mov eax, 1
jmp 0x402af1
mov dword [esp], 0
mov ebx, 0x76
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov esi, eax
mov edi, dword fs:[0x18]
lea esi, [esi]
mov dword [esp + 8], 0x800
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov dword [ebp + ebx*4 - 0x208], eax
mov dword [esp + 4], ebx
inc ebx
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
cmp ebx, 0x7c
jne 0x402ea0
lea esi, [esi]
nop
lea eax, [ebp - 0x34]
mov dword [esp + 0xc], 0x800
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x38]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
mov dword [esp], 0
call sym._NetUseEnum_28
sub esp, 0x1c
mov edi, eax
cmp eax, 0xea
je 0x402f38
test eax, eax
jne 0x402fb3
mov edx, dword [ebp - 0x38]
test edx, edx
je 0x402fee
mov dword [esp], 0x74
call sym._output_string
mov eax, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
test eax, eax
je 0x402f98
xor esi, esi
lea esi, [esi]
nop
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 0x402f60
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x402fa7
mov dword [esp], ebx
call sym._NetApiBufferFree_4
sub esp, 4
cmp edi, 0xea
je 0x402ef0
lea esi, [ebp - 0x30]
lea edi, [ebp - 0x18]
mov ebx, dword fs:[0x18]
mov eax, dword [esi]
mov dword [esp + 4], 0
add esi, 4
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
cmp edi, esi
jne 0x402fc0
xor eax, eax
jmp 0x402af1
mov dword [esp], 0x73
call sym._output_string
jmp 0x402fb3