Function at 0x4902fe
Capabilities:
Check for time delay via gettickcount
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x5087d0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov dword [ebp - 0x2c], esi
test edx, edx
jne 0x49032a
push str.DING::CService::WaitForService_498__:_Invalid_service_name_provided.
call fcn.004a35be
pop ecx
xor al, al
jmp 0x4904fb
and dword [ebp - 0x20], 0
push ebx
push edi
push 6
pop ecx
push edx
xor eax, eax
lea edi, [ebp - 0x1c]
push str.Waiting_for__s_service_to_start.
rep stosd dword es:[edi], eax
mov bl, 1
call fcn.004a35a8
pop ecx
pop ecx
lea eax, [ebp - 0x20]
push eax
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x490373
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DING::CService::WaitForService_526__:_Cannot_query_Service_Status._Encountered_error__lu
call fcn.004a35be
pop ecx
pop ecx
xor al, al
jmp 0x4904f9
push dword [ebp - 0x1c]
push str.Service_status_is_set_to__lu
call fcn.004a35a8
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
pop ecx
pop ecx
call edi
mov ecx, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
push 0xa
xor edx, edx
pop esi
div esi
mov dword [ebp - 0x24], ecx
mov esi, eax
mov eax, 0xfa
cmp esi, eax
jb 0x4903b3
mov eax, 0x2710
cmp esi, eax
jbe 0x4903b5
mov esi, eax
mov dword [ebp - 0x30], ecx
jmp 0x49045e
test bl, bl
je 0x49047a
push esi
push str.Sleeping_for__lu_milliseconds.
call fcn.004a35a8
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x2c]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x490401
xor bl, bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DING::CService::WaitForService_569__:_Cannot_query_Service_Status._Encountered_error__lu
call fcn.004a35be
pop ecx
pop ecx
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0xc], eax
jbe 0x490421
push str.checkpoint_changed__resetting_start_count
call fcn.004a35a8
pop ecx
call edi
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x28], eax
jmp 0x490452
push 0x7530
push dword [ebp - 0x24]
call edi
push eax
push str.TickCount:__lu__StartTickCount:__lu__Max:__lu
call fcn.004a35a8
add esp, 0x10
call edi
sub eax, dword [ebp - 0x24]
cmp eax, 0x7530
jbe 0x490452
push str.DING::CService::WaitForService_588__:_No_progress_has_been_made_in_the_service_status_within_the_hint._Exiting
xor bl, bl
call fcn.004a35be
pop ecx
call edi
sub eax, dword [ebp - 0x30]
cmp eax, 0x1d4c0
ja 0x49046c
mov eax, dword [ebp - 0x1c]
cmp eax, 2
je 0x4903bd
jmp 0x49047a
push str.DING::CService::WaitForService_595__:_2_minutes_has_elapsed_without_finishing._Exit
call fcn.004a35be
mov eax, dword [ebp - 0x1c]
pop ecx
push eax
push str.Service_status_before_exit__lu
call fcn.004a35a8
cmp dword [ebp - 0x1c], 4
pop ecx
pop ecx
je 0x4904f7
push str.DING::CService::WaitForService_606__:_Service_status_is_incorrect._Returning_false
xor bl, bl
call fcn.004a35be
push dword [ebp - 0x20]
push str.DING::CService::WaitForService_607__:_Service_type_is__lu
call fcn.004a35be
push dword [ebp - 0x1c]
push str.DING::CService::WaitForService_608__:_Current_state_is__lu
call fcn.004a35be
push dword [ebp - 0x18]
push str.DING::CService::WaitForService_609__:_Controls_accepted_is__lu
call fcn.004a35be
push dword [ebp - 0x14]
push str.DING::CService::WaitForService_610__:_Win32Exitcode_is__lu
call fcn.004a35be
push dword [ebp - 0x10]
push str.DING::CService::WaitForService_611__:_Service_specific_exit_code_is__lu
call fcn.004a35be
push dword [ebp - 0xc]
push str.DING::CService::WaitForService_612__:_Check_point_value_is__lu
call fcn.004a35be
push dword [ebp - 8]
push str.DING::CService::WaitForService_613__:_Wait_hint_value_is__lu
call fcn.004a35be
add esp, 0x3c
mov al, bl
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0046aec6
leave
ret