Function at 0x408280
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45d040
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2ac
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x14], edi
call fcn.0040d2e0
lea eax, [ebp - 0x38]
mov dword [ebp - 4], 0
push eax
mov byte [ebp - 4], 1
call fcn.0040a670
add esp, 4
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 2
call fcn.0040d0e0
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.0040e340
push eax
lea ecx, [ebp - 0x24]
call fcn.0040e0a0
push eax
lea ecx, [ebp - 0x60]
call fcn.0040dfc0
lea ecx, [ebp - 0x24]
call fcn.0040d860
lea ecx, [ebp - 0x38]
call fcn.0040d860
push 2
push 0
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
mov dword [ebp - 0x64], esi
lea eax, [edi + 0x28]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x7c]
call fcn.0040d0e0
lea eax, [edi + 0x40]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x18], eax
call fcn.0040d0e0
lea eax, [edi + 0x4c]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x54]
call fcn.0040d0e0
mov byte [ebp - 4], 9
test esi, esi
je 0x4085de
lea ecx, [ebp - 0x54]
call fcn.0040e0b0
test al, al
je 0x40836a
xor eax, eax
jmp 0x408372
lea ecx, [ebp - 0x54]
call fcn.0040e0a0
push 0
push 0
push eax
push 0
push 0
lea ecx, [ebp - 0x60]
call fcn.0040e0a0
push eax
push 1
push dword [edi + 0x10]
lea ecx, [ebp - 0x70]
push 0x10
push 0xf01ff
call fcn.0040e0a0
push eax
lea ecx, [ebp - 0x7c]
call fcn.0040e0a0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov edi, eax
mov dword [ebp - 0x2c], edi
mov byte [ebp - 4], 0xa
test edi, edi
je 0x4084c7
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x38]
add eax, 0x58
push eax
call fcn.0040d0e0
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0xb
call fcn.0040e0a0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov ecx, dword [ebp - 0x18]
call fcn.0040e0a0
push eax
push str.Successfully_installed
lea eax, [ebp - 0x2b8]
push str._s__s
push eax
call fcn.00409a90
add esp, 0x10
lea eax, [ebp - 0x2b8]
lea ecx, [ebp - 0x24]
push eax
call fcn.0040d5a0
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0xc
cmp byte [eax + 0x70], 0
jne 0x40847a
cmp dword [eax + 0xc], 0
je 0x408455
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x44]
call fcn.0040d0e0
push 0
mov ecx, eax
mov byte [ebp - 4], 0xd
call fcn.0040e0a0
push eax
call fcn.00407ae0
add esp, 8
lea ecx, [ebp - 0x44]
call fcn.0040d860
jmp 0x40847a
push dword [ebp - 0x18]
lea ecx, [ebp - 0x48]
call fcn.0040abb0
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0xe
push eax
push 0
lea ecx, [ebp - 0x48]
call fcn.0040adc0
lea ecx, [ebp - 0x48]
call fcn.0040ac50
lea ecx, [ebp - 0x24]
call fcn.0040d860
lea ecx, [ebp - 0x38]
call fcn.0040d860
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
lea ecx, [ebp - 0x54]
call fcn.0040d860
lea ecx, [ebp - 0x70]
call fcn.0040d860
lea ecx, [ebp - 0x7c]
call fcn.0040d860
push esi
call edi
lea ecx, [ebp - 0x60]
call fcn.0040d860
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [ebp - 0x28]
push ecx
push 0x400
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov esi, dword [ebp - 0x18]
mov ecx, esi
call fcn.0040e0a0
push eax
push str.Could_not_install
lea eax, [ebp - 0x2b8]
push str._s__s
push eax
call fcn.00409a90
add esp, 0x10
lea eax, [ebp - 0x2b8]
lea ecx, [ebp - 0x24]
push eax
call fcn.0040d5a0
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 0xf
cmp byte [eax + 0x70], 0
jne 0x40857d
cmp dword [eax + 0xc], 0
je 0x40855a
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x44]
call fcn.0040d0e0
push 0
mov ecx, eax
mov byte [ebp - 4], 0x10
call fcn.0040e0a0
push eax
call fcn.00407ae0
add esp, 8
lea ecx, [ebp - 0x44]
call fcn.0040d860
jmp 0x40857d
push esi
lea ecx, [ebp - 0x48]
call fcn.0040abb0
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 0x11
push eax
push 2
lea ecx, [ebp - 0x48]
call fcn.0040adc0
lea ecx, [ebp - 0x48]
call fcn.0040ac50
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xa
call fcn.0040d860
push 0x1ea
push str.nidscosdepDaemon.cpp
sub esp, 0x14
xorps xmm0, xmm0
mov eax, esp
movups xmmword [eax], xmm0
mov dword [eax + 0x10], 0
movq qword [eax + 4], xmm0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax], vtable.ni::dsc::exception::ServiceFailure.0
lea eax, [ebp - 0x90]
push eax
call fcn.00407430
add esp, 0x20
lea eax, [ebp - 0x90]
push 0x473990
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push 1
push str.Could_not_open_the_Service_Control_Manager
call fcn.00407ae0
add esp, 8
xorps xmm0, xmm0
push 0x1f0
push str.nidscosdepDaemon.cpp
sub esp, 0x14
mov eax, esp
movups xmmword [eax], xmm0
mov dword [eax + 0x10], 0
movq qword [eax + 4], xmm0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax], vtable.ni::dsc::exception::ServiceFailure.0
lea eax, [ebp - 0xa4]
push eax
call fcn.00407430
add esp, 0x20
lea eax, [ebp - 0xa4]
push 0x473990
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov esi, dword [ebp - 0x14]
lea ecx, [esi + 0x40]
call fcn.0040e0a0
push eax
push str.Unable_to_install
lea eax, [ebp - 0x2b8]
push str._s__s
push eax
call fcn.00409a90
add esp, 0x10
lea eax, [ebp - 0x2b8]
lea ecx, [ebp - 0x38]
push eax
call fcn.0040d5a0
push 0
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 5
push eax
mov ecx, esi
call fcn.004086e0
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 4
call fcn.0040d860
push 0x1a7
push str.nidscosdepDaemon.cpp
sub esp, 0x14
xorps xmm0, xmm0
mov ecx, esp
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
call fcn.00407850
lea eax, [ebp - 0xb8]
push eax
call fcn.00407430
add esp, 0x20
lea eax, [ebp - 0xb8]
push 0x473990
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3