Function at 0x401a70
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 0x401c18
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 0x401b78
cmp ebx, 3
jg 0x401c18
cmp ebx, 2
je 0x401c38
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 0x401c02
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 0x401c38
mov dword [esp], 0x67
call fcn.00401630
xor eax, eax
jmp 0x401c29
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 0x401c50
cmp ebx, 3
jg 0x401ed0
cmp ebx, 2
je 0x401d28
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 0x401cf0
mov dword [esp], 0x66
call fcn.00401630
xor eax, eax
jmp 0x401c29
mov dword [esp], 0x65
call fcn.00401630
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.00401630
xor eax, eax
jmp 0x401c29
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 0x401f00
cmp ebx, 3
jne 0x401d10
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 0x401b5e
mov edx, dword [esi + 8]
mov eax, 2
call fcn.00401860
test eax, eax
sete al
movzx eax, al
jmp 0x401c29
mov edx, dword [esi + 8]
mov eax, 1
call fcn.00401860
test eax, eax
sete al
movzx eax, al
jmp 0x401c29
mov dword [esp], 0x67
call fcn.00401630
jmp 0x401c24
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.advapi32.dll_OpenSCManagerW
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x4020e8
lea edi, [ebp - 0x34]
mov dword [esp + 0x24], 0
lea esi, [ebp - 0x38]
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 [esp], eax
call sub.advapi32.dll_EnumServicesStatusExW
sub esp, 0x28
mov edx, dword fs:[0x18]
cmp dword [edx + 0x34], 0xea
jne 0x4020d0
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x4c], 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 - 0x50], 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
call sub.advapi32.dll_EnumServicesStatusExW
mov edx, dword [ebp - 0x4c]
sub esp, 0x28
test eax, eax
je 0x4020d0
mov dword [esp], 0x7c
xor edi, edi
call fcn.00401630
mov ecx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x50]
test ecx, ecx
je 0x401eeb
mov dword [ebp - 0x50], ebx
jmp 0x401e6b
add edi, 1
add esi, 0x2c
cmp edi, dword [ebp - 0x34]
jae 0x401ee8
mov eax, dword [esi + 4]
mov dword [esp], str._____1_n
mov dword [esp + 4], eax
call fcn.00401610
test byte [section..data], 8
je 0x401e60
mov ecx, dword [esi + 0x10]
mov eax, dword [esi]
mov ebx, dword [esi + 0xc]
mov dword [ebp - 0x4c], ecx
call fcn.00401300
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 section..text
jmp 0x401e60
mov dword [esp], 0x66
call fcn.00401630
jmp 0x401c24
mov ebx, dword [ebp - 0x50]
mov dword [esp], ebx
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
sub esp, 4
jmp 0x401c29
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 0x401c38
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x40], 0
cmp ebx, 2
jne 0x401c24
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 sub.user32.dll_LoadStringW
sub esp, 0x10
cmp ebx, 0x7c
jne 0x401f78
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 0x402010
test eax, eax
jne 0x40208d
mov edx, dword [ebp - 0x38]
test edx, edx
je 0x4020f9
mov dword [esp], 0x74
call fcn.00401630
mov eax, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
test eax, eax
je 0x402072
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.00401630
cmp esi, dword [ebp - 0x3c]
jb 0x402038
mov ebx, dword [ebp - 0x40]
test ebx, ebx
je 0x402081
mov dword [esp], ebx
call sub.netapi32.dll_NetApiBufferFree
sub esp, 4
cmp edi, 0xea
je 0x401fc8
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 0x4020a0
xor eax, eax
jmp 0x401c29
mov eax, dword [edx + 0x34]
call fcn.00401200
mov dword [esp], ebx
call sub.advapi32.dll_CloseServiceHandle
sub esp, 4
jmp 0x401c24
mov dword [esp], 0x6a
call fcn.00401630
jmp 0x401c24
mov dword [esp], 0x73
call fcn.00401630
jmp 0x40208d