Function at 0x405020
Capabilities:
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430768
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x448178]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
push 0
lea ecx, [ebp - 0x28]
mov byte [esi + 0xc], 0
mov dword [ebp - 0x2c], vtable.MA::StringT_wchar_t__char_.0
call fcn.004033f0
push 0x7ffffffe
push str..pipeS
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.0040a930
mov dword [ebp - 4], 1
mov edi, dword [ebp + 8]
push edi
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00409ed0
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], vtable.MA::StringT_wchar_t__char_.0
test ecx, ecx
je 0x4050b4
mov eax, dword [ecx + 4]
add ecx, 4
mov eax, dword [eax + 8]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0xc]
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x34], vtable.MA::StringT_wchar_t__char_.0
call fcn.004033f0
push 0x7ffffffe
push str..pipeN
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 4
call fcn.0040a930
push edi
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 5
call fcn.00409ed0
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x34], vtable.MA::StringT_wchar_t__char_.0
test ecx, ecx
je 0x40510e
mov eax, dword [ecx + 4]
add ecx, 4
mov eax, dword [eax + 8]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0xc]
mov edi, dword [ebp + 8]
mov byte [esi + 0xd], 0
xor ebx, ebx
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov eax, dword [ecx]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0x18]
push 0
push 0
push 0x1000
push 0x1000
push 0xff
push 7
push 0x40003
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x405361
mov ecx, eax
call fcn.00405640
mov eax, 0x218
mov dword [ebp + 8], eax
cmp eax, 0x218
jne 0x4051e4
push 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov esi, eax
test esi, esi
jne 0x4051d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
cmp eax, 0x217
je 0x4051d6
mov esi, dword [ebp - 0x14]
xor edi, edi
cmp byte [esi + 0xc], 0
je 0x4051c0
mov ecx, esi
call fcn.004054c0
test eax, eax
jne 0x4051c6
mov byte [esi + 0xd], 1
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
cmp byte [esi + 0xd], bl
je 0x405117
jmp 0x40533c
inc ebx
cmp ebx, 0x64
jg 0x4051a3
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 8]
jmp 0x405165
mov eax, dword [ebp + 8]
test esi, esi
mov esi, dword [ebp - 0x14]
mov edi, 1
jne 0x4051e8
jmp 0x405165
test edi, edi
je 0x4051a7
mov ebx, dword [ebp - 0x18]
push 0
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
mov dword [ebp - 0x20], 2
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
je 0x405335
mov ecx, dword [ebp - 0x38]
add ecx, 4
mov eax, dword [ecx]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0x18]
push 0
push 0
push 0x1000
push 0x1000
push 0xff
push 5
push 0x40003
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x405335
mov esi, eax
mov ecx, esi
call fcn.00405640
mov ebx, 0x218
mov dword [ebp - 0x1c], 0
lea ecx, [ecx]
cmp ebx, 0x218
jne 0x4052b4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov esi, eax
test esi, esi
jne 0x4052a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0x217
je 0x4052a6
mov esi, dword [ebp - 0x1c]
inc esi
xor edi, edi
mov dword [ebp - 0x1c], esi
cmp esi, 0x64
jg 0x40531c
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [ebp + 8]
jmp 0x405260
test esi, esi
mov esi, dword [ebp + 8]
mov edi, 1
je 0x405260
jmp 0x4052b8
test edi, edi
je 0x40531f
mov ebx, dword [ebp - 0x14]
lea esi, [ebx + 0x40]
push esi
mov dword [ebp - 0x1c], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 8
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 0x18]
lea edx, [ebx + 0x38]
lea ecx, [ebp - 0x24]
call fcn.004011f0
add esp, 8
lea ecx, [ebx + 0x10]
mov byte [ebp - 4], 9
mov edx, dword [ecx]
push eax
call dword [edx + 0x50]
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x405305
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0xc]
push esi
mov byte [ebx + 0xc], 1
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x14]
jmp 0x4051b0
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
push dword [ebp - 0x18]
call ebx
mov esi, dword [ebp - 0x14]
jmp 0x4051b0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 0x40
push esi
mov dword [ebp + 8], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x14]
add ecx, 0x10
mov byte [ebp - 4], 0xa
mov eax, dword [ecx]
push 0
call dword [eax + 0x34]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x3c], vtable.MA::StringT_wchar_t__char_.0
test ecx, ecx
je 0x405383
mov eax, dword [ecx + 4]
add ecx, 4
mov eax, dword [eax + 8]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x44], vtable.MA::StringT_wchar_t__char_.0
test ecx, ecx
je 0x4053a8
mov eax, dword [ecx + 4]
add ecx, 4
mov eax, dword [eax + 8]
add ecx, eax
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4