Function at 0x41f250
Capabilities:
Delete service

Disassembly:
push 0xffffffffffffffff
push 0x457b38
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x46e3d8]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46e3d8]
xor eax, esp
push eax
lea eax, [esp + 0x6c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x7c]
xor ebx, ebx
xor edi, edi
mov dword [esp + 0x28], eax
mov esi, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
lea ecx, [esp + 0x48]
push ecx
push esi
mov ecx, 0x45e6c4
mov dword [esp + 0x7c], ebx
call fcn.00412d30
lea edx, [esp + 0x2c]
push edx
push esi
mov ecx, str.servicename
mov byte [esp + 0x7c], 1
call fcn.00412d30
mov byte [esp + 0x74], 2
mov eax, dword [esi + 4]
push eax
push str.Service
push str.__s____d_
push 0x46fa40
xor eax, eax
call fcn.00431730
add dword [0x46fa60], 1
add esp, 0x10
push 0xf003f
push ebx
push ebx
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
cmp ebp, ebx
mov dword [esp + 0x18], ebp
jne 0x41f313
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jne 0x41f4f6
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x41f32a
lea eax, [esp + 0x30]
push 0xf01ff
push eax
push ebp
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x1c], edi
jne 0x41f34b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jne 0x41f4f6
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x41f362
lea eax, [esp + 0x30]
push 0xf01ff
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x1c], esi
jne 0x41f37f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x5c]
push str.removeonuninstall
mov edi, 0x11
lea ecx, [esp + 0x4c]
call fcn.004052d0
test eax, eax
jne 0x41f436
mov ebx, dword [esp + 0x30]
mov edi, 8
cmp dword [esp + 0x44], edi
jae 0x41f3b1
lea ebx, [esp + 0x30]
mov ecx, 0xbc1
call fcn.00439d60
cmp dword [esp + 0x44], edi
mov eax, dword [esp + 0x30]
jae 0x41f3c9
lea eax, [esp + 0x30]
push eax
push str.Deleting_service:__s
push 0x46fa40
xor eax, eax
call fcn.00431730
mov ecx, dword [esp + 0x34]
add esp, 0xc
cmp byte [ecx + 0x3c], 0
jne 0x41f4e1
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x41f40b
test esi, esi
je 0x41f402
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor ebx, ebx
xor edi, edi
jmp 0x41f51e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x41f4e1
push eax
push str.Error_removing_service__0x_X_
push 0x46fa40
mov eax, 2
call fcn.00431730
add esp, 0xc
jmp 0x41f4e1
mov eax, dword [esp + 0x5c]
push str.stoponuninstall
mov edi, 0xf
lea ecx, [esp + 0x4c]
call fcn.004052d0
test eax, eax
jne 0x41f4e3
mov ebx, dword [esp + 0x30]
mov edi, 8
cmp dword [esp + 0x44], edi
jae 0x41f468
lea ebx, [esp + 0x30]
mov ecx, 0xbbc
call fcn.00439d60
cmp dword [esp + 0x44], edi
mov eax, dword [esp + 0x30]
jae 0x41f480
lea eax, [esp + 0x30]
push eax
push str.Stopping_service__s
push 0x46fa40
xor eax, eax
call fcn.00431730
mov edi, dword [esp + 0x34]
add esp, 0xc
cmp byte [edi + 0x3c], 0
jne 0x41f4e1
lea eax, [esp + 0x18]
call fcn.00435460
test eax, eax
je 0x41f4d9
cmp eax, 0x424
je 0x41f4d9
mov dl, byte [edi + 0x3d]
neg dl
push eax
push str.Error_0x_X_while_stopping_service
push 0x46fa40
sbb edx, edx
not edx
and edx, eax
mov eax, 2
mov dword [edi + 0x38], edx
call fcn.00431730
add esp, 0xc
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
xor ebx, ebx
cmp esi, ebx
je 0x41f404
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor edi, edi
jmp 0x41f51e
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x41f505
lea eax, [esp + 0x30]
push eax
push esi
push str.Error_0x_X_opening_service__s
push 0x46fa40
mov eax, 1
call fcn.00431730
add esp, 0x10
cmp ebp, ebx
je 0x41f529
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
sub dword [0x46fa60], 1
mov esi, 8
cmp dword [esp + 0x44], esi
jb 0x41f548
mov eax, dword [esp + 0x30]
push eax
call fcn.0043e965
add esp, 4
cmp dword [esp + 0x60], esi
mov ebp, 7
mov dword [esp + 0x44], ebp
mov dword [esp + 0x40], ebx
mov word [esp + 0x30], bx
jb 0x41f56d
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.0043e965
add esp, 4
cmp edi, ebx
mov dword [esp + 0x60], ebp
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], bx
je 0x41f585
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0043d02a
add esp, 0x64
ret 4