Function at 0x402920
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 0x402ba0
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
jmp 0x402981
mov dword [ebp - 0x3c], 1
mov eax, ebx
sub eax, dword [ebp - 0x38]
mov dword [esp], esi
dec ebx
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]
jle 0x402a98
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 0x402950
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 0x402950
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 0x402950
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
jne 0x402cd0
mov dword [ebp - 0x40], 1
jmp 0x402957
mov esi, dword [ebp - 0x3c]
and esi, dword [ebp - 0x40]
jne 0x402bc0
cmp ebx, 1
je 0x402ba0
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 0x402be0
cmp ebx, 3
jg 0x402ba0
cmp ebx, 2
je 0x402cb0
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 0x402c98
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
jne 0x402cb0
mov dword [esp], 0x67
call sym._output_string
jmp 0x402bb1
mov dword [esp], 0x65
mov esi, 1
call sym._output_string
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x7d
call sym._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.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 0x402d17
cmp ebx, 3
jg 0x402f7c
cmp ebx, 2
je 0x402dd9
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 0x402c98
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov eax, 1
call sym._net_service
test eax, eax
sete al
movzx eax, al
mov esi, eax
jmp 0x402bb1
mov dword [esp], 0x66
call sym._output_string
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x65
call sym._output_string
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
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
je 0x402a88
inc dword [ebp - 0x38]
jmp 0x402978
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 0x402d75
cmp ebx, 3
je 0x402f92
mov dword [esp], 0x67
mov esi, 1
call sym._output_string
jmp 0x402bb1
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 0x402cb0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 0
cmp ebx, 2
je 0x403034
mov esi, 1
jmp 0x402bb1
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.advapi32.dll_OpenSCManagerW]
mov dword [ebp - 0x38], eax
sub esp, 0xc
test eax, eax
je 0x40301e
mov eax, dword [ebp - 0x38]
lea edi, [ebp - 0x28]
lea ebx, [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], edi
mov dword [esp + 0x18], ebx
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 0x402feb
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 ecx, 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], edi
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x30
mov dword [esp + 4], 0
call eax
sub esp, 0x28
test eax, eax
je 0x402fe5
mov dword [esp], 0x7c
xor edi, edi
call sym._output_string
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x40]
test ecx, ecx
je 0x40300a
mov dword [ebp - 0x40], esi
jmp 0x402f1b
inc edi
add ebx, 0x2c
cmp edi, dword [ebp - 0x28]
jae 0x403007
mov eax, dword [ebx + 4]
mov dword [esp], str._____1_n
mov dword [esp + 4], eax
call sym._output_printf.constprop.0
test byte [0x404010], 8
je 0x402f0e
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.0
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], 0x404010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402f0e
mov dword [esp], 0x66
mov esi, 1
call sym._output_string
jmp 0x402bb1
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 0x402b88
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov eax, 2
jmp 0x402c7f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
call sym._output_error_string
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
sub esp, 4
jmp 0x402dcf
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 0x402bb1
mov dword [esp], 0x6a
mov esi, 1
call sym._output_string
jmp 0x402bb1
mov dword [esp], 0
mov ebx, 0x76
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov dword [ebp - 0x38], eax
sub esp, 4
mov edi, dword fs:[0x18]
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 - 0x1fc], eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], ebx
inc ebx
mov dword [esp + 0xc], 0x400
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
cmp ebx, 0x7c
jne 0x403053
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 0x4030ec
test eax, eax
jne 0x403163
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x40319f
mov dword [esp], 0x74
call sym._output_string
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x34]
test eax, eax
je 0x403148
xor 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 - 0x24]
mov dword [esp + 4], eax
call sym._output_string
cmp esi, dword [ebp - 0x30]
jb 0x403110
mov ebx, dword [ebp - 0x34]
test ebx, ebx
je 0x403157
mov dword [esp], ebx
call sym._NetApiBufferFree_4
sub esp, 4
cmp edi, 0xea
je 0x4030a4
mov esi, dword [ebp - 0x38]
lea ebx, [ebp - 0x24]
mov edi, dword fs:[0x18]
mov eax, dword [ebx]
mov dword [esp + 4], 0
add ebx, 4
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
lea ecx, [ebp - 0xc]
sub esp, 0xc
cmp ebx, ecx
jne 0x403170
jmp 0x402bb1
mov dword [esp], 0x73
mov esi, dword [ebp - 0x38]
call sym._output_string
jmp 0x403166