Function at 0x401fbd
Capabilities:
Create pipe

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0x94
mov eax, dword [0x441438]
xor eax, ebp
mov dword [ebp + 0x68], eax
mov eax, dword [ebp + 0x7c]
push ebx
xor ebx, ebx
cmp eax, ebx
mov dword [ebp + 0x24], eax
mov dword [ebp + 0x30], ebx
mov dword [ebp + 0x28], ebx
mov dword [ebp + 0x2c], ebx
mov dword [ebp + 0x34], ebx
jne 0x401ff5
mov eax, 0x80070057
jmp 0x4022d9
push esi
push edi
push 0x30
call fcn.00403966
cmp eax, ebx
pop ecx
je 0x40200e
mov ecx, eax
call fcn.004018df
mov edi, eax
jmp 0x402010
xor edi, edi
cmp edi, ebx
jne 0x402020
mov dword [ebp + 0x38], 0xe
jmp 0x402255
mov esi, dword [ebp + 0x74]
cmp esi, ebx
mov dword [edi + 4], esi
je 0x402035
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp + 0x3c], eax
jmp 0x402049
lea eax, [ebp + 0x3c]
push eax
call fcn.00401cec
cmp eax, ebx
mov dword [ebp + 0x38], eax
jne 0x402255
push dword [ebp + 0x3c]
lea eax, [ebp + 0x44]
push str..pipe_08x
push 0x12
push eax
call fcn.00401e62
add esp, 0x10
cmp esi, ebx
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
je 0x40220e
mov byte [ebp + 0x3c], bl
mov byte [ebp + 0x3d], bl
mov byte [ebp + 0x3e], bl
mov byte [ebp + 0x3f], bl
mov byte [ebp + 0x40], bl
mov byte [ebp + 0x41], 5
call esi
lea eax, [ebp + 0x30]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 2
push 1
lea eax, [ebp + 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4020bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov dword [ebp + 0x38], 0x507
je 0x4020b4
mov dword [ebp + 0x38], eax
mov dword [ebp + 0x30], ebx
jmp 0x402271
push 0x40
lea eax, [ebp - 0x28]
push ebx
push eax
call fcn.004039d0
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0xc], eax
add esp, 0xc
lea eax, [ebp + 0x28]
push eax
mov dword [ebp - 0x28], 0x1fffff
mov dword [ebp - 0x24], 3
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], 5
call fcn.00401b65
cmp eax, ebx
mov dword [ebp + 0x38], eax
jne 0x402255
mov ecx, dword [ebp + 0x28]
push 2
pop eax
mov dword [ebp + 0x14], ecx
lea ecx, [ebp + 0x2c]
push ecx
push ebx
lea ecx, [ebp - 0x28]
push ecx
push eax
mov dword [ebp - 8], 0xc0000000
mov dword [ebp - 4], eax
mov dword [ebp], ebx
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ebx
mov dword [ebp + 0x10], eax
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
cmp eax, ebx
mov dword [ebp + 0x38], eax
jne 0x402255
push ebx
call esi
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp + 0x34], eax
jne 0x40216f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jne 0x402167
mov dword [ebp + 0x38], 0x507
jmp 0x402255
mov dword [ebp + 0x38], eax
jmp 0x402255
push ebx
call esi
push 1
push dword [ebp + 0x34]
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x402151
push ebx
call esi
push 1
push dword [ebp + 0x2c]
push 1
push dword [ebp + 0x34]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x402151
mov eax, dword [ebp + 0x34]
push ebx
mov dword [ebp + 0x18], 0xc
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x20], ebx
call esi
lea eax, [ebp + 0x18]
push eax
push 0x1388
mov eax, 0x400
push eax
push eax
push 1
push 6
push 0x40080003
lea eax, [ebp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [edi + 8], eax
cmp eax, 0xffffffff
je 0x402151
push ebx
call esi
push ebx
xor esi, esi
inc esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [edi + 0x24], eax
je 0x402151
mov dword [edi + 0x1c], eax
mov eax, dword [ebp + 0x78]
cmp eax, ebx
mov dword [ebp + 0x38], ebx
je 0x402252
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 2
jmp 0x402255
call esi
push ebx
push 0x40000000
push 3
push ebx
push ebx
push 0xc0000000
lea eax, [ebp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [edi + 8], eax
je 0x402151
push ebx
mov dword [ebp + 0x3c], 2
call esi
push ebx
push ebx
lea eax, [ebp + 0x3c]
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jmp 0x4021d4
mov dword [edi + 0x2c], esi
cmp dword [ebp + 0x30], ebx
je 0x402263
push dword [ebp + 0x30]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp + 0x28], ebx
je 0x402271
push dword [ebp + 0x28]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x2c], ebx
je 0x40227f
push dword [ebp + 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x34], ebx
je 0x40228d
push dword [ebp + 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x38], ebx
je 0x4022c1
cmp edi, ebx
je 0x4022c1
mov eax, dword [edi + 8]
cmp eax, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4022a7
push eax
call esi
mov eax, dword [edi + 0x24]
cmp eax, ebx
je 0x4022b1
push eax
call esi
mov ecx, edi
call fcn.00402898
push edi
call fcn.004034a9
pop ecx
xor edi, edi
mov eax, dword [ebp + 0x24]
mov dword [eax], edi
mov eax, dword [ebp + 0x38]
cmp eax, ebx
pop edi
pop esi
jle 0x4022d9
and eax, 0xffff
or eax, 0x80070000
mov ecx, dword [ebp + 0x68]
xor ecx, ebp
pop ebx
call fcn.0040349a
add ebp, 0x6c
leave
ret 0xc