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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
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 0x40b69e
cmp dword [0x467b04], 8
mov ecx, 0x467af0
push 1
cmovae ecx, dword [0x467af0]
push 0x45ccd8
push ecx
call fcn.00404130
add esp, 0xc
cmp eax, 0xffffffff
je 0x40b69e
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
mov word [ebp - 8], 0x500
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40b696
push dword [ebp - 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
call ebx
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40b696
push dword [ebp - 0x10]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x40b696
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push edi
call ebx
lea ebx, [eax + 0x10]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x40b696
push 2
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x40b696
push edi
push 0x101f0000
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x40b696
push 1
lea eax, [ebp - 0x30]
mov dword [ebp - 0x20], 0
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0x30], xmm0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x40b696
push 0
push esi
push 1
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40b696
mov ebx, dword [sym.imp.KERNEL32.dll_CreateEventW]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x1c], 0xc
mov esi, 0x467b18
mov dword [ebp - 0x18], eax
mov edi, 0x467b8c
mov dword [ebp - 0x14], 0
push 0
push 1
push 1
push 0
call ebx
mov dword [edi], eax
test eax, eax
je 0x40b69e
mov dword [esi], eax
lea edx, [ebp - 0x1c]
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 0x40b69e
lea ecx, [esi - 0x10]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40b661
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x40b659
cmp eax, 0x3e5
jne 0x40b661
mov al, 1
jmp 0x40b663
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 0x40b5d0
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414dec
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.00414dec
mov esp, ebp
pop ebp
ret 4