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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x411014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x24], eax
nop
mov eax, dword [esi*8 + 0x40b918]
mov ecx, edi
nop dword [eax]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x405ca0
test dl, dl
je 0x405c9c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x405ca0
add ecx, 2
add eax, 2
test dl, dl
jne 0x405c80
xor eax, eax
jmp 0x405ca5
sbb eax, eax
or eax, 1
test eax, eax
je 0x405cb1
inc esi
cmp esi, 1
jb 0x405c70
jmp 0x405cbf
mov ebx, dword [esi*8 + 0x40b91c]
mov dword [ebp - 0x28], ebx
test ebx, ebx
jne 0x405ce7
push edi
mov edi, dword [ebp - 0x24]
push str.VMAuthdStartService_failed_to_lookup_service_tag:__s_n
push dword [ebp + 0x10]
push edi
call sub.vmwarebase.DLL_Str_Sprintf
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004083a0
mov esp, ebp
pop ebp
ret
push 0xf003f
push 0
push 0
call sub.vmwarebase.DLL_Win32U_OpenSCManager
add esp, 0xc
test eax, eax
jne 0x405d30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sub.vmwarebase.DLL_Err_ErrString
mov edi, dword [ebp - 0x24]
push eax
push str.OpenSCManager_failed:__s___d__n
push dword [ebp + 0x10]
push edi
call sub.vmwarebase.DLL_Str_Sprintf
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004083a0
mov esp, ebp
pop ebp
ret
push 0x14
push ebx
push eax
call sub.vmwarebase.DLL_Win32U_OpenService
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x405d77
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sub.vmwarebase.DLL_Err_ErrString
push eax
push ebx
push str.OpenService__s__failed:__s___d__n
push dword [ebp + 0x10]
mov edi, dword [ebp - 0x24]
push edi
call sub.vmwarebase.DLL_Str_Sprintf
add esp, 0x18
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004083a0
mov esp, ebp
pop ebp
ret
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x405da2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x405da2
push eax
call sub.vmwarebase.DLL_Err_ErrString
push eax
push ebx
push str.StartService__s__failed:__s___d__n
jmp 0x405d55
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
xor esi, esi
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x405e38
nop dword [eax + eax]
mov eax, dword [ebp - 0x1c]
cmp eax, 2
jne 0x405e93
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x2bf20
ja 0x405e73
cmp dword [ebp - 0xc], esi
jbe 0x405df4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [ebp - 0xc]
mov ebx, eax
mov ecx, dword [ebp - 8]
jmp 0x405dfb
mov ecx, dword [ebp - 8]
cmp eax, ecx
ja 0x405e73
mov eax, 0xcccccccd
mul ecx
shr edx, 3
cmp edx, 0x3e8
jae 0x405e14
mov edx, 0x3e8
jmp 0x405e22
cmp edx, 0x2710
mov eax, 0x2710
cmova edx, eax
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x405dc0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sub.vmwarebase.DLL_Err_ErrString
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp - 0x24]
push eax
push str.QueryServiceStatus_failed:__s___d__n
push esi
push edi
call sub.vmwarebase.DLL_Str_Sprintf
add esp, 0x14
mov eax, dword [ebp - 0x24]
cmp eax, 4
je 0x405e9b
push eax
push 4
push dword [ebp - 0x28]
push str.VMAuthdStartService_failed_to_start_service__s:_Expected_service_state__d__got__d
push esi
jmp 0x405d5b
mov eax, dword [ebp - 0x1c]
cmp eax, 2
jne 0x405e93
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp - 0x24]
push eax
push str.WaitForServiceStateChange_failed:_Timed_out_while_waiting_for_service_state_to_change_from__d
push esi
push edi
call sub.vmwarebase.DLL_Str_Sprintf
add esp, 0x10
jmp 0x405e5a
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp - 0x24]
jmp 0x405e5d
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004083a0
mov esp, ebp
pop ebp
ret