Function at 0x402593
Capabilities:
Create pipe

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0x94
mov eax, dword [0x44647c]
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 0x4025cb
mov eax, 0x80070057
jmp 0x4028af
push esi
push edi
push 0x30
call fcn.0040429f
cmp eax, ebx
pop ecx
je 0x4025e4
mov ecx, eax
call fcn.00401eb5
mov edi, eax
jmp 0x4025e6
xor edi, edi
cmp edi, ebx
jne 0x4025f6
mov dword [ebp + 0x38], 0xe
jmp 0x40282b
mov esi, dword [ebp + 0x74]
cmp esi, ebx
mov dword [edi + 4], esi
je 0x40260b
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp + 0x3c], eax
jmp 0x40261f
lea eax, [ebp + 0x3c]
push eax
call fcn.004022c2
cmp eax, ebx
mov dword [ebp + 0x38], eax
jne 0x40282b
push dword [ebp + 0x3c]
lea eax, [ebp + 0x44]
push str..pipe_08x
push 0x12
push eax
call fcn.00402438
add esp, 0x10
cmp esi, ebx
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
je 0x4027e4
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 0x402692
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov dword [ebp + 0x38], 0x507
je 0x40268a
mov dword [ebp + 0x38], eax
mov dword [ebp + 0x30], ebx
jmp 0x402847
push 0x40
lea eax, [ebp - 0x28]
push ebx
push eax
call fcn.00404680
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.0040213b
cmp eax, ebx
mov dword [ebp + 0x38], eax
jne 0x40282b
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 0x40282b
push ebx
call esi
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp + 0x34], eax
jne 0x402745
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jne 0x40273d
mov dword [ebp + 0x38], 0x507
jmp 0x40282b
mov dword [ebp + 0x38], eax
jmp 0x40282b
push ebx
call esi
push 1
push dword [ebp + 0x34]
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x402727
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 0x402727
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 0x402727
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 0x402727
mov dword [edi + 0x1c], eax
mov eax, dword [ebp + 0x78]
cmp eax, ebx
mov dword [ebp + 0x38], ebx
je 0x402828
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 2
jmp 0x40282b
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 0x402727
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 0x4027aa
mov dword [edi + 0x2c], esi
cmp dword [ebp + 0x30], ebx
je 0x402839
push dword [ebp + 0x30]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp + 0x28], ebx
je 0x402847
push dword [ebp + 0x28]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x2c], ebx
je 0x402855
push dword [ebp + 0x2c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x34], ebx
je 0x402863
push dword [ebp + 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x38], ebx
je 0x402897
cmp edi, ebx
je 0x402897
mov eax, dword [edi + 8]
cmp eax, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x40287d
push eax
call esi
mov eax, dword [edi + 0x24]
cmp eax, ebx
je 0x402887
push eax
call esi
mov ecx, edi
call fcn.00402e6e
push edi
call fcn.00403f8e
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 0x4028af
and eax, 0xffff
or eax, 0x80070000
mov ecx, dword [ebp + 0x68]
xor ecx, ebp
pop ebx
call fcn.00403a70
add ebp, 0x6c
leave
ret 0xc