Function at 0x401270
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
mov eax, dword [0x409008]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push esi
push edi
mov ecx, str.Verificar_si_el_servicio_est_instalado
call fcn.00401c20
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
push 0xf003f
push 0
push 0
call ebx
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
je 0x4012ff
push 4
push str.S1169
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x4012fc
push eax
call esi
push edi
call esi
push 0x403cb0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Servicio_ya_instalado.
call fcn.00403a90
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, str.Servicio_ya_instalado.
call fcn.00401c20
jmp 0x401447
push edi
call esi
push 0x403cb0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Servicio_no_instalado._Instalando_servicio...
call fcn.00403a90
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, str.Servicio_no_instalado._Instalando_servicio...
call fcn.00401c20
push 2
push 0
push 0
call ebx
mov ebx, eax
test ebx, ebx
jne 0x401369
push 0x403cb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.OpenSCManager_ha_fallado_con_el_error
push eax
call fcn.00403a90
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x401447
push 0x104
lea eax, [esp + 0x24]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x401391
push 0x403cb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.GetModuleFileName_ha_fallado_con_el_error
jmp 0x4013d2
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x34]
push eax
push 1
push 2
push 0x10
push 0xf01ff
push str.S1169
push str.S1169
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x4013f0
push 0x403cb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.CreateService_ha_fallado_con_el_error
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push eax
call fcn.00403a90
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x401444
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push 0x403cb0
test eax, eax
je 0x40141a
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Servicio_instalado_y_arrancado_con_xito
call fcn.00403a90
add esp, 4
jmp 0x401439
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.StartService_ha_fallado_con_el_error
push eax
call fcn.00403a90
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push edi
call esi
push ebx
call esi
lea eax, [esp + 0x10]
mov dword [esp + 0x10], str.Diputacion_de_Almeria
push eax
mov dword [esp + 0x18], 0x401490
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
mov ecx, dword [esp + 0x22c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00404268
mov esp, ebp
pop ebp
ret