Function at 0x403174
Capabilities:
Delete service
Enumerate services
Query service configuration

Disassembly:
push ebp
xor ecx, ecx
xor eax, eax
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x118]
push ebx
lea ebx, [ebp - 0x11c]
sub esp, 0x15c
mov dword [ebp - 0x128], ecx
mov dword [ebp - 0x124], ecx
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x11c], ecx
mov ecx, 0x40
rep stosd dword es:[edi], eax
mov eax, dword [0x40f054]
mov dword [esp], ebx
mov dword [esp + 4], str._s_
mov dword [esp + 8], eax
call fcn.00402cd8
mov dword [esp], ebx
xor ebx, ebx
call dword [sym.imp.msvcrt.dll__strlwr]
mov dword [ebp - 0x138], eax
mov dword [esp + 8], 4
mov dword [esp + 4], ebx
mov dword [esp], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x12c], eax
sub esp, 0xc
test eax, eax
je 0x40344a
xor esi, esi
xor ebx, ebx
lea eax, [ebp - 0x120]
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x124]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x128]
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 3
mov dword [esp + 4], 0x30
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusA]
mov edi, eax
sub esp, 0x20
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 1
je 0x4032a5
test edi, edi
sete cl
cmp eax, 0xea
setne dl
test cl, dl
je 0x403272
cmp eax, 0x7a
jne 0x40342e
add esi, dword [ebp - 0x128]
mov edi, esi
test ebx, ebx
je 0x403286
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov dword [esp + 4], 1
mov dword [esp], edi
call sub.msvcrt.dll_calloc
mov ebx, eax
test eax, eax
jne 0x403203
jmp 0x40343a
xor edx, edx
mov dword [ebp - 0x130], edx
mov eax, dword [ebp - 0x130]
cmp eax, dword [ebp - 0x124]
jae 0x40342e
xor edx, edx
mov dword [ebp - 0x128], edx
mov dword [esp + 8], 0x10001
imul eax, dword [ebp - 0x130], 0x24
mov eax, dword [ebx + eax]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x403423
lea eax, [ebp - 0x128]
mov dword [esp], edi
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov eax, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
mov dword [ebp - 0x134], eax
call eax
sub esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x40333a
mov dword [esp], edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
jmp 0x403423
mov edx, dword [ebp - 0x128]
mov dword [esp + 4], 1
mov dword [esp], edx
mov dword [ebp - 0x13c], edx
call sub.msvcrt.dll_calloc
mov esi, eax
lea eax, [ebp - 0x128]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x13c]
mov dword [esp + 4], esi
mov dword [esp + 8], edx
mov dword [esp], edi
mov eax, dword [ebp - 0x134]
call eax
sub esp, 0x10
test eax, eax
jne 0x403395
mov dword [esp], edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
test esi, esi
jne 0x4033ae
jmp 0x403423
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__strdup
test eax, eax
jne 0x4033b3
mov dword [esp], edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
mov dword [esp], esi
jmp 0x40341e
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__strlwr]
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x138]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x134]
mov dword [esp], eax
call sub.msvcrt.dll_strstr
test eax, eax
je 0x403403
mov eax, dword [0x40f050]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x134]
mov dword [esp], eax
call sub.msvcrt.dll_strstr
test eax, eax
jne 0x403403
mov dword [esp], edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push eax
mov dword [esp], edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ecx
mov dword [esp], esi
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x134]
mov dword [esp], eax
call sub.msvcrt.dll_free
inc dword [ebp - 0x130]
jmp 0x4032ad
test ebx, ebx
je 0x40343a
mov dword [esp], ebx
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x12c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret