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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x6319d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], esi
call fcn.0046d4f0
test eax, eax
je 0x47ca77
push 0
push str.CRegOps::StopTheService_n
push 0x6a1ed0
call fcn.00599ee3
mov ecx, dword [str.ENTRY:]
mov edx, dword [0x5ccf7c]
mov eax, 0x6a1ed0
mov dword [0x6a1dd0], ecx
add esp, 0xc
mov dword [0x6a1dd4], edx
mov ecx, eax
jmp 0x47ca30
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x47ca30
mov edi, 0x6a1dd0
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x47ca41
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d500
push 0x6a1dd0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
mov esi, dword [ebp - 0x28]
call fcn.0046d4f0
test eax, eax
je 0x47caa8
mov eax, dword [ebp + 0x10]
push eax
push esi
push str.pszServiceName___s__bDeleteService___d_n
push 0x6a1cd0
call fcn.00599ee3
add esp, 0x10
push 0x6a1cd0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
mov ecx, dword [ebp - 0x24]
push 0xf01ff
push esi
push ecx
xor ebx, ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x47cafc
call fcn.0046d4f0
test eax, eax
je 0x47cc8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_:_OpenService_:_GetLastError_____d_n
push 0x6a1bd0
call fcn.00599ee3
add esp, 0xc
push 0x6a1bd0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x47cc8d
lea edx, [ebp - 0x20]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x47cb47
call fcn.0046d4f0
test eax, eax
je 0x47cc86
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_:_QueryServiceStatus1_:_GetLastError_____d_n
push 0x6a1ad0
call fcn.00599ee3
add esp, 0xc
push 0x6a1ad0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x47cc86
cmp dword [ebp - 0x1c], 1
jne 0x47cb70
call fcn.0046d4f0
test eax, eax
je 0x47cc86
push str.Failed_:_Service_is_alrady_stopped_n
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x47cc86
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x47cbbd
call fcn.0046d4f0
test eax, eax
je 0x47cc86
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_:_ControlService_SERVICE_CONTROL_STOP__:_GetLastError_____d_n
push 0x6a19d0
call fcn.00599ee3
add esp, 0xc
push 0x6a19d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x47cc86
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
cmp dword [ebp - 0x1c], 1
mov dword [ebp - 0x24], eax
je 0x47cc06
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x1f4
call ebx
lea ecx, [ebp - 0x20]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x47cc4e
cmp dword [ebp - 0x1c], 1
je 0x47cc06
call edi
sub eax, dword [ebp - 0x24]
cmp eax, 0x1388
ja 0x47cd1f
cmp dword [ebp - 0x1c], 1
jne 0x47cbd4
cmp dword [ebp + 0x10], 0
je 0x47cc81
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ebx, eax
test ebx, ebx
jne 0x47cc86
call fcn.0046d4f0
test eax, eax
je 0x47cc86
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_:_DeleteService___GetLastError___d_n
push 0x6a18d0
call fcn.00599ee3
add esp, 0xc
push 0x6a18d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x47cc86
call fcn.0046d4f0
test eax, eax
je 0x47cc81
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_:_QueryServiceStatus2_:_GetLastError_____d_n
push 0x6a17d0
call fcn.00599ee3
add esp, 0xc
push 0x6a17d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
mov ebx, 1
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.0046d4f0
test eax, eax
je 0x47cd0a
push ebx
push str.CRegOps::StopTheService_:_bRetVal___d_n
push 0x6a16d0
call fcn.00599ee3
mov eax, dword [str.EXIT:]
mov ecx, dword [0x5ccefc]
mov dword [0x6a15d0], eax
mov eax, 0x6a16d0
mov dword [0x6a15d4], ecx
add esp, 0xc
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x47ccc6
mov edi, 0x6a15d0
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x47ccd7
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x6a15d0
rep movsb byte es:[edi], byte [esi]
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d510
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.00599ed4
mov esp, ebp
pop ebp
ret 0xc
call fcn.0046d4f0
test eax, eax
je 0x47cc81
mov edx, dword [ebp - 0x1c]
push edx
push str.Failed_:_TimeOut_:_dwCurrentState_d_n
push 0x6a14d0
call fcn.00599ee3
add esp, 0xc
push 0x6a14d0
jmp 0x47cc75