Function at 0x41d140
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x451638
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x469738]
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, 0x459748
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.00410f80
lea edx, [ebp - 0x30]
push edx
mov edx, str.servicename
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00410f80
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 0x41d1ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
test edi, edi
jne 0x41d395
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d205
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 0x41d225
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
test edi, edi
jne 0x41d395
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d23b
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 0x41d257
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 0x41d2ee
cmp dword [ebp - 0x1c], 8
mov edi, dword [ebp - 0x30]
jae 0x41d27c
lea edi, [ebp - 0x30]
mov ecx, 0xbc1
call fcn.00435930
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d292
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 0x41d386
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x41d386
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41d386
push eax
push str.Error_removing_service__0x_X_
push 0x46a9d4
mov eax, 2
call fcn.0042d150
add esp, 0xc
jmp 0x41d386
mov eax, dword [ebp - 0x3c]
push str.stoponuninstall
mov edi, 0xf
lea ecx, [ebp - 0x4c]
call fcn.00404ab0
test eax, eax
jne 0x41d386
cmp dword [ebp - 0x1c], 8
mov edi, dword [ebp - 0x30]
jae 0x41d313
lea edi, [ebp - 0x30]
mov ecx, 0xbbc
call fcn.00435930
cmp dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x30]
jae 0x41d329
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 0x41d386
lea ebx, [ebp - 0x5c]
call fcn.004307e0
test eax, eax
je 0x41d380
cmp eax, 0x424
je 0x41d380
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 0x41d391
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
jmp 0x41d3ba
cmp dword [ebp - 0x1c], 8
mov ecx, dword [ebp - 0x30]
jae 0x41d3a1
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 0x41d3c7
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
dec dword [0x46a9f4]
cmp dword [ebp - 0x1c], 8
jb 0x41d3df
mov eax, dword [ebp - 0x30]
push eax
call fcn.004396db
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 0x41d402
mov edx, dword [ebp - 0x4c]
push edx
call fcn.004396db
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 0x41d419
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.00438351
mov esp, ebp
pop ebp
ret 4