Function at 0x41cfd0
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x450978
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x468738]
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, 0x458748
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.00410e30
lea edx, [ebp - 0x30]
push edx
mov edx, str.servicename
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00410e30
mov byte [ebp - 4], 2
mov eax, dword [edi + 4]
push eax
push str.Service
push str.__s____d_
push 0x4699dc
xor eax, eax
call fcn.0042c820
inc dword [0x4699fc]
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 0x41d07f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
test edi, edi
jne 0x41d225
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d095
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 0x41d0b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
test edi, edi
jne 0x41d225
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d0cb
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 0x41d0e7
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 0x41d17e
cmp dword [ebp - 0x1c], 8
mov edi, dword [ebp - 0x30]
jae 0x41d10c
lea edi, [ebp - 0x30]
mov ecx, 0xbc1
call fcn.00434db0
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d122
lea eax, [ebp - 0x30]
push eax
push str.Deleting_service:__s
push 0x4699dc
xor eax, eax
call fcn.0042c820
mov ecx, dword [ebp - 0x60]
add esp, 0xc
cmp byte [ecx + 0x40], 0
jne 0x41d216
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x41d216
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41d216
push eax
push str.Error_removing_service__0x_X_
push 0x4699dc
mov eax, 2
call fcn.0042c820
add esp, 0xc
jmp 0x41d216
mov eax, dword [ebp - 0x3c]
push str.stoponuninstall
mov edi, 0xf
lea ecx, [ebp - 0x4c]
call fcn.00404ab0
test eax, eax
jne 0x41d216
cmp dword [ebp - 0x1c], 8
mov edi, dword [ebp - 0x30]
jae 0x41d1a3
lea edi, [ebp - 0x30]
mov ecx, 0xbbc
call fcn.00434db0
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d1b9
lea eax, [ebp - 0x30]
push eax
push str.Stopping_service__s
push 0x4699dc
xor eax, eax
call fcn.0042c820
mov edi, dword [ebp - 0x60]
add esp, 0xc
cmp byte [edi + 0x40], 0
jne 0x41d216
lea ebx, [ebp - 0x5c]
call fcn.0042fe50
test eax, eax
je 0x41d210
cmp eax, 0x424
je 0x41d210
xor edx, edx
cmp byte [edi + 0x41], dl
push eax
setne dl
push str.Error_0x_X_while_stopping_service
push 0x4699dc
dec edx
and edx, eax
mov eax, 2
mov dword [edi + 0x3c], edx
call fcn.0042c820
add esp, 0xc
mov esi, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x58]
test ebx, ebx
je 0x41d221
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
jmp 0x41d24a
cmp dword [ebp - 0x1c], 8
mov ecx, dword [ebp - 0x30]
jae 0x41d231
lea ecx, [ebp - 0x30]
push ecx
push eax
push str.Error_0x_X_opening_service__s
push 0x4699dc
mov eax, 1
call fcn.0042c820
add esp, 0x10
xor edi, edi
cmp esi, edi
je 0x41d257
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
dec dword [0x4699fc]
cmp dword [ebp - 0x1c], 8
jb 0x41d26f
mov eax, dword [ebp - 0x30]
push eax
call fcn.00438b5b
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 0x41d292
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00438b5b
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 0x41d2a9
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.004377d1
mov esp, ebp
pop ebp
ret 4