Function at 0x10021980
Capabilities:
Create pipe

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x10038115
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x40
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x24], 0
jg 0x10021a63
mov edx, dword [edi + 0x1c]
lea ecx, [edi + 0xc]
mov eax, 0x7ffffffe
sub eax, edx
cmp eax, 9
jb 0x10021c4b
cmp dword [ecx + 0x14], 8
jb 0x100219db
mov ecx, dword [ecx]
push edx
push ecx
push 9
push 0x1003d66c
push ecx
push dword [ebp - 0x14]
lea ecx, [ebp - 0x30]
call fcn.10013260
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
push 0
cmovae eax, dword [ebp - 0x30]
push 0
push 0
push 0
push 1
push 4
push 3
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov ecx, dword [edi + 0x24]
mov esi, eax
cmp esi, ecx
je 0x10021a27
test ecx, ecx
jle 0x10021a24
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x24], esi
mov edx, dword [ebp - 0x1c]
cmp edx, 8
jb 0x10021a63
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10021a59
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10021a59
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.10035360
add esp, 8
call fcn.100017f0
mov esi, eax
mov dword [ebp - 0x20], 0
xor eax, eax
mov dword [ebp - 0x1c], 7
push eax
push 0x1003d668
lea ecx, [ebp - 0x30]
mov word [ebp - 0x30], ax
call fcn.100078a0
mov dword [ebp - 4], 0
cmp dword [esi], 0
jg 0x10021aef
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push 0x1003cec0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [esi]
mov dword [ebp - 0x14], eax
cmp eax, ecx
je 0x10021acd
test ecx, ecx
jle 0x10021ac9
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
mov ecx, eax
test ecx, ecx
jle 0x10021ada
mov dword [esi + 4], 0
jmp 0x10021aef
sub esp, 0x18
lea eax, [ebp - 0x30]
mov ecx, esp
push eax
call fcn.100076d0
mov ecx, esi
call fcn.1001d6a0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
cmp edx, 8
jb 0x10021b32
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10021b28
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10021b28
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.10035360
add esp, 8
call fcn.100017f0
mov ecx, dword [edi]
xorps xmm0, xmm0
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x14], 0
movups xmmword [ebp - 0x40], xmm0
mov edx, dword [ecx + 4]
mov ecx, dword [eax]
cmp ecx, 0xffffffff
jne 0x10021b5f
mov esi, 0xc00000c0
jmp 0x10021c34
mov eax, dword [ebx + 8]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0xc]
push 0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
push eax
push 0x20
lea eax, [ebp - 0x50]
mov dword [ebp - 0x20], edx
push eax
push 0x10
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], 1
push eax
push 0x8005e01c
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x10021b9b
xor esi, esi
jmp 0x10021baf
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0xbf4]
test esi, esi
js 0x10021c34
xorps xmm0, xmm0
mov dword [ebp - 0x40], 0
push 0x28
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
call fcn.10035016
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x3c], eax
mov dword [ebp - 4], 1
call fcn.100017f0
mov ecx, dword [edi]
mov edx, dword [ecx + 4]
lea ecx, [ebp - 0x50]
push ecx
push ecx
lea ecx, [edi + 0xc]
push ecx
push edx
mov ecx, eax
call fcn.1001da40
test eax, eax
js 0x10021c2c
add edi, 4
lea eax, [ebp - 0x3c]
cmp edi, eax
je 0x10021c2c
mov ecx, dword [edi]
mov eax, dword [ebp - 0x3c]
mov edx, dword [edi + 4]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x38]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov dword [ebp - 0x38], edx
lea ecx, [ebp - 0x3c]
call fcn.100220e0
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc
call fcn.10001180
int3