Function at 0x4180b0
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d2930
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x6639c4]
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 0x41813b
push 0x35
push str.masterPDF_Server
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x418142
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push str._enableServer
lea ecx, [ebp - 0x38]
call fcn.004064d0
lea ecx, [ebp - 0x38]
call fcn.00418010
mov edx, dword [ebp - 0x38]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41813b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x4182bf
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 0x4181af
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x41819c
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 0x41819c
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 0x4181af
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 0x4182bf
push dword [ebx + 0xc]
lea ecx, [ebp - 0x34]
call fcn.004064d0
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.0047d120
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 0x418235
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x418212
test edx, edx
js 0x418212
push eax
push ecx
call fcn.005a308e
add esp, 8
test eax, eax
je 0x418212
sub eax, dword [ebp - 0x34]
sar eax, 1
cmp eax, 0xffffffff
jne 0x418235
push esi
call ebx
push edi
call ebx
push str._enableServer
lea ecx, [ebp - 0x3c]
call fcn.004064d0
lea ecx, [ebp - 0x3c]
call fcn.00418010
lea ecx, [ebp - 0x3c]
call fcn.004064b0
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41826e
cmp dword [ebp - 0x28], 1
jne 0x41826e
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 0x41826e
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 0x41829e
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 0x4182bd
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.0058b4aa
mov esp, ebp
pop ebp
ret