Function at 0x417fc0
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d1360
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x6609c4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x20000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x41804b
push 0x35
push str.masterPDF_Server
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x418052
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push str._enableServer
lea ecx, [ebp - 0x38]
call fcn.00406470
lea ecx, [ebp - 0x38]
call fcn.00417f20
mov edx, dword [ebp - 0x38]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41804b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x4181cf
lea eax, [ebp - 0x30]
xor ebx, ebx
push eax
push ebx
push ebx
push esi
mov dword [ebp - 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x4180bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4180ac
push dword [ebp - 0x30]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x4180ac
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x30]
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x4180bf
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
xor eax, eax
jmp 0x4181cf
push dword [ebx + 0xc]
lea ecx, [ebp - 0x34]
call fcn.00406470
push ebx
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edx, edx
lea ecx, [ebp - 0x40]
call fcn.0047bdb0
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x34]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ecx - 0xc]
test edx, edx
jle 0x418145
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x418122
test edx, edx
js 0x418122
push eax
push ecx
call fcn.005a1c1e
add esp, 8
test eax, eax
je 0x418122
sub eax, dword [ebp - 0x34]
sar eax, 1
cmp eax, 0xffffffff
jne 0x418145
push esi
call ebx
push edi
call ebx
push str._enableServer
lea ecx, [ebp - 0x3c]
call fcn.00406470
lea ecx, [ebp - 0x3c]
call fcn.00417f20
lea ecx, [ebp - 0x3c]
call fcn.00406450
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41817e
cmp dword [ebp - 0x28], 1
jne 0x41817e
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp eax, 1
jne 0x41817e
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call ebx
push edi
call ebx
xor ebx, ebx
cmp dword [ebp - 0x28], 4
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x40]
sete bl
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4181ae
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4181cd
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00589ffa
mov esp, ebp
pop ebp
ret