Function at 0x10012fd2
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push esi
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x10013003
mov byte [ebp - 1], 0
movzx eax, byte [ebp - 1]
test eax, eax
je 0x10012ffe
push 0x16f6
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreatePipe]
jmp 0x100131af
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 8]
push dword [eax]
mov ecx, dword [ebp - 0xc]
call fcn.1001778d
cmp dword [eax], 0
jne 0x100131a0
push 1
mov ecx, dword [ebp - 0xc]
call fcn.1001778d
cmp dword [eax], 0
je 0x10013068
push 0xfffffffffffffffa
pop eax
test eax, eax
je 0x10013068
mov dword [ebp - 0x14], 1
jmp 0x1001306c
and dword [ebp - 0x14], 0
mov eax, dword [ebp - 8]
push dword [eax]
mov ecx, dword [ebp - 0xc]
call fcn.1001778d
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax]
jne 0x10013089
mov dword [ebp - 0x18], 1
jmp 0x1001308d
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp dword [ebp - 0x18], eax
jle 0x100130a0
mov dword [ebp - 0x1c], 1
jmp 0x100130a4
and dword [ebp - 0x1c], 0
cmp dword [ebp - 0x1c], 6
jbe 0x100130bb
mov eax, dword [ebp - 8]
cmp dword [eax], 0
je 0x100130bb
mov dword [ebp - 0x10], 1
jmp 0x100130bf
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov esi, dword [ebp - 0x10]
add esi, 0x856d
mov eax, dword [ebp - 8]
push dword [eax]
mov ecx, dword [ebp - 0xc]
call fcn.1001778d
cmp esi, dword [eax]
jge 0x100130ea
mov dword [ebp - 0x20], 1
jmp 0x100130ee
and dword [ebp - 0x20], 0
mov eax, dword [ebp - 8]
push dword [eax]
mov ecx, dword [ebp - 0xc]
call fcn.1001778d
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [eax]
jge 0x1001310b
mov dword [ebp - 0x24], 1
jmp 0x1001310f
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 8]
push dword [eax]
mov ecx, dword [ebp - 0xc]
call fcn.1001778d
mov ecx, dword [ebp - 0x24]
add ecx, dword [eax]
jne 0x10013138
push 0
mov ecx, dword [ebp - 0xc]
call fcn.1001778d
cmp dword [eax], 0
jne 0x10013138
and dword [ebp - 0x28], 0
jmp 0x1001313f
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp dword [ebp - 0x28], eax
jl 0x10013152
mov dword [ebp - 0x2c], 1
jmp 0x10013156
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x2c]
jl 0x10013169
mov dword [ebp - 0x30], 1
jmp 0x1001316d
and dword [ebp - 0x30], 0
cmp dword [ebp - 0x30], 0x9a92
jg 0x1001317f
mov dword [ebp - 0x34], 1
jmp 0x10013183
and dword [ebp - 0x34], 0
mov eax, dword [ebp - 8]
push dword [eax]
mov ecx, dword [ebp - 0xc]
call fcn.1001778d
mov ecx, dword [ebp - 0x34]
imul ecx, dword [eax]
test ecx, ecx
jne 0x100131a0
and dword [ebp - 0x38], 0
jmp 0x100131a7
mov dword [ebp - 0x38], 1
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x38]
mov dword [eax], ecx
pop esi
mov esp, ebp
pop ebp
ret