Function at 0x40aec0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
sub esp, 0x220
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x10], ecx
call fcn.004318b0
mov ebx, dword [esp + 0x234]
test eax, eax
je 0x40af6b
push ebx
lea eax, [esp + 0x134]
push str.CUninstall_::_DeleteTheService_:_lpszServiceName___s_n
push eax
call fcn.0044cb10
mov edi, str.ENTRY:
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x30]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x130]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00431840
mov ecx, eax
call fcn.004318e0
lea eax, [esp + 0x30]
push eax
call fcn.00431840
mov ecx, eax
call fcn.00431c70
xor ebp, ebp
push 0xf003f
push str.ServicesActive
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40b066
push 0xf01ff
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x40b063
lea ecx, [esp + 0x14]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40b060
cmp dword [esp + 0x18], 4
jne 0x40b046
lea edx, [esp + 0x14]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40b017
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x40afe8
mov ebp, 1
jmp 0x40b060
call fcn.004318b0
test eax, eax
je 0x40b002
push str.FAILED_to_stop_service____Setting_for_Reboot_n
call fcn.00431840
mov ecx, eax
call fcn.00431c70
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0xb8]
mov ecx, dword [eax + 0x4c]
or ch, 2
mov dword [eax + 0x4c], ecx
jmp 0x40b060
call fcn.004318b0
test eax, eax
je 0x40b031
push str.FAILED_to_stop_service____Setting_for_Reboot_n
call fcn.00431840
mov ecx, eax
call fcn.00431c70
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0xb8]
mov ecx, dword [eax + 0x4c]
or ch, 2
mov dword [eax + 0x4c], ecx
jmp 0x40b060
call fcn.004318b0
test eax, eax
je 0x40b060
push str.FAILED_ControlService_:_Service_Not_Running_n
call fcn.00431840
mov ecx, eax
call fcn.00431c70
push esi
call ebx
push edi
call ebx
call fcn.004318b0
test eax, eax
je 0x40b0fc
push ebp
lea edx, [esp + 0x134]
push str.CUninstall_::_DeleteTheService_:_bRetVal___d_n
push edx
call fcn.0044cb10
mov edi, str.EXIT:
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x30]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x130]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x30]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00431840
mov ecx, eax
call fcn.00431c70
call fcn.00431840
mov ecx, eax
call fcn.004318f0
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x220
ret 4