Function at 0x408df5
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x5c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x34], 0xffffffff
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0xffffffff
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x30], 0xffffffff
mov dword [eax], 0xffffffff
mov dword [ebp - 0x24], 0xc
mov dword [ebp - 0x1c], 1
mov dword [esp], 0xfffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push edi
mov ebx, eax
lea edi, [ebp - 0x34]
call esi
mov dword [ebp - 0x3c], eax
call esi
xor edx, edx
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x3c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [ebp - 0x40], eax
call eax
sub esp, 0x1c
test eax, eax
jne 0x408f49
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp eax, 6
jne 0x408f2f
xor ecx, ecx
xor ebx, ebx
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], 3
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x42ae06
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x408f2f
call esi
mov dword [ebp - 0x44], eax
call esi
xor edx, edx
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x44]
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
sub esp, 0x1c
test eax, eax
jne 0x408f2f
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
cmp dword [ebp - 0x34], 0xffffffff
jne 0x408f49
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], str.windows32_openpipe:_DuplicateHandle_In__failed__e_lu__n
mov dword [esp + 0xc], eax
jmp 0x409053
mov eax, dword [ebp + 0xc]
xor edi, edi
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__get_osfhandle]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ebx, eax
call esi
mov dword [ebp - 0x3c], eax
call esi
mov dword [esp + 0x10], edi
lea edi, [ebp - 0x30]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 1
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x3c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [ebp - 0x40], eax
call eax
sub esp, 0x1c
test eax, eax
jne 0x40906d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp eax, 6
jne 0x40903e
xor ecx, ecx
xor ebx, ebx
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], 3
mov dword [esp + 8], 3
mov dword [esp + 4], 0x40000000
mov dword [esp], 0x42ae06
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x40903e
call esi
mov dword [ebp - 0x44], eax
call esi
xor edx, edx
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x44]
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
sub esp, 0x1c
test eax, eax
jne 0x40903e
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x40906d
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], str.windows32_openpipe:_DuplicateHandle_Err__failed__e_lu__n
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], 0x16
mov dword [esp], eax
call fcn.0041215f
or esi, 0xffffffff
jmp 0x409186
xor eax, eax
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x24]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
sub esp, 0x10
test eax, eax
jne 0x4090a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 8], str.CreatePipe___failed__e_lu__n
mov dword [esp + 0xc], eax
jmp 0x409053
mov eax, dword [ebp - 0x30]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call fcn.0041e135
mov ebx, eax
test eax, eax
jne 0x4090df
xor eax, eax
mov dword [esp + 8], str.windows32_openpipe__:_process_init_fd___failed_n
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.0041215f
jmp 0x409065
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0041e173
mov dword [esp], ebx
mov esi, eax
test eax, eax
jne 0x409148
call fcn.0041df7f
mov eax, dword [ebp + 0x10]
xor edi, edi
mov dword [eax], ebx
mov ebx, dword [sym.imp.msvcrt.dll__open_osfhandle]
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov dword [esp + 4], 8
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call ebx
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
jmp 0x409186
call fcn.0041e9e2
mov eax, dword [ebp - 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x409161
mov dword [esp], eax
call ebx
push esi
mov eax, dword [ebp - 0x30]
cmp eax, 0xffffffff
je 0x40916f
mov dword [esp], eax
call ebx
push ecx
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call ebx
push eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call ebx
push edx
jmp 0x409065
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret