Function at 0x40b450
Capabilities:
Connect pipe
Create pipe
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x46706c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x14
push str..pipeSDMigration
mov ecx, 0x467af0
call fcn.00403ae0
mov edx, dword [0x467b00]
cmp edx, 9
jbe 0x40b78e
cmp dword [0x467b04], 8
mov ecx, 0x467af0
push 1
cmovae ecx, dword [0x467af0]
push 0x45cce8
push ecx
call fcn.00404130
add esp, 0xc
cmp eax, 0xffffffff
je 0x40b78e
lea eax, [ebp - 0x20]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40b786
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0
push 0
push 1
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x40b4f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40b786
mov eax, dword [ebp - 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
push 0
mov dword [ebp - 0x14], eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x40b786
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
push esi
push 1
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x40b786
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
push eax
push 0
mov dword [ebp - 0x10], eax
call edi
push eax
call ebx
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40b786
push dword [esi]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x40b786
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
je 0x40b786
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 1
lea eax, [ebp - 0xc]
mov word [ebp - 8], 0x100
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40b786
push dword [ebp - 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
call esi
push eax
push 0
mov dword [ebp - 0x1c], eax
call edi
push eax
call ebx
mov ebx, eax
test ebx, ebx
je 0x40b786
push dword [ebp - 0x10]
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x40b786
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push ebx
call esi
push dword [ebp - 0x14]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
add esi, 0x18
add eax, esi
push eax
push 0
mov dword [ebp - 0x1c], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x40b786
push 2
push dword [ebp - 0x1c]
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x40b786
push dword [ebp - 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
push 0x101f0000
push 2
push esi
call edi
test eax, eax
je 0x40b786
push ebx
push 0x101f0000
push 2
push esi
call edi
test eax, eax
je 0x40b786
push 1
lea eax, [ebp - 0x40]
mov dword [ebp - 0x30], 0
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x40], xmm0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x40b786
push 0
push esi
push 1
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40b786
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x40]
mov dword [ebp - 0x2c], 0xc
mov esi, 0x467b18
mov dword [ebp - 0x28], eax
mov edi, 0x467b8c
mov dword [ebp - 0x24], 0
nop word [eax + eax]
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi], eax
test eax, eax
je 0x40b78e
mov dword [esi], eax
lea edx, [ebp - 0x2c]
push edx
mov dword [esi - 8], 0
mov ecx, 0x467af0
mov dword [esi - 4], 0
push dword [0x468ba8]
cmp dword [0x467b04], 8
mov eax, dword [0x468ba4]
cmovae ecx, dword [0x467af0]
add eax, eax
push eax
push eax
push 4
push 6
push 0x40000003
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x40b78e
lea ecx, [esi - 0x10]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40b751
call ebx
cmp eax, 0x217
je 0x40b749
cmp eax, 0x3e5
jne 0x40b751
mov al, 1
jmp 0x40b753
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor al, al
mov byte [esi + 0x10], al
add edi, 4
movzx eax, al
xor eax, 1
mov dword [esi + 0xc], eax
add esi, 0x21
cmp edi, 0x467b9c
jl 0x40b6c0
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414edc
mov esp, ebp
pop ebp
ret 4
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414edc
mov esp, ebp
pop ebp
ret 4