Function at 0x4521e0
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a9846
mov eax, dword fs:[0]
push eax
sub esp, 0x1f0
mov eax, dword [0x4d0084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push str._install
push edi
xor esi, esi
call fcn.0048ce55
add esp, 8
test eax, eax
jne 0x452230
call fcn.00452e20
mov esi, eax
jmp 0x45268f
push str._uninstall
push edi
call fcn.0048ce55
add esp, 8
test eax, eax
jne 0x4522fe
push 0xf003f
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x452273
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.OpenSCManager_Failed__08x_n
call fcn.00459f60
jmp 0x45268c
push 0xf01ff
push str.ss_conn_service2
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x4522ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.OpenService_Failed__08x_n
call fcn.00459f60
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 8
push edi
call ebx
jmp 0x45268f
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x4522e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.DeleteService_Failed__08x_n
call fcn.00459f60
add esp, 8
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call ebx
push edi
call ebx
jmp 0x45268f
push str.DeleteService_Succeed_n
call fcn.00459f60
add esp, 4
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call ebx
push edi
call ebx
jmp 0x45268f
push str._start
push edi
call fcn.0048ce55
add esp, 8
test eax, eax
jne 0x4524bb
push str.start___1__
lea ecx, [ebp - 0x160]
call fcn.00453880
mov dword [ebp - 4], 0
lea edx, [ebp - 0xc4]
mov ecx, eax
mov dword [ebp - 0xc4], str.ss_conn_service2
mov dword [ebp - 0xc0], fcn.00412b40
mov dword [ebp - 0xbc], 0x457020
call fcn.004563f0
lea ecx, [ebp - 0x28]
push ecx
mov ecx, eax
call fcn.00453a70
lea ecx, [ebp - 0x160]
call fcn.004526c0
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov dword [ebp - 0x7c], 0x3c
cmovae eax, dword [ebp - 0x28]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x7c]
push eax
mov dword [ebp - 0x6c], 0x4be8a0
mov dword [ebp - 0x78], 0x240
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], str.open
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0x1d
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x452437
mov eax, dword [0x4d0a10]
cmp eax, 0x4d0a10
je 0x4523f6
test byte [eax + 0x1c], 1
je 0x4523f6
cmp byte [eax + 0x19], 3
jb 0x4523f6
push dword [eax + 0x14]
mov edx, 0x4be7ac
mov ecx, 0x11
push dword [eax + 0x10]
call fcn.00401940
mov ecx, dword [ebp - 0x44]
add esp, 8
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4d0a10]
cmp eax, 0x4d0a10
je 0x45247e
test byte [eax + 0x1c], 1
je 0x45247e
cmp byte [eax + 0x19], 3
jb 0x45247e
push dword [eax + 0x14]
mov edx, 0x4be7ac
mov ecx, 0x12
push dword [eax + 0x10]
call fcn.00401940
jmp 0x45247b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x4d0a10]
cmp eax, 0x4d0a10
je 0x452470
test byte [eax + 0x1c], 1
je 0x452470
cmp byte [eax + 0x19], 3
jb 0x452470
push esi
push dword [eax + 0x14]
mov edx, 0x4be7ac
mov ecx, 0x13
push dword [eax + 0x10]
call fcn.00401960
add esp, 0xc
push esi
push str.Start_Failed__08x_n
call fcn.00459f60
add esp, 8
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x45268f
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x452685
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4526ad
jmp 0x452685
push str._stop
push edi
call fcn.0048ce55
add esp, 8
test eax, eax
jne 0x45268f
push str.stop___1__
lea ecx, [ebp - 0x1fc]
call fcn.00453880
mov dword [ebp - 4], 1
lea edx, [ebp - 0xc4]
mov ecx, eax
mov dword [ebp - 0xc4], str.ss_conn_service2
mov dword [ebp - 0xc0], fcn.00412b40
mov dword [ebp - 0xbc], 0x457020
call fcn.004563f0
lea ecx, [ebp - 0x40]
push ecx
mov ecx, eax
call fcn.00453a70
lea ecx, [ebp - 0x1fc]
call fcn.004526c0
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
mov dword [ebp - 0xb8], 0x3c
cmovae eax, dword [ebp - 0x40]
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0xb8]
push eax
mov dword [ebp - 0xa8], 0x4be8a0
mov dword [ebp - 0xb4], 0x240
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], str.open
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x98], 0x1d
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov ecx, dword [ebp - 0x80]
test ecx, ecx
je 0x452612
mov eax, dword [0x4d0a10]
cmp eax, 0x4d0a10
je 0x4525d1
test byte [eax + 0x1c], 1
je 0x4525d1
cmp byte [eax + 0x19], 3
jb 0x4525d1
push dword [eax + 0x14]
mov edx, 0x4be7ac
mov ecx, 0x14
push dword [eax + 0x10]
call fcn.00401940
mov ecx, dword [ebp - 0x80]
add esp, 8
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x80]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4d0a10]
cmp eax, 0x4d0a10
je 0x452659
test byte [eax + 0x1c], 1
je 0x452659
cmp byte [eax + 0x19], 3
jb 0x452659
push dword [eax + 0x14]
mov edx, 0x4be7ac
mov ecx, 0x15
push dword [eax + 0x10]
call fcn.00401940
jmp 0x452656
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x4d0a10]
cmp eax, 0x4d0a10
je 0x45264b
test byte [eax + 0x1c], 1
je 0x45264b
cmp byte [eax + 0x19], 3
jb 0x45264b
push esi
push dword [eax + 0x14]
mov edx, 0x4be7ac
mov ecx, 0x16
push dword [eax + 0x10]
call fcn.00401960
add esp, 0xc
push esi
push str.Start_Failed__08x_n
call fcn.00459f60
add esp, 8
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x45268f
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x452685
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4526b2
push edx
push ecx
call fcn.00478627
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004785e6
mov esp, ebp
pop ebp
ret
call fcn.004836a9
call fcn.004836a9
int3