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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x47b008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
push esi
push edi
push 0xf003f
push 0
push 0
mov esi, ecx
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x2d], 0
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x4128db
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x412877
mov ecx, dword [esi]
push 1
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x41288c
push eax
mov byte [ebp - 0x2d], 1
call edi
push dword [ebp - 0x34]
call edi
cmp byte [ebp - 0x2d], 0
je 0x4128db
push 0xf003f
push 0
push 0
call ebx
mov dword [ebp - 0x34], eax
test eax, eax
je 0x4128db
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x4128b3
mov ecx, dword [esi]
push 0x10000
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x4128d0
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push ebx
call edi
push dword [ebp - 0x34]
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
push dword [ebp - 0x38]
push ecx
call fcn.00412a30
push 0xf003f
push 0
push 0
call ebx
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x412944
push 0xf003f
push eax
push eax
call ebx
mov ebx, eax
test ebx, ebx
je 0x412a1b
cmp dword [esi + 0x14], 8
jb 0x412911
mov esi, dword [esi]
push 0x10000
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x41292e
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call edi
push ebx
call edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043b918
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x41294e
mov ecx, dword [esi]
push 0x24
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x412984
lea eax, [ebp - 0x2c]
mov dword [ebp - 0xc], 0
push eax
xorps xmm0, xmm0
push 1
push ebx
movups xmmword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x1c], xmm0
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x4129a3
push ebx
call edi
push dword [ebp - 0x34]
call edi
mov ecx, esi
call fcn.00412c40
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043b918
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0x28], 1
mov dword [ebp - 0x3c], eax
je 0x412a03
nop dword [eax]
nop word [eax + eax]
push dword [ebp - 0x14]
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x2c]
push eax
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x412981
cmp dword [ebp - 0x28], 1
je 0x412a03
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x3c]
cmp eax, 0xbb8
ja 0x412981
cmp dword [ebp - 0x28], 1
jne 0x4129c0
push ebx
call edi
push dword [ebp - 0x34]
call edi
mov ecx, esi
call fcn.00412c40
push dword [ebp - 0x38]
push ecx
call fcn.00412a30
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043b918
mov esp, ebp
pop ebp
ret 4