Function at 0x46c580
Capabilities:
Connect pipe
Create pipe

Disassembly:
push 0xffffffffffffffff
push 0x4891b4
mov eax, dword fs:[0]
push eax
sub esp, 0x74
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a89e8]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov edi, ecx
xor eax, eax
push eax
push eax
push 1
push eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ebp, eax
mov dword [esp + 0x18], ebp
cmp ebp, 0xffffffff
mov eax, dword [edi + 4]
mov dword [esp + 0x48], ebp
mov dword [esp + 0x1c], ebp
mov ecx, dword [eax + 4]
mov dword [esp + 0x90], 0
mov dword [esp + 0x20], ecx
jne 0x46c63a
push str.Failed_to_create_connection
lea ecx, [esp + 0x50]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x70]
mov byte [esp + 0x94], 1
mov dword [esp + 0x6c], vtable.PRException.0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push 0x4a0a88
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x70], vtable.CMessageException.0
call sub.MSVCR80.dll__CxxThrowException
lea ecx, [esp + 0x2c]
call fcn.0046c360
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], vtable.CLocalFreeGuard.0
mov dword [esp + 0x28], eax
mov ebx, dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov byte [esp + 0x90], 2
cmp dword [edi + 0x20], 0x10
jb 0x46c66c
mov eax, dword [edi + 0xc]
jmp 0x46c66f
lea eax, [edi + 0xc]
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0x1000
push 0x1000
push 0xff
push 6
push 0x40000003
push eax
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x46c78a
lea edx, [esp + 0x38]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x46c6c5
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov edx, dword [eax + 4]
push ecx
push esi
mov ecx, edi
call edx
mov esi, eax
jmp 0x46c701
cmp eax, 0x3e5
jne 0x46c7cf
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x24]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, 0
jne 0x46c739
mov eax, dword [edi + 4]
mov edx, dword [edi]
mov edx, dword [edx + 4]
push eax
push esi
mov ecx, edi
call edx
mov esi, eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test esi, esi
je 0x46c661
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46c718
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
sub eax, 1
je 0x46c709
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Bad_completion_event
lea ecx, [esp + 0x50]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0x94], 4
mov dword [esp + 0x6c], vtable.PRException.0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push 0x4a0a88
lea ecx, [esp + 0x6c]
push ecx
mov dword [esp + 0x70], vtable.CMessageException.0
call sub.MSVCR80.dll__CxxThrowException
push str.Failed_to_create_connection
lea ecx, [esp + 0x50]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x70]
mov byte [esp + 0x94], 3
mov dword [esp + 0x6c], vtable.PRException.0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push 0x4a0a88
lea edx, [esp + 0x6c]
push edx
mov dword [esp + 0x70], vtable.CMessageException.0
call sub.MSVCR80.dll__CxxThrowException
push str.Failed_to_create_connection
lea ecx, [esp + 0x50]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x70]
mov byte [esp + 0x94], 5
mov dword [esp + 0x6c], vtable.PRException.0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push 0x4a0a88
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x70], vtable.CMessageException.0
call sub.MSVCR80.dll__CxxThrowException
int3