Function at 0x50cad0
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1028
call fcn.0050f580
mov eax, dword [0x53120c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
mov edi, ecx
mov dword [ebp - 0x1024], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
add edi, 0x40
mov dword [ebp - 0x1028], eax
test eax, eax
je 0x50cd45
push 1
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x50cb37
push eax
mov dword [ebp - 0x1024], 1
call ebx
push dword [ebp - 0x1028]
call ebx
cmp dword [ebp - 0x1024], 0
je 0x50cd45
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x1028], esi
test esi, esi
jne 0x50cbc8
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80a
call fcn.0050a080
add esp, 0xc
test eax, eax
jne 0x50cba3
push str.Could_not_open_Service_Manager
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.005156dd
push eax
call fcn.00504640
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.0050f225
mov esp, ebp
pop ebp
ret
push 0x10020
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x1024], eax
test eax, eax
jne 0x50cc43
push esi
call ebx
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80c
call fcn.0050a080
add esp, 0xc
test eax, eax
jne 0x50cc1e
push str.Could_not_open_service
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.005156dd
push eax
call fcn.00504640
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.0050f225
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x1020]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x50ccc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x50ccc2
cmp eax, 0x425
jne 0x50cc74
cmp dword [ebp - 0x101c], 3
je 0x50ccc2
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80e
call fcn.0050a080
add esp, 0xc
test eax, eax
jne 0x50ccb0
push str.Could_not_stop_service
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.005156dd
push eax
call fcn.00504640
add esp, 0x10
push 0
push edi
lea eax, [ebp - 0x804]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x1024]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push dword [ebp - 0x1024]
mov esi, eax
call ebx
push dword [ebp - 0x1028]
call ebx
test esi, esi
jne 0x50cd45
push 0x400
lea eax, [ebp - 0x1004]
push eax
push 0xd80d
call fcn.0050a080
add esp, 0xc
test eax, eax
jne 0x50cd20
push str.Could_not_delete_service
lea eax, [ebp - 0x1004]
push 0x400
push eax
call fcn.005156dd
push eax
call fcn.00504640
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.0050f225
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.0050f225
mov esp, ebp
pop ebp
ret