Function at 0x4088f0
Capabilities:
Check for peb beingdebugged flag
Connect pipe
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea ecx, [ebp - 0x38]
lea edx, [ebp - 0x3c]
push ebx
sub esp, 0x7c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], 0
call fcn.00407580
mov esi, eax
test eax, eax
je 0x408930
test byte [0x418070], 8
jne 0x408b9c
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x10]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
test byte [0x418070], 8
jne 0x408cc0
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebx + 0x24]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ConnectNamedPipe]
sub esp, 8
test eax, eax
je 0x408bf0
cmp word [edi], 0
je 0x408da0
mov edx, edi
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x408988
sub edx, edi
sar edx, 1
add edx, 1
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x4089d9
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
lea esi, [ecx + ebx*4]
nop
lea esi, [esi]
mov ebx, dword [ecx]
cmp word [ebx], 0
je 0x408bd0
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x4089c0
sub eax, ebx
sar eax, 1
add eax, 1
add ecx, 4
add edx, eax
cmp esi, ecx
jne 0x4089b0
lea eax, [edx + edx + 2]
mov dword [esp + 4], 0
mov ebx, eax
mov dword [ebp - 0x54], eax
mov dword [esp + 8], ebx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov esi, eax
sub esp, 0xc
xor eax, eax
test esi, esi
je 0x408db0
lea esi, [esi]
movzx edx, word [edi + eax]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x408a18
cmp word [edi], 0
je 0x408dd0
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x408a38
sub eax, edi
add eax, 2
mov ebx, dword [ebp + 0xc]
add eax, esi
test ebx, ebx
je 0x408aa5
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x5c], esi
lea ebx, [edx + ebx*4]
mov esi, ebx
mov edi, dword [edx]
xor ecx, ecx
lea esi, [esi]
movzx ebx, word [edi + ecx]
mov word [eax + ecx], bx
add ecx, 2
test bx, bx
jne 0x408a68
cmp word [eax], 0
je 0x408be0
mov ecx, eax
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x408a88
sub ecx, eax
add ecx, 2
add edx, 4
add eax, ecx
cmp esi, edx
jne 0x408a60
mov edi, dword [ebp - 0x58]
mov esi, dword [ebp - 0x5c]
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x34]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x54]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], edi
mov dword [esp], eax
call fcn.00403200
test eax, eax
jne 0x408ae5
mov dword [ebp - 0x34], 0x41d
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov esi, dword [ebp - 0x34]
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 0xc
test esi, esi
je 0x408c38
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov dword [ebp - 0x4c], eax
add eax, 0x18
mov dword [esp], eax
call edi
mov eax, dword [ebp + 8]
sub esp, 4
mov edx, dword [eax + 0x68]
test edx, edx
je 0x408b61
mov edx, dword [ebp - 0x3c]
mov dword [eax + 0x18], 1
mov dword [eax + 0x68], 0
sub dword [edx + 0x10], 1
je 0x408de0
mov dword [esp], edx
call fcn.00406620
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
add eax, 0x18
mov dword [esp], eax
call ebx
sub esp, 4
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
mov eax, dword [ebp - 0x3c]
sub esp, 4
mov dword [esp], eax
call fcn.00406620
test byte [0x418070], 8
je 0x408921
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.returning__d_n
mov dword [esp + 8], str.service_start
mov dword [esp + 4], 0x418070
mov dword [esp], 3
call fcn.00405aa0
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 1
jmp 0x4089d0
mov ecx, 2
jmp 0x408a96
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x408d10
cmp dword [eax + 0x34], 0x217
je 0x408976
test byte [0x418070], 2
jne 0x408df0
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov esi, 0x41d
jmp 0x408b20
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov ecx, dword [esi + 0x30]
mov dword [esp + 8], 0
mov dword [esp], 2
mov dword [ebp - 0x28], eax
mov eax, dword [0x41806c]
mov dword [ebp - 0x2c], ecx
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
jne 0x408cad
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov dword [ebp - 0x4c], eax
add eax, 0x18
mov dword [esp], eax
call edi
mov eax, dword [ebp + 8]
sub esp, 4
mov esi, dword [eax + 0x18]
mov eax, dword [eax + 8]
mov dword [ebp - 0x4c], eax
add eax, 0x18
sub esi, 2
mov dword [esp], eax
call ebx
sub esp, 4
and esi, 0xfffffffd
je 0x408b72
mov esi, 0x41d
jmp 0x408b20
mov eax, edi
call fcn.00405b90
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0xc], str._p__s__p__d_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x1c], ebx
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x418070
mov dword [esp], 3
call fcn.00405aa0
jmp 0x40894f
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebx + 0x24]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 8], 0
mov dword [ebp - 0x30], eax
mov eax, dword [0x41806c]
mov dword [esp], 2
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
jne 0x408e20
cmp dword [ebp - 0x2c], 0x103
jne 0x408976
test byte [0x418070], 2
je 0x408c1d
mov eax, edi
call fcn.00405b90
mov dword [esp + 0xc], str.service__s_failed_to_start_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x418070
mov dword [esp], 1
call fcn.00405aa0
jmp 0x408c1d
mov edx, 1
jmp 0x408998
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov esi, 0x46a
jmp 0x408b20
mov eax, 2
jmp 0x408a46
mov dword [esp], edx
call fcn.004074f0
mov edx, dword [ebp - 0x3c]
jmp 0x408b59
mov dword [esp + 0xc], str.pipe_connect_failed_n
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x418070
mov dword [esp], 1
call fcn.00405aa0
jmp 0x408c1d
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CancelIo]
sub esp, 4
jmp 0x408d4f