Function at 0x4181f0
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d5a80
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x66a9c4]
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 0x41827b
push 0x35
push str.masterPDF_Server
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x418282
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push str._enableServer
lea ecx, [ebp - 0x38]
call fcn.00406540
lea ecx, [ebp - 0x38]
call fcn.00418150
mov edx, dword [ebp - 0x38]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41827b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x4183ff
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 0x4182ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4182dc
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 0x4182dc
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 0x4182ef
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 0x4183ff
push dword [ebx + 0xc]
lea ecx, [ebp - 0x34]
call fcn.00406540
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.0047dde0
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 0x418375
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x418352
test edx, edx
js 0x418352
push eax
push ecx
call fcn.005a5f1e
add esp, 8
test eax, eax
je 0x418352
sub eax, dword [ebp - 0x34]
sar eax, 1
cmp eax, 0xffffffff
jne 0x418375
push esi
call ebx
push edi
call ebx
push str._enableServer
lea ecx, [ebp - 0x3c]
call fcn.00406540
lea ecx, [ebp - 0x3c]
call fcn.00418150
lea ecx, [ebp - 0x3c]
call fcn.00406520
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4183ae
cmp dword [ebp - 0x28], 1
jne 0x4183ae
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 0x4183ae
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 0x4183de
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 0x4183fd
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.0058e2fa
mov esp, ebp
pop ebp
ret