Function at 0x41d1d0
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x451798
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x469744]
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, 0x459828
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.00410fd0
lea edx, [ebp - 0x30]
push edx
mov edx, str.servicename
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00410fd0
mov byte [ebp - 4], 2
mov eax, dword [edi + 4]
push eax
push str.Service
push str.__s____d_
push 0x46a9d4
xor eax, eax
call fcn.0042d150
inc dword [0x46a9f4]
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 0x41d27f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
test edi, edi
jne 0x41d425
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d295
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 0x41d2b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
test edi, edi
jne 0x41d425
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d2cb
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 0x41d2e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x3c]
push str.removeonuninstall
mov edi, 0x11
lea ecx, [ebp - 0x4c]
call fcn.00404a60
test eax, eax
jne 0x41d37e
cmp dword [ebp - 0x1c], 8
mov edi, dword [ebp - 0x30]
jae 0x41d30c
lea edi, [ebp - 0x30]
mov ecx, 0xbc1
call fcn.004357d0
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d322
lea eax, [ebp - 0x30]
push eax
push str.Deleting_service:__s
push 0x46a9d4
xor eax, eax
call fcn.0042d150
mov ecx, dword [ebp - 0x60]
add esp, 0xc
cmp byte [ecx + 0x40], 0
jne 0x41d416
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x41d416
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41d416
push eax
push str.Error_removing_service__0x_X_
push 0x46a9d4
mov eax, 2
call fcn.0042d150
add esp, 0xc
jmp 0x41d416
mov eax, dword [ebp - 0x3c]
push str.stoponuninstall
mov edi, 0xf
lea ecx, [ebp - 0x4c]
call fcn.00404a60
test eax, eax
jne 0x41d416
cmp dword [ebp - 0x1c], 8
mov edi, dword [ebp - 0x30]
jae 0x41d3a3
lea edi, [ebp - 0x30]
mov ecx, 0xbbc
call fcn.004357d0
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d3b9
lea eax, [ebp - 0x30]
push eax
push str.Stopping_service__s
push 0x46a9d4
xor eax, eax
call fcn.0042d150
mov edi, dword [ebp - 0x60]
add esp, 0xc
cmp byte [edi + 0x40], 0
jne 0x41d416
lea ebx, [ebp - 0x5c]
call fcn.00430770
test eax, eax
je 0x41d410
cmp eax, 0x424
je 0x41d410
xor edx, edx
cmp byte [edi + 0x41], dl
push eax
setne dl
push str.Error_0x_X_while_stopping_service
push 0x46a9d4
dec edx
and edx, eax
mov eax, 2
mov dword [edi + 0x3c], edx
call fcn.0042d150
add esp, 0xc
mov esi, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x58]
test ebx, ebx
je 0x41d421
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
jmp 0x41d44a
cmp dword [ebp - 0x1c], 8
mov ecx, dword [ebp - 0x30]
jae 0x41d431
lea ecx, [ebp - 0x30]
push ecx
push eax
push str.Error_0x_X_opening_service__s
push 0x46a9d4
mov eax, 1
call fcn.0042d150
add esp, 0x10
xor edi, edi
cmp esi, edi
je 0x41d457
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
dec dword [0x46a9f4]
cmp dword [ebp - 0x1c], 8
jb 0x41d46f
mov eax, dword [ebp - 0x30]
push eax
call fcn.00439c00
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 0x41d492
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00439c00
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 0x41d4a9
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.00438876
mov esp, ebp
pop ebp
ret 4