Function at 0x4044f0
Capabilities:
Create service
Delete service
Persist via windows service

Disassembly:
push 0xffffffffffffffff
push 0x406aa7
mov eax, dword fs:[0]
push eax
sub esp, 0x110
push ebx
push ebp
push esi
push edi
mov eax, dword [0x40b424]
xor eax, esp
push eax
lea eax, [esp + 0x124]
mov dword fs:[0], eax
push 0x54a
push str..loginService.cpp
lea ecx, [esp + 0x1c]
call fcn.00405530
mov esi, dword [esp + 0x138]
mov ecx, dword [esp + 0x134]
push esi
push str.:__Service_Name_:
push ecx
add eax, 4
push str.InstallService:
push eax
mov dword [esp + 0x140], 0
call fcn.004014d0
add esp, 8
push eax
call fcn.004054d0
add esp, 8
push eax
call fcn.004014d0
add esp, 8
push eax
call fcn.004054d0
or ebp, 0xffffffff
add esp, 8
lea ecx, [esp + 0x14]
mov dword [esp + 0x12c], ebp
call fcn.00405740
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x4045f6
push 0x54d
push str..loginService.cpp
lea ecx, [esp + 0x1c]
call fcn.00405530
mov esi, eax
mov dword [esp + 0x12c], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed__error_code_
add esi, 4
push esi
call fcn.004014d0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.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_]
lea ecx, [esp + 0x14]
mov dword [esp + 0x12c], ebp
call fcn.00405740
jmp 0x404764
push 0xf01ff
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x4046d5
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
lea ecx, [esp + 0x14]
test eax, eax
je 0x404663
push 0x555
push str..loginService.cpp
call fcn.00405530
push esi
add eax, 4
push str.Successful_delete_exist_service:
push eax
mov dword [esp + 0x138], 2
call fcn.004014d0
add esp, 8
push eax
call fcn.004054d0
add esp, 8
lea ecx, [esp + 0x14]
mov dword [esp + 0x12c], ebp
call fcn.00405740
jmp 0x4046ce
push 0x556
push str..loginService.cpp
call fcn.00405530
mov ebp, eax
mov dword [esp + 0x12c], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed__error_code_
push esi
push str.Delete_exist_service:
add ebp, 4
push ebp
call fcn.004014d0
add esp, 8
push eax
call fcn.004054d0
add esp, 8
push eax
call fcn.004014d0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.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_]
lea ecx, [esp + 0x14]
mov dword [esp + 0x12c], 0xffffffff
call fcn.00405740
or ebp, 0xffffffff
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [esp + 0x134]
push 0
push 0
push 0
push 0
push 0
push edx
push 1
push 2
push 0x110
push 0xf01ff
push esi
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [0x40b878], eax
test eax, eax
jne 0x40475d
push 0x56c
push str..loginService.cpp
lea ecx, [esp + 0xa4]
call fcn.00405530
mov esi, eax
mov dword [esp + 0x12c], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_create_service__error_code_
add esi, 4
push esi
call fcn.004014d0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.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_]
lea ecx, [esp + 0x9c]
mov dword [esp + 0x12c], ebp
call fcn.00405740
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [esp + 0x124]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret