Function at 0x407e30
Capabilities:
Connect pipe

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
lea edx, [ebp - 0x3c]
push esi
push ebx
push ecx
sub esp, 0x68
mov esi, dword [ecx + 8]
mov dword [ebp - 0x3c], 0
mov eax, dword [ecx]
mov edi, dword [ecx + 4]
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x40], eax
call fcn.00406f80
mov esi, eax
test eax, eax
je 0x407e88
test byte [0x40b070], 8
jne 0x408104
mov eax, esi
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, dword [ebp - 0x40]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x44], eax
test byte [0x40b070], 8
jne 0x408231
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x4c], edx
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ConnectNamedPipe]
mov edx, dword [ebp - 0x4c]
sub esp, 8
test eax, eax
je 0x40815a
cmp word [edx], 0
je 0x4083da
mov ecx, edx
add ecx, 2
cmp word [ecx], 0
jne 0x407ee0
sub ecx, edx
sar ecx, 1
add ecx, 1
mov dword [ebp - 0x34], ecx
test edi, edi
je 0x407f3f
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x4c], edx
mov ebx, eax
lea eax, [eax + edi*4]
mov edx, eax
lea esi, [esi]
mov esi, dword [ebx]
cmp word [esi], 0
je 0x408150
mov eax, esi
lea esi, [esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x407f20
sub eax, esi
sar eax, 1
add eax, 1
add ecx, eax
add ebx, 4
mov dword [ebp - 0x34], ecx
cmp edx, ebx
jne 0x407f08
mov edx, dword [ebp - 0x4c]
lea eax, [ecx + ecx + 2]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x34], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x54]
test eax, eax
mov ebx, eax
je 0x408423
xor eax, eax
lea esi, [esi]
movzx ecx, word [edx + eax]
mov word [ebx + eax], cx
add eax, 2
test cx, cx
jne 0x407f68
cmp word [edx], 0
je 0x4083d0
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x407f88
sub eax, edx
lea ecx, [eax + 2]
add ecx, ebx
test edi, edi
je 0x407ff5
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x48], edx
lea edi, [esi + edi*4]
lea esi, [esi]
nop
mov ebx, dword [esi]
xor eax, eax
lea esi, [esi]
movzx edx, word [ebx + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x407fb8
cmp word [ecx], 0
je 0x408140
mov eax, ecx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x407fd8
sub eax, ecx
add eax, 2
add esi, 4
add ecx, eax
cmp edi, esi
jne 0x407fb0
mov edx, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x54]
lea eax, [ebp - 0x30]
xor esi, esi
mov word [ecx], si
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call fcn.004033b0
test eax, eax
je 0x4081b5
mov esi, dword [ebp - 0x30]
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
test esi, esi
jne 0x4081cf
mov eax, dword [ebp - 0x44]
movd xmm1, dword [eax + 0x18]
mov eax, dword [ebp - 0x40]
movd xmm0, dword [eax + 0x30]
mov eax, dword [0x40b06c]
punpckldq xmm0, xmm1
movq qword [ebp - 0x28], xmm0
mov dword [esp + 8], 0
mov dword [esp], 2
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
jne 0x4081a7
mov esi, dword [ebp - 0x40]
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [esi + 8]
mov dword [ebp - 0x48], eax
add eax, 0x18
mov dword [esp], eax
call edi
mov eax, esi
mov esi, dword [esi + 0x18]
mov eax, dword [eax + 8]
sub esp, 4
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esi, 2
mov dword [ebp - 0x48], eax
add eax, 0x18
mov dword [esp], eax
call ebx
sub esp, 4
and esi, 0xfffffffd
jne 0x4081ca
mov edi, dword [ebp - 0x44]
mov eax, dword [edi + 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReleaseMutex]
sub esp, 4
mov dword [esp], edi
call fcn.00406970
test byte [0x40b070], 8
je 0x407e77
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.returning__ld_n
mov dword [esp + 8], str.service_start
mov dword [esp + 4], 0x40b070
mov dword [esp], 3
call fcn.00405f10
lea esp, [ebp - 0x10]
mov eax, esi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, 2
jmp 0x407fe6
mov eax, 1
jmp 0x407f30
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x4082c7
cmp dword [eax + 0x34], 0x217
je 0x407ed4
test byte [0x40b070], 2
je 0x4081a7
mov dword [esp + 0xc], str.pipe_connect_failed_n
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x40b070
mov dword [esp], 1
call fcn.00405f10
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x4081ca
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov esi, 0x41d
mov eax, dword [ebp - 0x40]
mov edx, dword [eax + 8]
lea eax, [edx + 0x18]
mov dword [ebp - 0x48], edx
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x40]
sub esp, 4
mov edx, dword [eax + 0x68]
test edx, edx
je 0x40821b
mov edi, dword [ebp - 0x44]
mov dword [eax + 0x18], 1
mov dword [eax + 0x68], 0
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x48], eax
sub eax, 1
mov dword [edi + 0x10], eax
je 0x4082ba
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call fcn.00406970
mov eax, dword [ebp - 0x40]
mov eax, dword [eax + 8]
add eax, 0x18
mov dword [esp], eax
call ebx
sub esp, 4
jmp 0x4080dd
test edx, edx
je 0x4083ff
mov eax, edx
shr eax, 0x10
test eax, eax
je 0x4083e4
mov dword [esp], edx
mov dword [esp + 4], 0xffffffff
mov dword [ebp - 0x4c], edx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, dword [ebp - 0x4c]
mov ecx, eax
sub esp, 8
mov eax, 0x40dc6d
test ecx, ecx
jne 0x408275
mov eax, edx
call fcn.00405c20
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x4c], edx
mov dword [esp + 0x1c], edi
mov ebx, dword [ebp - 0x48]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
mov eax, dword [ebp - 0x44]
mov dword [esp + 0xc], str._p__s__p__ld_n
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x40b070
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.00405f10
mov edx, dword [ebp - 0x4c]
jmp 0x407ea7
mov dword [esp], edi
call fcn.00406ef0
jmp 0x408210
mov eax, dword [ebp - 0x44]
movd xmm1, dword [eax + 0x18]
movd xmm0, dword [eax + 0x24]
mov eax, dword [0x40b06c]
punpckldq xmm0, xmm1
movq qword [ebp - 0x30], xmm0
mov dword [esp + 8], 0
mov dword [esp], 2
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
mov edx, dword [ebp - 0x4c]
sub esp, 0x10
test eax, eax
jne 0x408409
lea eax, [ebp - 0x34]
mov dword [ebp - 0x4c], edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
mov edx, dword [ebp - 0x4c]
sub esp, 0x10
test eax, eax
jne 0x407ed4
test byte [0x40b070], 2
je 0x4081a7
test edx, edx
je 0x40844e
mov eax, edx
shr eax, 0x10
test eax, eax
je 0x408439
mov dword [esp + 4], 0xffffffff
mov dword [esp], edx
mov dword [ebp - 0x48], edx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x40dc6d
test ecx, ecx
jne 0x408392
mov eax, dword [ebp - 0x48]
call fcn.00405c20
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.service__s_failed_to_start_n
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x40b070
mov dword [esp], 1
call fcn.00405f10
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x4081ca
mov ecx, 2
jmp 0x407f96
mov ecx, 1
jmp 0x407ef0
mov dword [esp + 4], edx
mov dword [ebp - 0x4c], edx
mov dword [esp], 0x40dc60
call fcn.00405de0
mov edx, dword [ebp - 0x4c]
jmp 0x408275
mov eax, 0x40dc66
jmp 0x408275
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CancelIo]
mov edx, dword [ebp - 0x4c]
sub esp, 4
jmp 0x408310
mov edi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, 0x46a
mov ebx, dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x4081cf
mov dword [esp + 4], edx
mov dword [esp], 0x40dc60
call fcn.00405de0
jmp 0x408392
mov eax, 0x40dc66
jmp 0x408392