Function at 0x415980
Capabilities:
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4253c8
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x441010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x68], ecx
push 0x14
mov dword [ebp - 0x5c], 0
call fcn.00417038
add esp, 4
mov dword [ebp - 0x7c], 0xc
mov esi, eax
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x78], 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], 0
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x415a5f
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x54]
push eax
push 0
push 0
push 1
push dword [ebp - 0x58]
mov dword [ebp - 0x54], 0
call esi
push dword [ebp - 0x54]
call fcn.0041700d
push dword [ebp - 0x54]
mov edi, eax
push 0
push edi
mov dword [ebp - 0x6c], edi
call fcn.00418450
add esp, 0x10
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x54]
push edi
push 1
push dword [ebp - 0x58]
call esi
test eax, eax
jne 0x415a66
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x415d2e
lea eax, [ebp - 0x54]
mov dword [ebp - 0x54], 0
push eax
push 0
push 0
push 5
push dword [ebp - 0x58]
call esi
push dword [ebp - 0x54]
call fcn.0041700d
push dword [ebp - 0x54]
mov esi, eax
push 0
push esi
mov dword [ebp - 0x60], esi
call fcn.00418450
add esp, 0x10
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x54]
push esi
push 5
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x58]
test eax, eax
je 0x415a59
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x18], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 1
lea eax, [ebp - 0x18]
mov word [ebp - 0x14], 0x100
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x415a5f
push dword [edi]
mov edi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
call edi
lea esi, [eax + 0x28]
mov eax, dword [ebp - 0x60]
push dword [eax]
call edi
push dword [ebp - 0x5c]
add eax, 0xfffffffc
add esi, eax
call edi
dec eax
add esi, eax
and esi, 0xfffffffc
push esi
call fcn.0041700d
push esi
mov edi, eax
push 0
push edi
call fcn.00418450
add esp, 0x10
push 4
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov esi, dword [ebp - 0x6c]
push dword [esi]
push 0x1f01ff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x415b55
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
xor al, al
jmp 0x415d2e
mov eax, dword [ebp - 0x60]
push dword [eax]
push 0x1f01ff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
push dword [ebp - 0x5c]
test eax, eax
je 0x415b48
push 0x1f01ff
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x415b45
push 0
push dword [esi]
mov esi, dword [ebp - 0x64]
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
mov eax, dword [ebp - 0x60]
push 0
push dword [eax]
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorGroup]
push 0
push edi
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x415be7
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
lea eax, [ebp - 0x48]
push eax
call fcn.004022e0
add esp, 4
cmp dword [eax + 0x14], 0x10
jb 0x415bca
mov eax, dword [eax]
push eax
push str.err:_s
call fcn.0041889c
add esp, 8
lea ecx, [ebp - 0x48]
call fcn.004016a0
xor al, al
jmp 0x415d2e
mov dword [ebp - 0x78], esi
lea eax, [ebp - 0x4c]
mov esi, dword [ebp - 0x68]
xorps xmm0, xmm0
push eax
movdqu xmmword [ebp - 0x4c], xmm0
mov dword [ebp - 0x34], 0
lea edi, [esi + 0x1c]
movq qword [ebp - 0x3c], xmm0
mov ecx, edi
mov dword [ebp - 0x60], edi
call fcn.00415df0
mov ecx, dword [edi + 4]
mov eax, dword [edi]
push str..pipe_
mov eax, dword [eax + ecx*4 - 4]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x64], eax
call fcn.00401640
push 0xffffffffffffffff
push 0
lea eax, [esi + 4]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x30]
call fcn.00415eb0
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov edx, 2
mov dword [ebp - 0x70], 0
lea esi, [eax + 1]
lea eax, [eax*2 - 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041700d
cmp dword [ebp - 0x1c], 0x10
lea ecx, [ebp - 0x30]
push 0xffffffffffffffff
cmovae ecx, dword [ebp - 0x30]
mov edi, eax
push ecx
push esi
lea eax, [ebp - 0x70]
push edi
push eax
call fcn.00418869
add esp, 0x18
lea eax, [ebp - 0x7c]
push eax
push 0x3e8
push 0
push 0
push 0xff
push 0
push 0x40000003
push edi
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov esi, dword [ebp - 0x64]
push edi
mov dword [esi], eax
call fcn.0041894b
add esp, 4
cmp dword [esi], 0xffffffff
je 0x415cff
mov edi, dword [ebp - 0x68]
lea ecx, [esi + 4]
xorps xmm0, xmm0
movdqu xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
mov eax, dword [edi]
push ecx
push dword [esi]
mov dword [esi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x415d17
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x415d13
cmp eax, 0x3e5
je 0x415d0d
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x60]
call fcn.004162d0
mov byte [ebp - 0x4d], 0
jmp 0x415d23
mov byte [esi + 0x18], 0
jmp 0x415d1f
mov byte [esi + 0x18], 1
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov byte [ebp - 0x4d], 1
lea ecx, [ebp - 0x30]
call fcn.004016a0
mov al, byte [ebp - 0x4d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041796e
mov esp, ebp
pop ebp
ret