Function at 0x41d790
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1024
call fcn.004206e0
mov eax, dword [0x4550d8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xf003f
xor ebx, ebx
mov edi, ecx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x41d9e8
push 1
add edi, 0x40
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x41d7e2
push eax
mov ebx, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
je 0x41d9e8
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x41d867
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80a
call fcn.00419fe0
add esp, 0xc
test eax, eax
jne 0x41d842
push str.Could_not_open_Service_Manager
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.004284d4
push eax
call fcn.00410590
add esp, 0x10
push 0
push edi
lea eax, [ebp - 0x804]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004202ef
mov esp, ebp
pop ebp
ret
push 0x10020
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x1024], esi
test esi, esi
jne 0x41d8e8
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80c
call fcn.00419fe0
add esp, 0xc
test eax, eax
jne 0x41d8c3
push str.Could_not_open_service
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.004284d4
push eax
call fcn.00410590
add esp, 0x10
push 0
push edi
lea eax, [ebp - 0x804]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004202ef
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1020]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x41d967
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x41d967
cmp eax, 0x425
jne 0x41d919
cmp dword [ebp - 0x101c], 3
je 0x41d967
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80e
call fcn.00419fe0
add esp, 0xc
test eax, eax
jne 0x41d955
push str.Could_not_stop_service
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.004284d4
push eax
call fcn.00410590
add esp, 0x10
push 0
push edi
lea eax, [ebp - 0x804]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push dword [ebp - 0x1024]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
jne 0x41d9e8
push 0x400
lea eax, [ebp - 0x1004]
push eax
push 0xd80d
call fcn.00419fe0
add esp, 0xc
test eax, eax
jne 0x41d9c3
push str.Could_not_delete_service
lea eax, [ebp - 0x1004]
push 0x400
push eax
call fcn.004284d4
push eax
call fcn.00410590
add esp, 0x10
push 0
push edi
lea eax, [ebp - 0x1004]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004202ef
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004202ef
mov esp, ebp
pop ebp
ret