Function at 0x418230
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d5b40
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 0x4182bb
push 0x35
push str.masterPDF_Server
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x4182c2
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.00418190
mov edx, dword [ebp - 0x38]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4182bb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x41843f
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 0x41832f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x41831c
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 0x41831c
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 0x41832f
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 0x41843f
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.0047de50
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 0x4183b5
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x418392
test edx, edx
js 0x418392
push eax
push ecx
call fcn.005a5ffe
add esp, 8
test eax, eax
je 0x418392
sub eax, dword [ebp - 0x34]
sar eax, 1
cmp eax, 0xffffffff
jne 0x4183b5
push esi
call ebx
push edi
call ebx
push str._enableServer
lea ecx, [ebp - 0x3c]
call fcn.00406540
lea ecx, [ebp - 0x3c]
call fcn.00418190
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 0x4183ee
cmp dword [ebp - 0x28], 1
jne 0x4183ee
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 0x4183ee
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 0x41841e
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 0x41843d
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.0058e39a
mov esp, ebp
pop ebp
ret