Function at 0x4b9766
Capabilities:
Create pipe

Disassembly:
push 0x2c
push 0x4ef468
call fcn.0046af40
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x4b97a4
call fcn.004782a9
and dword [eax], 0
call fcn.004782bc
mov dword [eax], 0x16
call fcn.004ae2e1
or eax, 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
lea eax, [ecx + 4]
mov dword [ebp - 0x30], eax
or edi, 0xffffffff
mov dword [eax], edi
mov dword [ecx], edi
mov ecx, dword [ebp + 0x10]
test ecx, 0xffff3f7f
je 0x4b97d8
call fcn.004782a9
and dword [eax], 0
call fcn.004782bc
mov dword [eax], 0x16
call fcn.004ae2e1
mov eax, edi
jmp 0x4b9794
mov eax, ecx
mov edx, 0xc000
and eax, edx
cmp eax, edx
je 0x4b97bc
mov dword [ebp - 0x3c], 0xc
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov eax, ecx
shr eax, 7
not eax
and eax, 1
mov dword [ebp - 0x34], eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x4b9826
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00478262
pop ecx
jmp 0x4b97d4
call fcn.004c423e
mov esi, eax
mov dword [ebp - 0x24], esi
cmp esi, edi
jne 0x4b985d
call fcn.004782bc
mov dword [eax], 0x18
call fcn.004782a9
mov dword [eax], ebx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4b97d4
mov dword [ebp - 4], ebx
mov edx, esi
sar edx, 6
mov eax, esi
and eax, 0x3f
imul ecx, eax, 0x38
mov eax, dword [edx*4 + 0x4f2ce8]
mov byte [ecx + eax + 0x28], 0x89
mov eax, dword [edx*4 + 0x4f2ce8]
mov byte [eax + ecx + 0x29], bl
mov eax, dword [edx*4 + 0x4f2ce8]
and byte [eax + ecx + 0x2d], 0xfe
mov dword [ebp - 4], 0xfffffffe
call fcn.004b98cb
call fcn.004c423e
mov dword [ebp - 0x28], eax
cmp eax, edi
jne 0x4b98d3
mov eax, esi
sar eax, 6
and esi, 0x3f
imul ecx, esi, 0x38
mov eax, dword [eax*4 + 0x4f2ce8]
mov byte [eax + ecx + 0x28], bl
jmp 0x4b9834
mov dword [ebp - 4], 1
mov edi, dword [ebp - 0x28]
mov edx, edi
sar edx, 6
mov eax, edi
and eax, 0x3f
imul ecx, eax, 0x38
mov eax, dword [edx*4 + 0x4f2ce8]
mov byte [ecx + eax + 0x28], 0x89
mov eax, dword [edx*4 + 0x4f2ce8]
mov byte [ecx + eax + 0x29], bl
mov eax, dword [edx*4 + 0x4f2ce8]
and byte [ecx + eax + 0x2d], 0xfe
mov dword [ebp - 4], 0xfffffffe
call fcn.004b99dd
mov dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x2c]
push eax
call fcn.00490c24
pop ecx
test eax, eax
jne 0x4b99e5
mov eax, 0x8000
mov ebx, dword [ebp + 0x10]
test eax, ebx
jne 0x4b9947
test ebx, 0x4000
jne 0x4b9979
cmp dword [ebp - 0x2c], eax
jne 0x4b9979
mov edx, esi
sar edx, 6
mov eax, esi
and eax, 0x3f
imul ecx, eax, 0x38
mov eax, dword [edx*4 + 0x4f2ce8]
and byte [eax + ecx + 0x28], 0x7f
mov edx, edi
sar edx, 6
mov eax, edi
and eax, 0x3f
imul ecx, eax, 0x38
mov eax, dword [edx*4 + 0x4f2ce8]
and byte [eax + ecx + 0x28], 0x7f
test bl, bl
jns 0x4b99af
mov edx, esi
sar edx, 6
mov eax, esi
and eax, 0x3f
imul ecx, eax, 0x38
mov eax, dword [edx*4 + 0x4f2ce8]
or byte [eax + ecx + 0x28], 0x10
mov edx, edi
sar edx, 6
mov eax, edi
and eax, 0x3f
imul ecx, eax, 0x38
mov eax, dword [edx*4 + 0x4f2ce8]
or byte [eax + ecx + 0x28], 0x10
push dword [ebp - 0x1c]
push esi
call fcn.004c4189
push dword [ebp - 0x20]
push edi
call fcn.004c4189
add esp, 0x10
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov eax, dword [ebp - 0x30]
mov dword [eax], edi
xor eax, eax
jmp 0x4b9794
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004ae30e
int3