Function at 0x4020ad
Capabilities:
Create pipe

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x441438]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
xor ebx, ebx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x38], ebx
cmp eax, ebx
jne 0x4020e5
mov eax, 0x80070057
jmp 0x4023d6
push esi
push edi
push 0x30
call fcn.00403abb
pop ecx
cmp eax, ebx
je 0x4020fe
mov ecx, eax
call fcn.00401920
mov edi, eax
jmp 0x402100
xor edi, edi
cmp edi, ebx
jne 0x402110
mov dword [ebp - 0x34], 0xe
jmp 0x402357
mov esi, dword [ebp + 8]
mov dword [edi + 4], esi
cmp esi, ebx
je 0x402125
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x30], eax
jmp 0x402139
lea eax, [ebp - 0x30]
push eax
call fcn.00401d3b
mov dword [ebp - 0x34], eax
cmp eax, ebx
jne 0x402357
push dword [ebp - 0x30]
lea eax, [ebp - 0x28]
push str..pipe_08x
push 0x12
push eax
call fcn.00401ef3
add esp, 0x10
cmp esi, ebx
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
je 0x402310
mov byte [ebp - 0x30], bl
mov byte [ebp - 0x2f], bl
mov byte [ebp - 0x2e], bl
mov byte [ebp - 0x2d], bl
mov byte [ebp - 0x2c], bl
mov byte [ebp - 0x2b], 5
call esi
lea eax, [ebp - 0x3c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 2
push 1
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4021ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], 0x507
cmp eax, ebx
je 0x4021a4
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], ebx
jmp 0x402373
push 0x40
lea eax, [ebp - 0x94]
push ebx
push eax
call fcn.00403b20
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x78], eax
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
mov dword [ebp - 0x94], 0x1fffff
mov dword [ebp - 0x90], 3
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], 5
call fcn.00401bb2
mov dword [ebp - 0x34], eax
cmp eax, ebx
jne 0x402357
mov ecx, dword [ebp - 0x44]
push 2
pop eax
mov dword [ebp - 0x58], ecx
lea ecx, [ebp - 0x40]
push ecx
push ebx
lea ecx, [ebp - 0x94]
push ecx
push eax
mov dword [ebp - 0x74], 0xc0000000
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], eax
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
mov dword [ebp - 0x34], eax
cmp eax, ebx
jne 0x402357
push ebx
call esi
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x38], eax
cmp eax, ebx
jne 0x402271
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jne 0x402269
mov dword [ebp - 0x34], 0x507
jmp 0x402357
mov dword [ebp - 0x34], eax
jmp 0x402357
push ebx
call esi
push 1
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x402253
push ebx
call esi
push 1
push dword [ebp - 0x40]
push 1
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x402253
mov eax, dword [ebp - 0x38]
push ebx
mov dword [ebp - 0x54], 0xc
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], ebx
call esi
lea eax, [ebp - 0x54]
push eax
push 0x1388
mov eax, 0x400
push eax
push eax
push 1
push 6
push 0x40080003
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [edi + 8], eax
cmp eax, 0xffffffff
je 0x402253
push ebx
call esi
push ebx
xor esi, esi
inc esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x24], eax
cmp eax, ebx
je 0x402253
mov dword [edi + 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], ebx
cmp eax, ebx
je 0x402354
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 2
jmp 0x402357
call esi
push ebx
push 0x40000000
push 3
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi + 8], eax
cmp eax, 0xffffffff
je 0x402253
push ebx
mov dword [ebp - 0x30], 2
call esi
push ebx
push ebx
lea eax, [ebp - 0x30]
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jmp 0x4022d6
mov dword [edi + 0x2c], esi
cmp dword [ebp - 0x3c], ebx
je 0x402365
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x44], ebx
je 0x402373
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x40], ebx
je 0x402381
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x38], ebx
je 0x40238f
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x34], ebx
je 0x4023be
cmp edi, ebx
je 0x4023be
mov eax, dword [edi + 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x4023a9
push eax
call esi
mov eax, dword [edi + 0x24]
cmp eax, ebx
je 0x4023b3
push eax
call esi
push 1
mov ecx, edi
call fcn.00401f4c
xor edi, edi
mov eax, dword [ebp - 0x48]
mov dword [eax], edi
mov eax, dword [ebp - 0x34]
cmp eax, ebx
pop edi
pop esi
jle 0x4023d6
and eax, 0xffff
or eax, 0x80070000
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004036a2
leave
ret 0xc