Function at 0x404ca0
Capabilities:
Create pipe
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x463318
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7d0
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
push ebx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x14]
push edx
mov byte [ebp - 4], 3
mov dword [ebp - 0x30], 0xc
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x404d35
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x469ea0
lea ecx, [ebp - 0x158]
call fcn.00443bf0
mov esi, eax
push 0x47c164
lea eax, [ebp - 0x464]
mov ecx, 0x41
lea edi, [ebp - 0x464]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0044777e
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [ebp - 0x18]
push 2
push ebx
push ebx
lea ecx, [ebp - 0x1c]
push ecx
call edi
push eax
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x404d8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x469e90
lea ecx, [ebp - 0x158]
call fcn.00443bf0
push 0x47c164
lea edx, [ebp - 0x25c]
mov esi, eax
mov ecx, 0x41
lea edi, [ebp - 0x25c]
push edx
rep movsd dword es:[edi], dword [esi]
call fcn.0044777e
mov eax, dword [ebp - 0x18]
cmp eax, ebx
mov byte [ebp - 4], 2
je 0x404da0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
push eax
push str.inPipe_p
push 0x487a58
call fcn.004014b0
add esp, 0xc
push ebx
lea ecx, [ebp - 0x20]
call fcn.00404910
mov ecx, dword [ebp - 0x20]
push str._sockpipe
push ecx
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.00416eb0
push ebx
push 0xffffffffffffffff
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 5
mov byte [ebp - 0x40], 1
call fcn.00416f80
push str.duplicating_socket
push 0x487a58
call fcn.004014b0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov edx, dword [ebp - 0x4c]
mov eax, dword [eax + 0x18]
add esp, 8
lea ecx, [ebp - 0x7dc]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_WSADuplicateSocketA]
cmp eax, 0xffffffff
jne 0x404e50
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.DuplicateSocket
lea ecx, [ebp - 0x158]
call fcn.00443bf0
mov esi, eax
push 0x47c164
lea eax, [ebp - 0x360]
mov ecx, 0x41
lea edi, [ebp - 0x360]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0044777e
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x48]
push ecx
push ebx
push 0x400
push edx
call dword [sym.imp.USER32.dll_PostThreadMessageA]
mov edx, dword [ebp - 0x1c]
push ebx
lea eax, [ebp - 0x24]
push eax
push 0x174
lea ecx, [ebp - 0x7dc]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404eba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x469e48
lea ecx, [ebp - 0x158]
call fcn.00443bf0
mov esi, eax
push 0x47c164
lea eax, [ebp - 0x568]
mov ecx, 0x41
lea edi, [ebp - 0x568]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0044777e
cmp dword [ebp - 0x24], 0x174
je 0x404ef3
push str.short_write
lea ecx, [ebp - 0x154]
call fcn.004012a0
mov esi, eax
mov ecx, 0x40
lea edi, [ebp - 0x668]
rep movsd dword es:[edi], dword [esi]
push 0x47bc3c
lea ecx, [ebp - 0x668]
push ecx
call fcn.0044777e
push str.detaching_viewer
push 0x487a58
call fcn.004014b0
add esp, 8
lea ecx, [ebp - 0x54]
call fcn.00416dd0
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.00416f20
mov edx, dword [ebp - 0x20]
push edx
call fcn.004470fd
add esp, 4
lea ecx, [ebp - 0x1c]
call fcn.00454940
lea ecx, [ebp - 0x14]
call fcn.00454940
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret