Function at 0x406df0
Capabilities:
Check for time delay via gettickcount
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x4394c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf003f
push esi
push esi
mov dword [ebp - 0x30], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x406e47
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::DeleteService__:_OpenSCManager_failed:_ErrorCode:___d__
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x10
xor bl, bl
jmp 0x407006
cmp dword [0x43a4e4], 8
mov eax, dword [0x43a4d0]
jae 0x406e5a
mov eax, 0x43a4d0
push 0x10024
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x406e91
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::DeleteService__:_OpenService_failed:_ErrorCode:___d__
lea ecx, [ebx + 0xc]
push 0xc8
push ecx
call fcn.00409df0
add esp, 0x10
xor bl, bl
jmp 0x407006
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x406ecc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DriverInstaller::DeleteService__:_QueryServiceStatusEx_failed___d__n
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x10
xor bl, bl
jmp 0x407006
mov eax, dword [ebp - 0x28]
cmp eax, 1
je 0x406f77
cmp eax, 3
je 0x406f15
lea eax, [ebp - 0x2c]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x406f12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::DeleteService__:_ControlService_failed___d__n
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x10
xor bl, bl
jmp 0x407006
mov eax, dword [ebp - 0x28]
cmp eax, 1
je 0x406f77
lea ebx, [ebx]
mov eax, dword [ebp - 0x14]
cmp eax, 0x2710
jbe 0x406f31
mov eax, 0x2710
jmp 0x406f3d
cmp eax, 0x3e8
jae 0x406f3d
mov eax, 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x406fd0
cmp dword [ebp - 0x28], 1
je 0x406f77
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x30]
cmp eax, 0x4e20
ja 0x406fb6
cmp dword [ebp - 0x28], 1
jne 0x406f20
push str.CDriverInstaller::DeleteService__:_MonitorFunction_stopped_successfully_n
add ebx, 0xc
push 0xc8
push ebx
call fcn.00409df0
add esp, 0xc
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x406ff1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::DeleteService__:_DeleteService_failed:_ErrorCode:___d__
push 0xc8
push ebx
call fcn.00409df0
add esp, 0x10
xor bl, bl
jmp 0x407006
push str.CDriverInstaller::DeleteService__:_Wait_timed_out_n
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0xc
xor bl, bl
jmp 0x407006
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CDriverInstaller::DeleteService__:_QueryServiceStatusEx_failed___d__n
lea eax, [ebx + 0xc]
push 0xc8
push eax
call fcn.00409df0
add esp, 0x10
xor bl, bl
jmp 0x407006
push str.CDriverInstaller::DeleteService__:_DeleteService_success_
push 0xc8
push ebx
call fcn.00409df0
add esp, 0xc
mov bl, 1
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416cb0
mov esp, ebp
pop ebp
ret 4