Function at 0x41d190
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x451608
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x468744]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x60], eax
mov edi, ecx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
lea ecx, [ebp - 0x4c]
push ecx
mov edx, 0x458828
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.00410fc0
lea edx, [ebp - 0x30]
push edx
mov edx, str.servicename
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00410fc0
mov byte [ebp - 4], 2
mov eax, dword [edi + 4]
push eax
push str.Service
push str.__s____d_
push 0x4699d4
xor eax, eax
call fcn.0042d020
inc dword [0x4699f4]
add esp, 0x10
push 0xf003f
push ebx
push ebx
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x5c], esi
test esi, esi
jne 0x41d23f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
test edi, edi
jne 0x41d3e5
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d255
lea eax, [ebp - 0x30]
push 0xf01ff
push eax
push esi
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
mov dword [ebp - 0x58], ebx
test ebx, ebx
jne 0x41d275
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
test edi, edi
jne 0x41d3e5
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d28b
lea eax, [ebp - 0x30]
push 0xf01ff
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
mov dword [ebp - 0x58], ebx
test ebx, ebx
jne 0x41d2a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x3c]
push str.removeonuninstall
mov edi, 0x11
lea ecx, [ebp - 0x4c]
call fcn.00404ab0
test eax, eax
jne 0x41d33e
cmp dword [ebp - 0x1c], 8
mov edi, dword [ebp - 0x30]
jae 0x41d2cc
lea edi, [ebp - 0x30]
mov ecx, 0xbc1
call fcn.00435690
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d2e2
lea eax, [ebp - 0x30]
push eax
push str.Deleting_service:__s
push 0x4699d4
xor eax, eax
call fcn.0042d020
mov ecx, dword [ebp - 0x60]
add esp, 0xc
cmp byte [ecx + 0x40], 0
jne 0x41d3d6
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x41d3d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41d3d6
push eax
push str.Error_removing_service__0x_X_
push 0x4699d4
mov eax, 2
call fcn.0042d020
add esp, 0xc
jmp 0x41d3d6
mov eax, dword [ebp - 0x3c]
push str.stoponuninstall
mov edi, 0xf
lea ecx, [ebp - 0x4c]
call fcn.00404ab0
test eax, eax
jne 0x41d3d6
cmp dword [ebp - 0x1c], 8
mov edi, dword [ebp - 0x30]
jae 0x41d363
lea edi, [ebp - 0x30]
mov ecx, 0xbbc
call fcn.00435690
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d379
lea eax, [ebp - 0x30]
push eax
push str.Stopping_service__s
push 0x4699d4
xor eax, eax
call fcn.0042d020
mov edi, dword [ebp - 0x60]
add esp, 0xc
cmp byte [edi + 0x40], 0
jne 0x41d3d6
lea ebx, [ebp - 0x5c]
call fcn.00430620
test eax, eax
je 0x41d3d0
cmp eax, 0x424
je 0x41d3d0
xor edx, edx
cmp byte [edi + 0x41], dl
push eax
setne dl
push str.Error_0x_X_while_stopping_service
push 0x4699d4
dec edx
and edx, eax
mov eax, 2
mov dword [edi + 0x3c], edx
call fcn.0042d020
add esp, 0xc
mov esi, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x58]
test ebx, ebx
je 0x41d3e1
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
jmp 0x41d40a
cmp dword [ebp - 0x1c], 8
mov ecx, dword [ebp - 0x30]
jae 0x41d3f1
lea ecx, [ebp - 0x30]
push ecx
push eax
push str.Error_0x_X_opening_service__s
push 0x4699d4
mov eax, 1
call fcn.0042d020
add esp, 0x10
xor edi, edi
cmp esi, edi
je 0x41d417
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
dec dword [0x4699f4]
cmp dword [ebp - 0x1c], 8
jb 0x41d42f
mov eax, dword [ebp - 0x30]
push eax
call fcn.00439b10
add esp, 4
xor ecx, ecx
cmp dword [ebp - 0x38], 8
mov esi, 7
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], edi
mov word [ebp - 0x30], cx
jb 0x41d452
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00439b10
add esp, 4
xor eax, eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x3c], edi
mov word [ebp - 0x4c], ax
cmp ebx, edi
je 0x41d469
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00438786
mov esp, ebp
pop ebp
ret 4