Function at 0x401c60
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [ebp + 8]
cmp ebx, 1
jle 0x401fe4
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
lea esi, [esi]
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x405052
lea edi, [eax*4]
mov dword [esp + 0xc], 0xffffffff
add esi, edi
mov eax, dword [esi]
mov dword [esp + 4], 1
mov dword [esp], 0x400
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x401f12
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x405058
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x401f12
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x405060
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x401f12
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x40506a
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x401dd6
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x405070
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
jne 0x401f20
mov dword [ebp - 0x40], 1
lea esi, [esi]
mov eax, ebx
sub eax, dword [ebp - 0x38]
mov dword [esp], esi
sub ebx, 1
shl eax, 2
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
lea eax, [eax + edi + 4]
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_memmove]
cmp ebx, dword [ebp - 0x38]
jg 0x401c90
mov esi, dword [ebp - 0x3c]
and esi, dword [ebp - 0x40]
jne 0x402000
cmp ebx, 1
je 0x401fe4
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x405078
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
jne 0x401f30
cmp ebx, 3
jg 0x401fe4
cmp ebx, 2
je 0x401efc
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str.start
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x4020bb
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str.stop
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x402146
mov dword [esp], 0x65
call dbg.output_string
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x3c], 1
jmp 0x401de0
add dword [ebp - 0x38], 1
jmp 0x401e03
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str.start
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
jne 0x402020
cmp ebx, 3
jg 0x4022fc
cmp ebx, 2
je 0x402157
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str._help
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x4020bb
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov eax, 1
call dbg.net_service
test eax, eax
sete al
movzx eax, al
mov esi, eax
jmp 0x401ff5
mov dword [esp], 0x65
mov esi, 1
call dbg.output_string
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x7d
call dbg.output_string
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str.stop
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
jne 0x4020cc
cmp ebx, 3
jne 0x402130
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], str._help
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x402146
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov eax, 2
jmp 0x401fd3
mov dword [esp], 0x66
call dbg.output_string
jmp 0x401ff5
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x4050c8
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [eax + 4]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
jne 0x401efc
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 0
cmp ebx, 2
je 0x402361
mov esi, 1
jmp 0x401ff5
mov dword [esp], 0x67
mov esi, 1
call dbg.output_string
jmp 0x401ff5
mov dword [esp], 0x67
call dbg.output_string
jmp 0x401ff5
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 dword [ebp - 0x38], eax
test eax, eax
je 0x40234b
mov eax, dword [ebp - 0x38]
lea ebx, [ebp - 0x28]
lea edi, [ebp - 0x2c]
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_EnumServicesStatusExW]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
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 - 0x3c], eax
call eax
sub esp, 0x28
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xea
jne 0x402318
mov edx, dword [ebp - 0x2c]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x24], 0
sub esp, 0xc
mov edx, eax
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x24], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x1c], ebx
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x30
mov dword [esp + 4], 0
call eax
sub esp, 0x28
test eax, eax
je 0x402312
mov dword [esp], 0x7c
xor edi, edi
call dbg.output_string
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x40]
test ecx, ecx
je 0x402337
mov dword [ebp - 0x40], esi
jmp 0x40229b
add edi, 1
add ebx, 0x2c
cmp edi, dword [ebp - 0x28]
jae 0x402334
mov eax, dword [ebx + 4]
mov dword [esp], str._____1_n
mov dword [esp + 4], eax
call sym._output_printf.constprop.2
test byte [section..data], 8
je 0x40228c
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx]
mov esi, dword [ebx + 0xc]
mov dword [ebp - 0x3c], ecx
call sym._wine_dbgstr_wn.constprop.5
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 0x14], esi
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], 0x403000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.3
jmp 0x40228c
mov dword [esp], 0x66
mov esi, 1
call dbg.output_string
jmp 0x401ff5
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
call dbg.output_error_string
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
sub esp, 4
jmp 0x402126
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
sub esp, 4
jmp 0x401ff5
mov dword [esp], 0x6a
mov esi, 1
call dbg.output_string
jmp 0x401ff5
mov dword [esp], 0
mov edi, 0x76
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov dword [ebp - 0x38], eax
sub esp, 4
mov ebx, dword fs:[0x18]
mov dword [esp + 8], 0x800
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov dword [ebp + edi*4 - 0x1fc], eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], edi
add edi, 1
mov dword [esp + 0xc], 0x400
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
cmp edi, 0x7c
jne 0x402380
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x28]
mov dword [esp + 0xc], 0x800
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x30]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x34]
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 0x40241b
test eax, eax
jne 0x402495
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x4024d1
mov dword [esp], 0x74
call dbg.output_string
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x34]
test eax, eax
je 0x40247a
xor esi, esi
nop
mov eax, dword [ebx + 0x14]
add esi, 1
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 - 0x24]
mov dword [esp + 4], eax
call dbg.output_string
cmp esi, dword [ebp - 0x30]
jb 0x402440
mov ebx, dword [ebp - 0x34]
test ebx, ebx
je 0x402489
mov dword [esp], ebx
call sym._NetApiBufferFree_4
sub esp, 4
cmp edi, 0xea
je 0x4023d3
mov esi, dword [ebp - 0x38]
lea edi, [ebp - 0x24]
mov ebx, dword fs:[0x18]
mov eax, dword [edi]
mov dword [esp + 4], 0
add edi, 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]
lea eax, [ebp - 0xc]
sub esp, 0xc
cmp eax, edi
jne 0x4024a2
jmp 0x401ff5
mov dword [esp], 0x73
mov esi, dword [ebp - 0x38]
call dbg.output_string
jmp 0x402498