Function at 0x41030f40
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push str.Entering_CTPACWMI::WaitForServiceToReachState
push 0x41157f9c
push 0x1000001
push 0x5db
push str.WMIProv.cpp
call fcn.41002c10
add esp, 0x14
mov dword [ebp - 4], 0xffffffff
xor ebx, ebx
mov dword [ebp - 8], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
push esi
push eax
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41031049
mov edi, edi
mov ecx, dword [ebp + 0xc]
cmp dword [esi + 4], ecx
je 0x41031049
cmp dword [ebp + 0x14], 0xffffffff
je 0x41030fbd
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, dword [ebp - 0xc]
ja 0x4103103c
cmp dword [esi + 0x18], 0
jne 0x41030fc9
mov edx, dword [ebp + 0x14]
mov dword [esi + 0x18], edx
cmp dword [ebp - 8], 0
mov eax, dword [esi + 4]
je 0x41030fec
mov ebx, dword [esi + 0x14]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
add edi, dword [esi + 0x18]
mov dword [ebp - 8], 0
jmp 0x41031017
cmp dword [ebp - 4], eax
je 0x41031004
mov ebx, dword [esi + 0x14]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
add edi, dword [esi + 0x18]
jmp 0x41031017
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, edi
jbe 0x41031017
mov eax, dword [esi + 0x14]
cmp eax, ebx
jbe 0x41031047
mov ebx, eax
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp + 8]
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x41030fa0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x5b4
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x41031050
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x411bade8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push str.Entering_CTPACWMI::ServiceStart
push 0x41157f9c
push 0x1000001
push 0x631
push str.WMIProv.cpp
call fcn.41002c10
add esp, 0x14
push 1
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x410310b3
push 0xf01ff
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x410310c7
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.4112e1a6
mov esp, ebp
pop ebp
ret
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x410310ee
push 0x7530
lea eax, [ebp - 0x20]
push eax
push 4
push edi
call fcn.41030f40
add esp, 0x10
mov ebx, eax
jmp 0x41031100
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x41031100
mov ebx, 1
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push esi
call edi
mov ecx, dword [ebp - 4]
mov eax, ebx
neg eax
sbb eax, eax
pop edi
neg eax
pop esi
xor ecx, ebp
dec eax
pop ebx
call fcn.4112e1a6
mov esp, ebp
pop ebp
ret