Function at 0x403eb0
Capabilities:
Continue service
Create service
Delete service
Pause service
Persist via windows service
Query service status
Start service
Stop service

Disassembly:
push 0xffffffffffffffff
push 0x407cf6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x234
push ebx
push ebp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test eax, eax
mov dword [esp + 0x14], eax
je 0x404170
mov ebx, dword [esp + 0x254]
push 0xf01ff
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, dword [esp + 0x258]
mov ebp, dword [sym.imp.MSVCRT.dll__wcsicmp]
push 0x40ce80
push edi
mov esi, eax
call ebp
add esp, 8
test eax, eax
je 0x403f77
test esi, esi
jne 0x403f77
lea eax, [esp + 0x3c]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x404170
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x4c]
push 0
push ecx
push 1
push 2
push 0x110
push 0xf01ff
push ebx
push ebx
mov ebx, dword [esp + 0x44]
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x403f77
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x404170
lea edx, [esp + 0x20]
mov ebx, 1
push edx
push esi
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push str.status
push edi
call ebp
add esp, 8
test eax, eax
jne 0x403fb0
mov eax, dword [esp + 0x24]
xor ebx, ebx
cmp eax, 4
sete bl
jmp 0x404118
push str.install
push edi
call ebp
add esp, 8
test eax, eax
je 0x404103
push str.start
push edi
call ebp
add esp, 8
test eax, eax
je 0x404103
push 0x40ce80
push edi
call ebp
add esp, 8
test eax, eax
je 0x4040d3
push str.stop
push edi
call ebp
add esp, 8
test eax, eax
je 0x4040d3
push str.pause
push edi
call ebp
add esp, 8
test eax, eax
jne 0x404026
lea eax, [esp + 0x20]
mov dword [esp + 0x10], 7
push eax
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x404116
push str.continue
push edi
call ebp
add esp, 8
test eax, eax
jne 0x404050
lea ecx, [esp + 0x20]
mov dword [esp + 0x10], 4
push ecx
push 3
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x404116
push str.reboot
push edi
call ebp
add esp, 8
test eax, eax
jne 0x404072
lea edx, [esp + 0x20]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x40410b
push edi
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CString::CString_4
push eax
lea eax, [esp + 0x1c]
push str._rN_e
push eax
mov dword [esp + 0x258], 0
call sub.MFC42u.DLL_operator_1
mov eax, dword [eax]
push 0
push eax
mov byte [esp + 0x254], 1
call fcn.00404540
add esp, 8
lea ecx, [esp + 0x18]
mov byte [esp + 0x24c], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov dword [esp + 0x24c], 0xffffffff
call sub.MFC42u.DLL_CString::CString
jmp 0x404118
lea ecx, [esp + 0x20]
mov dword [esp + 0x10], 1
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push 0x40ce80
push edi
mov ebx, eax
call ebp
add esp, 8
test eax, eax
jne 0x404118
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
jmp 0x404116
mov dword [esp + 0x10], 4
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov ebx, eax
mov eax, dword [esp + 0x25c]
test eax, eax
je 0x404150
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x404150
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x20]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [esp + 0x24], ebp
je 0x404149
push 1
call edi
jmp 0x404131
push 0xc8
call edi
lea eax, [esp + 0x20]
push eax
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov ecx, dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ecx
call edi
push esi
call edi
mov eax, ebx
mov ecx, dword [esp + 0x244]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x240
ret