Function at 0x401880
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [ebp + 8], 1
push esi
jle 0x401b56
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi + 4]
movzx eax, word [ecx]
cmp eax, 0x2d
je 0x4018a8
cmp eax, 0x2f
jne 0x401b56
lea eax, [ecx + 2]
push eax
push str.installauto
call fcn.00406c72
add esp, 8
test eax, eax
jne 0x4018cc
push 1
call fcn.00401000
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
add eax, 2
push eax
push str.installmanual
call fcn.00406c72
add esp, 8
test eax, eax
jne 0x4018f2
push eax
call fcn.00401000
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
add eax, 2
push eax
push str.remove
call fcn.00406c72
add esp, 8
test eax, eax
jne 0x401a9c
push ebx
push 1
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp + 8], ebx
test ebx, ebx
jne 0x40195c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 5
jne 0x401946
push str.Permission_denied__please_run_as_Administor._n
call fcn.00401ba0
add esp, 4
mov eax, esi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push esi
push str.OpenSCManager_failed____u_n
call fcn.00401ba0
add esp, 8
mov eax, esi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push edi
push 0x10024
push str.DshowMonSvc
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x4019c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 5
jne 0x4019a0
push str.Permission_denied__please_run_as_Administor._n
call fcn.00401ba0
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push ebx
call edi
pop edi
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push esi
push str.OpenService_failed____u_n
call fcn.00401ba0
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 8
push ebx
call edi
pop edi
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push 0x4227f4
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x401a59
push str.DshowMonSvc
push str.Stopping__s.
call fcn.00401ba0
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
push 0x1f4
call ebx
push 0x4227f4
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x401a33
mov eax, dword [0x4227f8]
cmp eax, 3
jne 0x401a38
push 0x4134a0
call fcn.00401ba0
add esp, 4
push 0x1f4
call ebx
push 0x4227f4
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x401a05
mov eax, dword [0x4227f8]
push str.DshowMonSvc
cmp eax, 1
jne 0x401a49
push 0x4134a4
jmp 0x401a4e
push str._n_s_failed_to_stop._n
call fcn.00401ba0
mov ebx, dword [ebp + 8]
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x401a78
push str.DshowMonSvc
push str._s_removed._n
call fcn.00401ba0
add esp, 8
jmp 0x401a87
push str.DeleteService_failed____u_n
call fcn.004012f0
add esp, 4
mov esi, eax
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push ebx
call edi
pop edi
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
add eax, 2
push eax
push str.debug
call fcn.00406c72
add esp, 8
test eax, eax
jne 0x401ae4
push eax
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 1
push 0x401170
mov dword [0x422810], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push dword [0x422810]
call fcn.00401650
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
add eax, 2
push eax
push str.work
call fcn.00406c72
add esp, 8
test eax, eax
jne 0x401b1b
push str.Global4C9E70AB_2894_4EA9_AB31_9CBE60CA1A34
push eax
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenEventW]
push eax
call fcn.00401650
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
add eax, 2
push eax
push str.service
call fcn.00406c72
add esp, 8
test eax, eax
jne 0x401b56
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], str.DshowMonSvc
mov dword [ebp - 0xc], 0x401440
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
pop esi
mov esp, ebp
pop ebp
ret
push str.dshowmonsvc
push str._s__installauto_tto_install_the_service__Auto_Start__n
call fcn.00401ba0
push str.dshowmonsvc
push str._s__installmanual_tto_install_the_service__Manual_Start__n
call fcn.00401ba0
push str.dshowmonsvc
push str._s__remove_tto_remove_the_service_n
call fcn.00401ba0
push str.dshowmonsvc
push str._s__debug_tto_run_as_a_console_app_for_debugging_n
call fcn.00401ba0
add esp, 0x20
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret