Function at 0x405ed0
Capabilities:
Connect pipe

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x180
mov dword [ebp - 0x164], eax
test byte [0x418090], 8
mov dword [ebp - 0x168], edx
mov dword [ebp - 0x160], ecx
jne 0x406102
mov edi, dword [ebp - 0x164]
lea ebx, [ebp - 0x14c]
mov eax, dword [edi + 0x24]
mov dword [esp + 4], ebx
mov dword [ebp - 0x13c], eax
mov eax, dword [edi + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ConnectNamedPipe]
test eax, eax
push esi
push esi
jne 0x405f46
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x3e5
je 0x406210
cmp dword [eax + 0x34], 0x217
jne 0x4061d5
mov edx, dword [ebp - 0x160]
mov bx, word [edx]
test bx, bx
je 0x4063b9
add edx, 2
cmp word [edx], 0
jne 0x405f58
mov esi, dword [ebp - 0x160]
sub edx, esi
sar edx, 1
inc edx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x158], edx
test ecx, ecx
je 0x405fb5
mov ecx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
lea edi, [ecx + edi*4]
lea esi, [esi]
mov esi, dword [ecx]
cmp word [esi], 0
je 0x4060f0
mov eax, esi
nop
add eax, 2
cmp word [eax], 0
jne 0x405f98
sub eax, esi
sar eax, 1
inc eax
add edx, eax
add ecx, 4
mov dword [ebp - 0x158], edx
cmp edi, ecx
jne 0x405f88
lea eax, [edx + edx + 2]
mov dword [esp], eax
mov dword [ebp - 0x16c], eax
mov dword [ebp - 0x158], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x4064d4
mov ecx, ebx
mov edx, dword [ebp - 0x160]
jmp 0x405feb
mov cx, word [edx]
add eax, 2
add edx, 2
test cx, cx
mov word [eax - 2], cx
jne 0x405fe8
test bx, bx
je 0x4063af
mov eax, dword [ebp - 0x160]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x406010
mov edx, dword [ebp - 0x160]
sub eax, edx
lea ecx, [eax + 2]
mov eax, dword [ebp + 0xc]
add ecx, edi
test eax, eax
je 0x406083
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
lea eax, [esi + eax*4]
mov dword [ebp - 0x15c], eax
lea esi, [esi]
mov ebx, dword [esi]
xor eax, eax
lea esi, [esi]
mov dx, word [ebx + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x406048
cmp word [ecx], 0
je 0x4060e8
mov eax, ecx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x406068
sub eax, ecx
add eax, 2
add esi, 4
add ecx, eax
cmp dword [ebp - 0x15c], esi
jne 0x406040
lea eax, [ebp - 0x138]
mov word [ecx], 0
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x16c]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x160]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x168]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x164]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov dword [esp], eax
mov ebx, 0x41d
call fcn.004033d0
test eax, eax
jne 0x4060fa
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 2
jmp 0x406076
mov eax, 1
jmp 0x405fa6
mov ebx, dword [ebp - 0x138]
jmp 0x4060d3
mov eax, ecx
test ecx, ecx
je 0x4063cb
shr eax, 0x10
je 0x4062a5
mov ebx, dword [ebp - 0x160]
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
test eax, eax
push edi
push edi
jne 0x4063d5
mov ax, word [ebx]
test ax, ax
je 0x4063df
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x406148
mov word [ebp - 0x138], 0x224c
mov esi, dword [ebp - 0x160]
lea ecx, [ebp - 0x136]
lea edi, [ebp - 0x16]
jmp 0x4061a8
cmp ax, 9
je 0x406378
cmp ax, 0xa
jne 0x40630e
mov word [ecx], 0x6e5c
add ecx, 2
lea esi, [esi]
nop
lea ebx, [edx - 1]
test edx, edx
jle 0x406385
cmp ecx, edi
ja 0x406385
mov ax, word [esi]
mov edx, ebx
add esi, 2
cmp ax, 0xd
je 0x40636b
jbe 0x40616f
cmp ax, 0x22
je 0x40635e
cmp ax, 0x5c
jne 0x406301
mov word [ecx], 0x5c5c
add ecx, 2
jmp 0x406190
test byte [0x418090], 2
mov ebx, 0x41d
je 0x4060dc
mov dword [esp + 0xc], str.pipe_connect_failed_n
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x418090
mov dword [esp], 1
call fcn.00405e80
jmp 0x4060dc
mov edi, dword [ebp - 0x164]
mov eax, dword [edi + 0x24]
mov dword [ebp - 0x154], eax
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x150], eax
mov eax, dword [0x41808c]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x154]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 2
call dword [sym.imp.kernel32.dll_WaitForMultipleObjects]
sub esp, 0x10
test eax, eax
jne 0x4063fa
lea eax, [ebp - 0x158]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x164]
mov dword [esp + 4], ebx
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetOverlappedResult]
sub esp, 0x10
test eax, eax
jne 0x405f46
test byte [0x418090], 2
jne 0x406412
mov ebx, 0x41d
jmp 0x4060dc
mov eax, ecx
mov dword [esp], 0x41ac20
and eax, 0xffff
mov dword [esp + 4], eax
call fcn.00405d50
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edi
mov eax, dword [ebp - 0x164]
mov edi, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edi
mov dword [esp + 0xc], str._p__s__p__ld_n
mov dword [esp + 8], str.process_send_start_message
mov dword [esp + 4], 0x418090
mov dword [esp], 3
call fcn.00405e80
jmp 0x405efb
lea ebx, [eax - 0x20]
cmp bx, 0x5e
jbe 0x4063c3
mov ebx, eax
mov byte [ecx], 0x5c
shr bx, 0xc
add ecx, 5
and ebx, 0xffff
mov bl, byte [ebx + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 4], bl
mov ebx, eax
shr bx, 8
and ebx, 0xf
mov bl, byte [ebx + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 3], bl
mov ebx, eax
shr bx, 4
and eax, 0xf
and ebx, 0xf
mov al, byte [eax + str.0123456789abcdefvalidate_service_config]
mov bl, byte [ebx + str.0123456789abcdefvalidate_service_config]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x406190
mov word [ecx], 0x225c
add ecx, 2
jmp 0x406190
mov word [ecx], 0x725c
add ecx, 2
jmp 0x406190
mov word [ecx], 0x745c
add ecx, 2
jmp 0x406190
mov byte [ecx], 0x22
test ebx, ebx
jle 0x4063f5
lea eax, [ecx + 4]
mov word [ecx + 1], 0x2e2e
mov byte [ecx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x138]
mov dword [esp], eax
call fcn.004164a0
jmp 0x4062bc
mov ecx, 2
jmp 0x406024
mov edx, 1
jmp 0x405f6c
mov byte [ecx], al
inc ecx
jmp 0x406190
mov eax, 0x41ac26
jmp 0x4062bc
mov eax, 0x41ac2d
jmp 0x4062bc
mov word [ebp - 0x138], 0x224c
mov byte [ebp - 0x136], 0x22
lea ecx, [ebp - 0x136]
lea eax, [ecx + 1]
jmp 0x406399
mov eax, dword [ebp - 0x164]
mov eax, dword [eax + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CancelIo]
push ecx
jmp 0x40625b
mov eax, dword [ebp - 0x160]
test eax, eax
je 0x4065f3
shr eax, 0x10
je 0x4065cf
mov edi, dword [ebp - 0x160]
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
test eax, eax
push edx
push edx
jne 0x4065ec
mov dx, word [edi]
test dx, dx
je 0x4065b4
mov ecx, eax
mov edi, dword [ebp - 0x160]
lea eax, [eax + 1]
cmp word [edi + ecx*2 + 2], 0
jne 0x406456
mov word [ebp - 0x138], 0x224c
lea eax, [ebp - 0x136]
lea esi, [ebp - 0x16]
mov edi, dword [ebp - 0x160]
jmp 0x4064af
cmp dx, 9
je 0x4064ea
cmp dx, 0xa
jne 0x4064fd
mov word [eax], 0x6e5c
add eax, 2
lea ebx, [ecx - 1]
cmp eax, esi
ja 0x406562
test ecx, ecx
jle 0x406562
mov dx, word [edi]
mov ecx, ebx
add edi, 2
cmp dx, 0xd
je 0x4064e0
jbe 0x406483
cmp dx, 0x22
je 0x40654d
cmp dx, 0x5c
jne 0x4064f4
mov word [eax], 0x5c5c
add eax, 2
jmp 0x406497
mov ebx, 0x46a
jmp 0x4060dc
mov word [eax], 0x725c
add eax, 2
jmp 0x406497
mov word [eax], 0x745c
add eax, 2
jmp 0x406497
lea ebx, [edx - 0x20]
cmp bx, 0x5e
jbe 0x40655a
mov ebx, edx
mov byte [eax], 0x5c
shr bx, 0xc
add eax, 5
and ebx, 0xffff
mov bl, byte [ebx + str.0123456789abcdefvalidate_service_config]
mov byte [eax - 4], bl
mov ebx, edx
shr bx, 8
and ebx, 0xf
mov bl, byte [ebx + str.0123456789abcdefvalidate_service_config]
mov byte [eax - 3], bl
mov ebx, edx
shr bx, 4
and edx, 0xf
and ebx, 0xf
mov bl, byte [ebx + str.0123456789abcdefvalidate_service_config]
mov byte [eax - 2], bl
mov bl, byte [edx + str.0123456789abcdefvalidate_service_config]
mov byte [eax - 1], bl
jmp 0x406497
mov word [eax], 0x225c
add eax, 2
jmp 0x406497
mov byte [eax], dl
inc eax
jmp 0x406497
mov byte [eax], 0x22
test ebx, ebx
jle 0x4065ca
lea edx, [eax + 4]
mov word [eax + 1], 0x2e2e
mov byte [eax + 3], 0x2e
lea eax, [ebp - 0x138]
mov byte [edx], 0
mov dword [esp], eax
call fcn.004164a0
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], 0x418090
mov dword [esp], 1
call fcn.00405e80
jmp 0x40629b
mov word [ebp - 0x138], 0x224c
mov byte [ebp - 0x136], 0x22
lea eax, [ebp - 0x136]
lea edx, [eax + 1]
jmp 0x406576
mov eax, dword [ebp - 0x160]
mov dword [esp], 0x41ac20
and eax, 0xffff
mov dword [esp + 4], eax
call fcn.00405d50
jmp 0x406587
mov eax, 0x41ac2d
jmp 0x406587
mov eax, 0x41ac26
jmp 0x406587