Function at 0x401aa0
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 0x401c48
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], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401ba8
cmp ebx, 3
jg 0x401c48
cmp ebx, 2
je 0x401c68
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], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
je 0x401c32
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], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401c68
mov dword [esp], 0x67
call fcn.00401660
xor eax, eax
jmp 0x401c59
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], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401c80
cmp ebx, 3
jg 0x401f00
cmp ebx, 2
je 0x401d58
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], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401d20
mov dword [esp], 0x66
call fcn.00401660
xor eax, eax
jmp 0x401c59
mov dword [esp], 0x65
call fcn.00401660
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 fcn.00401660
xor eax, eax
jmp 0x401c59
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], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401f30
cmp ebx, 3
jne 0x401d40
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], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
je 0x401b8e
mov edx, dword [esi + 8]
mov eax, 2
call fcn.004018a0
test eax, eax
sete al
movzx eax, al
jmp 0x401c59
mov edx, dword [esi + 8]
mov eax, 1
call fcn.004018a0
test eax, eax
sete al
movzx eax, al
jmp 0x401c59
mov dword [esp], 0x67
call fcn.00401660
jmp 0x401c54
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 0x402119
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_EnumServicesStatusExW]
lea edi, [ebp - 0x34]
lea esi, [ebp - 0x38]
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 0x402100
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x50], edx
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 dword [ebp - 0x54], eax
mov edx, eax
lea eax, [ebp - 0x30]
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], esi
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x30
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0
mov dword [esp], ebx
mov eax, dword [ebp - 0x4c]
call eax
mov edx, dword [ebp - 0x50]
sub esp, 0x28
test eax, eax
je 0x402100
mov dword [esp], 0x7c
xor edi, edi
call fcn.00401660
mov ecx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x54]
test ecx, ecx
je 0x401f1b
mov dword [ebp - 0x50], ebx
jmp 0x401e9b
add edi, 1
add esi, 0x2c
cmp edi, dword [ebp - 0x34]
jae 0x401f18
mov eax, dword [esi + 4]
mov dword [esp], str._____1_n
mov dword [esp + 4], eax
call fcn.00401640
test byte [section..data], 8
je 0x401e90
mov ecx, dword [esi + 0x10]
mov eax, dword [esi]
mov ebx, dword [esi + 0xc]
mov dword [ebp - 0x4c], ecx
call fcn.00401060
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 0xc], str.service_s_state_ld_controls_lx_n
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.net_enum_services
mov dword [esp + 0x18], ecx
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call fcn.00401520
jmp 0x401e90
mov dword [esp], 0x66
call fcn.00401660
jmp 0x401c54
mov ebx, dword [ebp - 0x50]
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
xor eax, eax
sub esp, 4
jmp 0x401c59
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0x4040a4
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi + 4]
mov dword [esp + 4], 1
mov dword [esp], 0x400
mov dword [esp + 8], eax
call edi
sub esp, 0x18
cmp eax, 2
jne 0x401c68
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x40], 0
cmp ebx, 2
jne 0x401c54
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
add ebx, 1
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 0x401fa8
lea esi, [esi]
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 sub.netapi32.dll_NetUseEnum
sub esp, 0x1c
mov edi, eax
cmp eax, 0xea
je 0x402040
test eax, eax
jne 0x4020bd
mov edx, dword [ebp - 0x38]
test edx, edx
je 0x40212a
mov dword [esp], 0x74
call fcn.00401660
mov eax, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
test eax, eax
je 0x4020a2
xor esi, esi
lea 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 eax, dword [ebp + eax*4 - 0x30]
mov dword [esp], 0x75
mov dword [esp + 4], eax
call fcn.00401660
cmp esi, dword [ebp - 0x3c]
jb 0x402068
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x4020b1
mov dword [esp], ebx
call sub.netapi32.dll_NetApiBufferFree
sub esp, 4
cmp edi, 0xea
je 0x401ff8
lea esi, [ebp - 0x30]
lea edi, [ebp - 0x18]
mov ebx, dword fs:[0x18]
lea esi, [esi]
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 0x4020d0
xor eax, eax
jmp 0x401c59
mov eax, dword [edx + 0x34]
call fcn.00401420
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
sub esp, 4
jmp 0x401c54
mov dword [esp], 0x6a
call fcn.00401660
jmp 0x401c54
mov dword [esp], 0x73
call fcn.00401660
jmp 0x4020bd