Function at 0x40b940
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f238
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x414024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push str.CStealthManager::setupProcessMonitorService
push str._s_enter_
push str.stealth_manager
call fcn.00401b30
add esp, 0xc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x40bc27
push 9
lea eax, [ebp - 0x58]
mov ecx, esi
push eax
call fcn.0040a800
push 0xa
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
mov ecx, esi
call fcn.0040a800
push 0xb
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
mov ecx, esi
call fcn.0040a800
mov byte [ebp - 4], 2
lea eax, [ebp - 0x58]
cmp dword [ebp - 0x44], 0x10
cmovae eax, dword [ebp - 0x58]
push eax
push str.Service_path:__s
push str.stealth_manager
call fcn.00401b30
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
push str.Service_name:__s
push str.stealth_manager
call fcn.00401b30
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push str.Service_display_name:__s
push str.stealth_manager
call fcn.00401b30
add esp, 0x24
lea ecx, [ebp - 0x58]
cmp dword [ebp - 0x44], 0x10
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x40]
cmovae ecx, dword [ebp - 0x58]
cmp dword [ebp - 0x14], 0x10
push 0
cmovae edx, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 0x10
push 0
cmovae eax, dword [ebp - 0x40]
push 0
push 0
push 0
push ecx
push 0
push 2
push 0x110
push 0xc0000012
push edx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
jne 0x40bb33
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp esi, 0x431
je 0x40babe
push esi
push str.Error_Creating_services__d
push str.stealth_manager
call fcn.00401aa0
add esp, 0xc
push esi
push ecx
lea ecx, [ebp - 0x84]
call fcn.00409fe0
push 0x413210
lea eax, [ebp - 0x84]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x40bad0
inc eax
push eax
push dword [ebp - 0x28]
call fcn.00402aa0
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp eax, 0x10
jb 0x40baf4
inc eax
push eax
push dword [ebp - 0x40]
call fcn.00402aa0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
cmp eax, 0x10
jb 0x40bb18
inc eax
push eax
push dword [ebp - 0x58]
call fcn.00402aa0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040d22b
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x70]
mov dword [ebp - 0x70], 1
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0x98]
push eax
push 2
push esi
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 1
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x98], 0x15180
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x8c], 3
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x40bbbc
inc eax
push eax
push dword [ebp - 0x28]
call fcn.00402aa0
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp eax, 0x10
jb 0x40bbe0
inc eax
push eax
push dword [ebp - 0x40]
call fcn.00402aa0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
cmp eax, 0x10
jb 0x40bc0b
inc eax
push eax
push dword [ebp - 0x58]
call fcn.00402aa0
push str.CStealthManager::setupProcessMonitorService
push str._s_exit_
push str.stealth_manager
call fcn.00401b30
add esp, 0xc
jmp 0x40bb18
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Error_on_service_control_manager:__d
jmp 0x40ba93